D
david epsom dot com dot au
I am trying to send a message to a FileOpen dialog, to tell it to close, as
suggested here:
http://msdn.microsoft.com/library/d...ence/CommonDialogBoxFunctions/OFNHookProc.asp
I am using :
Call PostMessage(GetParent(hwnd), WM_COMMAND, IDABORT, 0)
this didn't work either:
Call PostMessage(GetParent(hwnd), WM_SYSCOMMAND, SC_CLOSE, 0)
hwnd is the handle to the child dialog (using the default template),
and GetParent(hwnd) is the handle to the dialog.
When I post the message, nothing happens.
FWIW, using (hwnd) closes the parent application : using
GetParent(GetParent(hwnd), (which correctly returns the hwnd of the parent
application) locks up the dialog and the parent application.
(I want this to work like the File|Get External Data|Import dialog in
MSAccess: I want to close the dialog when the ODBC file type is selected. I
am trapping the CFileDialog::OnTypeChange event)
Any suggestions?
(david)
suggested here:
http://msdn.microsoft.com/library/d...ence/CommonDialogBoxFunctions/OFNHookProc.asp
I am using :
Call PostMessage(GetParent(hwnd), WM_COMMAND, IDABORT, 0)
this didn't work either:
Call PostMessage(GetParent(hwnd), WM_SYSCOMMAND, SC_CLOSE, 0)
hwnd is the handle to the child dialog (using the default template),
and GetParent(hwnd) is the handle to the dialog.
When I post the message, nothing happens.
FWIW, using (hwnd) closes the parent application : using
GetParent(GetParent(hwnd), (which correctly returns the hwnd of the parent
application) locks up the dialog and the parent application.
(I want this to work like the File|Get External Data|Import dialog in
MSAccess: I want to close the dialog when the ODBC file type is selected. I
am trapping the CFileDialog::OnTypeChange event)
Any suggestions?
(david)