Partager via


Message Box Styles (Compact 2013)

3/28/2014

The following tables show the styles that are supported by Windows Embedded Compact.

Button style

Description

MB_ABORTRETRYIGNORE

Specifies that the message box contains three buttons: Abort, Retry, and Ignore.

MB_DEFBUTTON1

Specifies that the first button is the default button. The first button is always the default unless you specify MB_DEFBUTTON2.

MB_DEFBUTTON2

Specifies that the second button is the default button.

MB_DEFBUTTON3

Specifies that the third button is the default button.

MB_OK

Specifies that the message box contains one button: OK.

MB_OKCANCEL

Specifies that the message box contains two buttons: OK and Cancel.

MB_RETRYCANCEL

Specifies that the message box contains two buttons: Retry and Cancel.

MB_YESNO

Specifies that that the message box contains two buttons: Yes and No.

MB_YESNOCANCEL

Specifies that the message box contains three buttons: Yes, No, and Cancel.

Icon style

Description

MB_ICONASTERISK MB_ICONINFORMATION

Includes an icon consisting of a lowercase letter "i" in a circle in the message box.

MB_ICONERROR MB_ICONHAND MB_ICONSTOP

Includes a stop-sign icon in the message box.

MB_ICONEXCLAMATION MB_ICONWARNING

Includes an exclamation-point icon in the message box.

MB_ICONQUESTION

Includes a question-mark icon in the message box.

Window style

Description

MB_APPLMODAL

Specifies that the user must respond to the message box before continuing work in the window that is identified by the hWnd parameter. However, the user can move to the windows of other applications and work in those windows.

Depending on the hierarchy of windows in the application, the user might be able to move to other windows within the application. All child windows of the message box's parent window are automatically disabled, but pop-up windows are not.

MB_APPLMODAL is the default value. Windows Embedded Compact does not support either MB_SYSTEMMODAL or MB_TASKMODAL.

MB_SETFOREGROUND

Specifies that the message box becomes the foreground window.

MB_TOPMOST

Creates the message box with the WS_EX_TOPMOST window style.

See Also

Reference

Window and Message Box Styles