|
-
May 4th, 1999, 10:08 PM
#1
Threads an MessageBox mis-behaviour...
I have a small dialog app. in which I make some choices and the app goes off and does some database processing. The app. worked fine when it was single threaded.
I have added two worker threads to do the database and cancellation processing and therefore allow me to cancel the process on the parent dialog (user interface thread) when I need to.
The app. still works except for the following -> any MessageBoxes that I call when one worker thread is running show up in the bottom right corner of the screen, rather than centered in the dialog.
MessageBoxes that I call when the second worker thread is running show up minimized on the WinNT taskbar. Does anyone have a clue as to why these problems may be showing up?
I have tried the following with no success:
1. Added the HWND of the parent dialog to the MessageBox call.
2. Used the CWnd::MessageBox() function with a pointer to the m_pMainWnd member of CWinApp.
((CWin*) AfxGetApp->m_pMainWnd)->MessageBox(message, header, MB_OK)
3. Attempted to use the global msgbox function ::MessageBox(....)
Any help from someone who has seen this strange result before would be appreciated.
Austin.
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
|