Click to See Complete Forum and Search --> : Need a confirmation exit message


Zhen-Xlogic
April 8th, 2005, 06:44 PM
Well i do one MFC app with Visual Studio 2003 .NET and i wont if i prees the [X] button to popup a Exit confirmation message.

Like the basic in all programs "are you sure you wont to exit this app? Yes/No (buttons).

Now i wont the full code of this message.



Thanks and im waitinig your replys.
Zhen-Xlogic

g_gili
April 14th, 2005, 03:28 AM
Add a message handler to your aplication OnKeyDown( UINT nChar)
{
if(nChar=='X')
if(MessgeBox("your message","DO you want to exit",MB_ICONQUESTION|MB_YESNO)==IDYES)
//call the exit function

}