Enum Win32.MsgBox
Possible values of the uType parameter of MsgBoxDialog(IntPtr, string, string, uint).
[Flags]
public enum Win32.MsgBox : uint
Fields
ABORTRETRYIGNORE = 2The message box contains three push buttons: Abort, Retry, and Ignore.
APPLMODAL = 0The user must respond to the message box before continuing work in the window identified by the hWnd parameter. However, the user can move to the windows of other threads and work in those windows. APPLMODAL is the default if neither SYSTEMMODAL nor TASKMODAL is specified.
Depending on the hierarchy of windows in the application, the user may be able to move to other windows within the thread. All child windows of the parent of the message box are automatically disabled, but pop-up windows are not.
CANCELTRYCONTINUE = ABORTRETRYIGNORE | YESNOThe message box contains three push buttons: Cancel, Try Again, Continue. Use this message box type instead of ABORTRETRYIGNORE.
DEFAULT_DESKTOP_ONLY = 131072Same as desktop of the interactive window station. For more information, see Window Stations.
If the current input desktop is not the default desktop, MsgBoxDialog(IntPtr, string, string, uint) does not return until the user switches to the default desktop.
DEFBUTTON1 = 0The first button is the default button. DEFBUTTON1 is the default unless DEFBUTTON2, DEFBUTTON3, or DEFBUTTON4 is specified.
DEFBUTTON2 = 256The second button is the default button.
DEFBUTTON3 = 512The third button is the default button.
DEFBUTTON4 = DEFBUTTON2 | DEFBUTTON3The fourth button is the default button.
HELP = 16384Adds a Help button to the message box. When the user clicks the Help button or presses F1, the system sends a WM_HELP message to the owner.
ICONASTERISK = 64An icon consisting of a lowercase letter
iin a circle appears in the message box.ICONERROR = 16A stop-sign icon appears in the message box.
ICONEXCLAMATION = ICONERROR | ICONQUESTIONAn exclamation-point icon appears in the message box.
ICONHAND = 16A stop-sign icon appears in the message box.
ICONINFORMATION = 64An icon consisting of a lowercase letter
iin a circle appears in the message box.ICONQUESTION = 32A question-mark icon appears in the message box.
The question-mark message icon is no longer recommended because it does not clearly represent a specific type of message and because the phrasing of a message as a question could apply to any message type. In addition, users can confuse the message symbol question mark with Help information. Therefore, do not use this question mark message symbol in your message boxes. The system continues to support its inclusion only for backward compatibility.
ICONSTOP = 16A stop-sign icon appears in the message box.
ICONWARNING = ICONERROR | ICONQUESTIONAn exclamation-point icon appears in the message box.
OK = 0The message box contains one push button: OK. This is the default.
OKCANCEL = 1The message box contains two push buttons: OK and Cancel.
RETRYCANCEL = OKCANCEL | YESNOThe message box contains two push buttons: Retry and Cancel.
RIGHT = 524288The text is right-justified.
RTLREADING = 1048576Displays message and caption text using right-to-left reading order on Hebrew and Arabic systems.
SERVICE_NOTIFICATION = 2097152The caller is a service notifying the user of an event. The function displays a message box on the current active desktop, even if there is no user logged on to the computer.
SETFOREGROUND = 65536The message box becomes the foreground window. Internally, the system calls the SetForegroundWindow function for the message box.
SYSTEMMODAL = 4096Same as APPLMODAL except that the message box has the WS_EX_TOPMOST style. Use system-modal message boxes to notify the user of serious, potentially damaging errors that require immediate attention (for example, running out of memory). This flag has no effect on the user's ability to interact with windows other than those associated with hWnd.
TASKMODAL = 8192Same as APPLMODAL except that all the top-level windows belonging to the current thread are disabled if the hWnd parameter is NULL. Use this flag when the calling application or library does not have a window handle available but still needs to prevent input to other windows in the calling thread without suspending other threads.
TOPMOST = 262144The message box is created with the WS_EX_TOPMOST window style.
YESNO = 4The message box contains two push buttons: Yes and No.
YESNOCANCEL = OKCANCEL | ABORTRETRYIGNOREThe message box contains three push buttons: Yes, No, and Cancel.
Remarks
To display an icon in the message box, specify one of the ICON* values.
To indicate the default button, specify one of the DEFBUTTON* values.
To indicate the modality of the dialog box, specify one of the following values beginning with APPLMODAL.
See https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-messagebox