954,498 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

switch case statments from text boxes.

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

gfp91
Newbie Poster
7 posts since Jan 2012
Reputation Points: 10
Solved Threads: 0
 

...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.

gfp91
Newbie Poster
7 posts since Jan 2012
Reputation Points: 10
Solved Threads: 0
 

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

MandrewP
Junior Poster
111 posts since Nov 2009
Reputation Points: 33
Solved Threads: 21
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: