Question...
Alright, heres a stupid question. I got my window made, then I wanted to add so when u press the x button it asks if u wanna quit or not. Heres the chunk of code i have a qeustion on. It asks u after the window is destroyed, and after a few times, i have to restart my comp cause the .exe in the debug folder gets somehow protected. HElp Plz!
case WM_DESTROY:
MessageBox( NULL, "Are you sure you want to quite El Gato?", "Sir?", MB_YESNO | MB_ICONEXCLAMATION );
if( IDCANCEL )
{
return 0;
}
else
{
PostQuitMessage( 0 );
return 0;
}
}
if(IDNO != MessageBox(..., MB_OKCANCEL))
{
PostQuitMessage(0);
}
//always returns 0, so don''t bother elsing.
return 0;
{
PostQuitMessage(0);
}
//always returns 0, so don''t bother elsing.
return 0;
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement