I am trying to set up an ap that will loop through a messagebox until the user click cancel. As of now I have
Code:
#include <windows.h>


int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, 
	LPSTR lpCmdLine, int nShowCmd)
{

	int check = MessageBox(NULL, "Click an Option!",
		    "MessageBox Example!!", MB_ICONQUESTION |MB_YESNOCANCEL);

	while (check != IDCANCEL)
	{
		if (check == IDYES)
		{
			MessageBox(NULL, "You Hit YES!",
				"MessageBox Example!!", MB_ICONASTERISK);
		}
		else if (check == IDNO)
		{
			MessageBox(NULL, "You Hit NO!",
				"MessageBox Example!!", MB_ICONASTERISK);
		}
		else if (check == IDCANCEL)
		{
			MessageBox(NULL, "You Hit CANCEL - Goodbye!",
				"MessageBox Example!!", MB_ICONASTERISK);
		}
	}

    return 0;
}
You might notice that once the user clicks anything the ap goes into a continues loop that you can't exit. So basically in short this is what I am trying to accomplish....

Mesasgebox pops up...
User clicks one of three options (YES, NO, Cancel)

If user clicks Yes then another message box pops up saying you have hit yes. User then hits ok and the loop starts again

If user clicks NO then another message box pops up saying you have hit no. User then hits ok and the loop starts again

If user clicks Cancel then another message box pops sayin you have hit cancel. User the hits ok and the loop exits and ap closes.