MessageBox in common use:
MessageBox("....");
Output character "......"
int result = MessageBox("Are you want to save context before Exit ?","AlertDialog",MB_ICONINFORMATION|MB_YESNOCANCEL);
Representative MB_YESNOCANCEL has three buttons, parameters are defined as follows:
1 #define MB_OK 0x00000000L 2 #define MB_OKCANCEL 0x00000001L 3 #define MB_ABORTRETRYIGNORE 0x00000002L 4 #define MB_YESNOCANCEL 0x00000003L 5 #define MB_YESNO 0x00000004L 6 #define MB_RETRYCANCEL 0x00000005L
Returns the value of the parameter is defined as follows:
1 /* 2 * Dialog Box Command IDs 3 */ 4 #define IDOK 1 5 #define IDCANCEL 2 6 #define IDABORT 3 7 #define IDRETRY 4 8 #define IDIGNORE 5 9 #define IDYES 6 10 #define IDNO 7
Key parameters and return values for the selected user, such as when pressing the Yes button return value IDYES.
Therefore, this can be used when you want to perform an operation, the user is prompted to make a choice.
end
thanks.