int TEST; // only way i could assign this to the messagebox.
void createbox_QUIT()
{
TEST = MessageBox(NULL, "Are you sure you want to quit?", " ", MB_ICONQUESTION | MB_YESNO);
switch(TEST)
{
case 1:
createbox_COPYRIGHT(); // I used this box just as a test
break;
case 2:
createbox_VERSION(); // same as above, for a test.
break;
}
}
How can i detect if the person presses the yes or presses the no button?
Return Values
The return value is zero if there is not enough memory to create the message box.
If the function succeeds, the return value is one of the following menu-item values returned by the dialog box:
Value Meaning
IDABORT Abort button was selected.
IDCANCEL Cancel button was selected.
IDIGNORE Ignore button was selected. IDNO No button was selected.
IDOK OK button was selected.
IDRETRY Retry button was selected. IDYES Yes button was selected.