MessageBox "Yes" button clicked

closed account (jwkNwA7f)
How can I check if "Yes" button in MessageBox() was clicked?

1
2
MessageBox (NULL, TEXT ("Yes or no?"), TEXT ("Question"), MB_YESNO | MB_DEFBUTTON1);
...
See for example http://msdn.microsoft.com/en-us/library/windows/desktop/ms645505%28v=vs.85%29.aspx

1
2
3
4
5
6
7
8
9
int result=MessageBox (NULL, TEXT ("Yes or no?"), TEXT ("Question"), MB_YESNO | MB_DEFBUTTON1);
switch(result)
{
    case(IDYES):
       //something to do in the yes case
       break;
   case(IDNO):
       //something to do in the no case
       break;
closed account (jwkNwA7f)
Thank you!
Topic archived. No new replies allowed.