cternoey
June 3rd, 1999, 02:44 PM
I have determined that CMyApp::InitInstance() is not always called when my application begins execution. Anyone seen this kind of problem before? Perhaps I create the problem by using PostQuitMessage(0) to exit?
Detail:
I have an AfxMessageBox call as the very first line of CMyApp::InitInstance(). The first time I call my program using a command-line execution, CMyApp::InitInstance() is called, and the message box appears and the command line is processed and the program executes and exits. On subsequent calls from the command line, the program seems to skip InitInstance() somehow. It does not display the message box, it does not process the command-line, it simply turns on as if executed normally (double-clicked or whatever), or like it was already on and it is just unhiding. Is it possible I create the problem by using PostQuitMessage(0) to exit?
Detail:
I have an AfxMessageBox call as the very first line of CMyApp::InitInstance(). The first time I call my program using a command-line execution, CMyApp::InitInstance() is called, and the message box appears and the command line is processed and the program executes and exits. On subsequent calls from the command line, the program seems to skip InitInstance() somehow. It does not display the message box, it does not process the command-line, it simply turns on as if executed normally (double-clicked or whatever), or like it was already on and it is just unhiding. Is it possible I create the problem by using PostQuitMessage(0) to exit?