Originally posted by: jbackdoor
I said everything in the subject :)
Bye
ReplyOriginally posted by: Martin-Pierre Frenette
When I use the Messagebox and I let the timeout expire, the MessageBoxEx sends the WM_QUIT message, which is caught by my application and closes it.
I suppose the goal was to send the WM_QUIT to the messagebox, but in my case, the application gets it.
UPDATE on May 25th : I now think the problem is caused by the fact that I use a Multi-Threaded application
where several threads process the Message Queue.
END OF UPDATE
Instead of searching a way to send the message at the right place, I simply changed the message to IDOK.
Therefore, the line :
PostMessage(FindWindow(NULL, pObject->m_szTimeOutCaption), WM_QUIT, 0, 0);
Changes to :
PostMessage(FindWindow(NULL, pObject->m_szTimeOutCaption), WM_COMMAND, IDOK, 0);
I only use MB_OK or MB_OKCANCEL boxes. If other boxes are used, a test should be made to send the right
message.
Other than that problem, I have found this class to be very interresting.
I had my own class for doing this service, but this one is much better, so I replaced all my call to my old class by call to this class.
Originally posted by: Pabitra Kumar Dash
Can I create a modeless message box?
Regards,
Hi,
Please help.
Pabitra