MessageBox With Timeout
Posted
by Alexandr Shcherbakov
on July 30th, 1999
This class has a very simple interface
CMessageBoxEx() CMessageBoxEx(HWND hWnd, LPCTSTR lpText, LPCTSTR lpCaption, UINT uType, UINT uTimeOut, BOOL bShowTimeOut = TRUE)
int DoMessageBox() int DoMessageBox(HWND hWnd, LPCTSTR lpText, LPCTSTR lpCaption, UINT uType, UINT uTimeOut, BOOL bShowTimeOut = TRUE)The object creates a thread to check time elapsed. When timeout is reached, the thread posts WM_CLOSE message to the message box.

Comments
Messae Box with timeout - where is it?
Posted by Baruch on 03/19/2010 12:00pmCan someone specify how to download the actual code or messagebox control?
ReplyMessagebox with voice
Posted by mayurnimbalkar on 08/06/2007 12:52amhi, i want to display not only messagebox but also want to make text of message audiable. regards, mayur
ReplyMessagebox with voice
Posted by mayurnimbalkar on 08/06/2007 12:49amhi, i want to not only display messagebox but also want to be listen the text of meesagebox on sound or in audio format. Is it possible? Regards, Mayur.
ReplySource code found (again)
Posted by kotyczka on 05/11/2006 10:03amhttp://www.codeguru.com/code/legacy/misc/MessageBoxEx_src.zip
ReplyCreate CMessageBoxEx once, call often ...
Posted by Legacy on 01/19/2001 12:00amOriginally posted by: Lutz
ReplyNew Fix : Use WM_CLOSE instead of WM_QUIT
Posted by Legacy on 03/31/2000 12:00amOriginally posted by: Martin-Pierre Frenette and by Alexandr Shcherbakov
Here is a new fix for the class, which came from Alexandr after discussion between Alexandr and Me ( Martin-Pierre ) :
Send the WM_CLOSE msg instead of WM_QUIT or WM_COMMAND|ID_OK
Therefore, the line :
PostMessage(FindWindow(NULL, pObject->m_szTimeOutCaption), WM_QUIT, 0, 0);
becomes the line :
PostMessage(FindWindow(NULL, pObject->m_szTimeOutCaption), WM_CLOSE, 0, 0);
ReplyHow do I allow multiple concurrent calls to MessageBoxEx?
Posted by Legacy on 09/01/1999 12:00amOriginally posted by: David
I would like to allow my application to call this routine more than once, and it is possible that more than one messageboxes will be on the screen at the same time ...
Any ideas on an elegant fix, or do I have to write something from scratch?
ReplyA simpler way
Posted by Legacy on 08/25/1999 12:00amOriginally posted by: Navin Mishra
I used a timer to close a modal dialog box.
ReplyWhere is the code?
Posted by Legacy on 08/06/1999 12:00amOriginally posted by: Colin Elligsen
I only see four method definitions myself? Am I missing something?
ReplyWhere is the archive ?
Posted by Legacy on 08/02/1999 12:00amOriginally posted by: jbackdoor
I said everything in the subject :)
Bye
ReplyLoading, Please Wait ...