On Feb 14, 2:36 pm, "Jeff Gaines" <whitedra...@newsgroups.nospam>
wrote:
> On 14/02/2007 in message
> <1171483703.050238.145...@l53g2000cwa.googlegroups.com>
[quoted text clipped - 23 lines]
> --
> Jeff Gaines
Yeah, I could do that. But I'm really trying to emulate the
System.Windows.Forms.OpenFileDialog (I mistakenly called it the
FileOpenDialog component in a previous post). I looked in the
documentation and found that FileOpenDialog has two overloads of
ShowDialog: ShowDialog() and ShowDialog(IWin32Window). I guess
ShowDialog() probably calls GetOpenFileName() with a NULL owner HWND
while ShowDialog(IWin32Window) provides the parameter's HWND. I always
assumed that somehow the component was able to get the HWND of the
containing form. Does anyone know if ShowDialog() does any trick to
get the HWND or if it just passes NULL?
Thanks for all your help!
-Mike-
Stoitcho Goutsev (100) - 19 Feb 2007 16:34 GMT
Mike,
Common dialogs use GetActiveWindow API if parent window is not provided.

Signature
HTH
Stoitcho Goutsev (100)
> On Feb 14, 2:36 pm, "Jeff Gaines" <whitedra...@newsgroups.nospam>
> wrote:
[quoted text clipped - 39 lines]
> Thanks for all your help!
> -Mike-