To generate a standard message box, an application calls WinMessageBox and specifies the type of message box and message text. The system displays the message and waits for the user to dismiss the message box by selecting a button in the message box. The system then returns a result code to the application, indicating which button the user selected.

Standard message boxes are always modal-either application-modal or system-modal. Application-modal (the default style) means that the user cannot activate another window in the current application before responding to the message box but can switch to another application. System-modal means that the user cannot activate another window in any application before responding to the message box. A system-modal message box should be used only to display urgent error messages (running out of memory, for example).


[Back] [Next]