1

I am using the new Common Item Dialog API to show file open/save dialogs. How do i get these dialogs to be centered on the owner window ? In the old API, this could be done by handling WM_INITDIALOG in the Callback hook for GetOpenFileName, but the IFileDialog does not seem to provide any way to center the dialogs.

Deanna
  • 23,876
  • 7
  • 71
  • 156
  • 1
    http://stackoverflow.com/questions/2576156/winforms-how-can-i-make-messagebox-appear-centered-on-mainform – Hans Passant Nov 29 '11 at 22:19
  • Just ran into another detail, you can QI the IFileDialog interface pointer for IOleWindow. Whose GetWindow method returns you the window handle. No convenient event to do this, try PostMessage to your own window. – Hans Passant Dec 01 '11 at 13:36

0 Answers0