(?:) CAxDialogImpl does not receive WM_CREATE
-
I have a ATL dialog class based on CAxDialogImpl. And I have added message handler for WM_CREATE for it: BEGIN_MSG_MAP(CMyDialog) ... MESSAGE_HANDLER(WM_CREATE, OnCreate) MESSAGE_HANDLER(WM_DESTROY, OnDestroy) CHAIN_MSG_MAP(CAxDialogImpl) DEFAULT_REFLECTION_HANDLER() END_MSG_MAP() And when instance of it is created through: CMyDialog dlg; dlg.Create(::GetDesktopWindow()); it does not receive the WM_CREATE notification. Interestingly, it Does receive WM_DESTROY notification. Am i missing something?
-
I have a ATL dialog class based on CAxDialogImpl. And I have added message handler for WM_CREATE for it: BEGIN_MSG_MAP(CMyDialog) ... MESSAGE_HANDLER(WM_CREATE, OnCreate) MESSAGE_HANDLER(WM_DESTROY, OnDestroy) CHAIN_MSG_MAP(CAxDialogImpl) DEFAULT_REFLECTION_HANDLER() END_MSG_MAP() And when instance of it is created through: CMyDialog dlg; dlg.Create(::GetDesktopWindow()); it does not receive the WM_CREATE notification. Interestingly, it Does receive WM_DESTROY notification. Am i missing something?
Dialogs don't receieve
WM_CREATE
. They do receiveWM_INITDIALOG
though - that's the message you want to trap. This applies for all dialogs, active x or not. -- Arigato gozaimashita!