How to resume if you press IDNO?

Hey again,

Thanks to help of two people, i was able to get this work;

1
2
3
4
5
6
7
8
9
10
TEST = MessageBox(NULL, "Are you sure you want to quit?", " ", MB_ICONQUESTION | MB_YESNO);
	 switch(TEST)
	 {
	     case IDYES:
			  createbox_COPYRIGHT(); // I used this box just as a test
		      break;
	     case IDNO:
			  createbox_VERSION(); // same as above, for a test.
		      break;
	 }


Now if i was to press NO how can i tell the program to resume?

Thanks! :-)
createbox_VERSION() would have to return.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
bool createbox_QUIT()
{
	 emsg = MessageBox(NULL, "Are you sure you want to quit?" , " ", MB_ICONQUESTION | MB_YESNO);
	 switch(emsg)
	 {
	     case IDYES:
			  //createbox_COPYRIGHT();
		      //break;
			  return true;
	     case IDNO:
			  //createbox_VERSION();
		      //break;
			  return false;
	 }
}


It still exits when i press no, any other ideas?

Thanks!
No. Not without seeing the context that createbox_QUIT() was called in.
Fixed it, i looked wher eit was called and removed DestroyWindow(hwnd); and added it under IDYES, THANKS! :)
Topic archived. No new replies allowed.