hi all
i am trying to make a pause in a 2d game on C++ im going to use a message box with answers yes and no..yes to continue and no for main menue. how do i make unsighned short w = the answer to textbox? ps i tried using a simple if statment (if IDNO) and (if IDYES) after the text box but it thought yes & no were valid every time nomater which on i pressed.

unsigned short w = 1;

MessageBox (NULL, "do you want to contunue?",  "paused", MB_YESNO);

	switch(w)
	{
	case IDNO:
		selection = 0;
		GameOn = false;
		menue_screen = true;
		break;
	  case IDYES:
		break;

thanks gfp91

Recommended Answers

Well, you probably never would have solved this unless you asked. So it does matter.

Jump to Post

All 2 Replies

...dosent matter.......turns out im an idiot that solves his own silly problems XD

w = MessageBox (NULL, "do you want to contunue?",  "paused", MB_YESNO);

easy.

Well, you probably never would have solved this unless you asked. So it does matter.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.