non-user interface event such as a DDE, OLE
-
I have noticed that CMainFrame::ActivateFrame is not called normally, when I start the app from debugger, or from Windows Explorer.
void CMainFrame::ActivateFrame(int nCmdShow)
{
// TODO: Add your specialized code here and/or call the base class
MessageBox(_T("AAAA"));
CMDIFrameWnd::ActivateFrame(nCmdShow);
}And I have read CFrameWnd::ActivateFrame [^]here that this method are called "Call this member function to activate and restore the frame window so that it is visible and available to the user. This member function is usually called after a non-user interface event such as a DDE, OLE, or other event that may show the frame window or its contents to the user." Can you give an example when this method is called ? I am trying to start the my app in hidden mode, passing in this method (CMainFrame::ActivateFrame) nCmdShow = SW_HIDE; Thank you.
-
I have noticed that CMainFrame::ActivateFrame is not called normally, when I start the app from debugger, or from Windows Explorer.
void CMainFrame::ActivateFrame(int nCmdShow)
{
// TODO: Add your specialized code here and/or call the base class
MessageBox(_T("AAAA"));
CMDIFrameWnd::ActivateFrame(nCmdShow);
}And I have read CFrameWnd::ActivateFrame [^]here that this method are called "Call this member function to activate and restore the frame window so that it is visible and available to the user. This member function is usually called after a non-user interface event such as a DDE, OLE, or other event that may show the frame window or its contents to the user." Can you give an example when this method is called ? I am trying to start the my app in hidden mode, passing in this method (CMainFrame::ActivateFrame) nCmdShow = SW_HIDE; Thank you.
Flaviu2 wrote:
I have noticed that CMainFrame::ActivateFrame is not called normally, when I start the app from debugger, or from Windows Explorer.
void CMainFrame::ActivateFrame(int nCmdShow)
{
// TODO: Add your specialized code here and/or call the base class
MessageBox(_T("AAAA"));
CMDIFrameWnd::ActivateFrame(nCmdShow);
}Did you try to replace MessageBox call with a TRACE and check whether your text is displayed in the Output window?
-
Flaviu2 wrote:
I have noticed that CMainFrame::ActivateFrame is not called normally, when I start the app from debugger, or from Windows Explorer.
void CMainFrame::ActivateFrame(int nCmdShow)
{
// TODO: Add your specialized code here and/or call the base class
MessageBox(_T("AAAA"));
CMDIFrameWnd::ActivateFrame(nCmdShow);
}Did you try to replace MessageBox call with a TRACE and check whether your text is displayed in the Output window?
Yes, I have:
void CMainFrame::ActivateFrame(int nCmdShow)
{
// TODO: Add your specialized code here and/or call the base class
TRACE(_T("======================================================AAAA\n"));
CMDIFrameWnd::ActivateFrame(nCmdShow);
}and there is no trace in output window ...