int wb_message_box (int parent, string message [, string title [, int style]])
Creates and displays a message box and returns a value according to the button pressed.
Pressing either button "Cancel", "No", "Ignore" or "Abort" will return the integer value of 0.
Pressing "Ok", "Yes" or "Retry" will return the integer value of 1.
If the function is not successful it will return NULL.
// Asks for confirmation before closing an application window
function process_main($window, $id)
{
switch($id) {
case ID_EXIT:
case IDCLOSE:
if(wb_message_box($window, "Are your sure?", APPNAME, WBC_YESNO))
wb_destroy_window($window);
break;
}
}
See also