Problem in CWinApp::Initinstance of SDI App
-
In my SDI Application the following problem appeared all of a sudden: In the InitInstance function of the application class the following line // Dispatch commands specified on the command line if (!ProcessShellCommand(cmdInfo)) return FALSE; causes the error: Error creating empty document ! (Translation from german, so the english errortext may be slightly different) Tracing into the MFC code the error happens in the function CWinApp::ProcessShellCommand at the following statement: if (!AfxGetApp()->OnCmdMsg(ID_FILE_NEW, 0, NULL, NULL)) Does anybody else have had this problem and found a solution ??? MS
-
In my SDI Application the following problem appeared all of a sudden: In the InitInstance function of the application class the following line // Dispatch commands specified on the command line if (!ProcessShellCommand(cmdInfo)) return FALSE; causes the error: Error creating empty document ! (Translation from german, so the english errortext may be slightly different) Tracing into the MFC code the error happens in the function CWinApp::ProcessShellCommand at the following statement: if (!AfxGetApp()->OnCmdMsg(ID_FILE_NEW, 0, NULL, NULL)) Does anybody else have had this problem and found a solution ??? MS
This happens due to failure of creating frame window. check your CMainFrame::PreCreateWindow function. It may returning FALSE. Narrow down the problem by commenting whole code in this function and un comment one by one. You will definitely get problem. else carry the same check on OnCreate() function. -- modified at 9:00 Monday 26th September, 2005
-
This happens due to failure of creating frame window. check your CMainFrame::PreCreateWindow function. It may returning FALSE. Narrow down the problem by commenting whole code in this function and un comment one by one. You will definitely get problem. else carry the same check on OnCreate() function. -- modified at 9:00 Monday 26th September, 2005
Oh such a shit. I had some old code in the views PreCreateWindow function which fails at the current version of the project. And so the creation of the view fails. MS