A simple question

If i create a message box and it has 2 buttons (MB_OKCANCEL) how do i know which button was pressed?
The return value of MessageBox is the value of button which was pressed
Thanks Bazzy. Answer is simple but i just started windows programming week ago...
For documentation on MessageBox: http://msdn.microsoft.com/en-us/library/ms645505(VS.85).aspx
Example:
1
2
3
4
if ( MessageBox( 0, "Hello World", "Foo Bar", MB_OKCANCEL  ) == IDOK )
     // The user pressed OK
else
    // The user pressed something else 
Topic archived. No new replies allowed.