Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

MyCatIsTheBest

Question...

This topic is 5660 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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; } }

Share this post


Link to post
Share on other sites
Advertisement
if(IDNO != MessageBox(..., MB_OKCANCEL))
{
PostQuitMessage(0);
}
//always returns 0, so don''t bother elsing.
return 0;

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!