|
-
June 3rd, 1999, 02:44 PM
#1
CWinApp:InitInstance PostQuitMessage
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?
-
June 3rd, 1999, 05:56 PM
#2
Re: CWinApp:InitInstance PostQuitMessage
Your situation sounds weird.
Have you tried running it through the debugger? (You can specify the command line arguments in the Project Settings.)
Good luck!
-
June 7th, 1999, 06:40 AM
#3
Re: CWinApp:InitInstance PostQuitMessage
You do not need to PostQuitMessage to terminate your app in the InitInstance(), just return FALSE.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|