Table of Contents

Enum Win32.MsgBox

Namespace
Npp.DotNet.Plugin
Assembly
Npp.DotNet.Plugin.dll

Possible values of the uType parameter of MsgBoxDialog(IntPtr, string, string, uint).

[Flags]
public enum Win32.MsgBox : uint

Fields

ABORTRETRYIGNORE = 2

The message box contains three push buttons: Abort, Retry, and Ignore.

APPLMODAL = 0

The 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 | YESNO

The message box contains three push buttons: Cancel, Try Again, Continue. Use this message box type instead of ABORTRETRYIGNORE.

DEFAULT_DESKTOP_ONLY = 131072

Same 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 = 0

The first button is the default button. DEFBUTTON1 is the default unless DEFBUTTON2, DEFBUTTON3, or DEFBUTTON4 is specified.

DEFBUTTON2 = 256

The second button is the default button.

DEFBUTTON3 = 512

The third button is the default button.

DEFBUTTON4 = DEFBUTTON2 | DEFBUTTON3

The fourth button is the default button.

HELP = 16384

Adds 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 = 64

An icon consisting of a lowercase letter i in a circle appears in the message box.

ICONERROR = 16

A stop-sign icon appears in the message box.

ICONEXCLAMATION = ICONERROR | ICONQUESTION

An exclamation-point icon appears in the message box.

ICONHAND = 16

A stop-sign icon appears in the message box.

ICONINFORMATION = 64

An icon consisting of a lowercase letter i in a circle appears in the message box.

ICONQUESTION = 32

A 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 = 16

A stop-sign icon appears in the message box.

ICONWARNING = ICONERROR | ICONQUESTION

An exclamation-point icon appears in the message box.

OK = 0

The message box contains one push button: OK. This is the default.

OKCANCEL = 1

The message box contains two push buttons: OK and Cancel.

RETRYCANCEL = OKCANCEL | YESNO

The message box contains two push buttons: Retry and Cancel.

RIGHT = 524288

The text is right-justified.

RTLREADING = 1048576

Displays message and caption text using right-to-left reading order on Hebrew and Arabic systems.

SERVICE_NOTIFICATION = 2097152

The 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 = 65536

The message box becomes the foreground window. Internally, the system calls the SetForegroundWindow function for the message box.

SYSTEMMODAL = 4096

Same 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 = 8192

Same 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 = 262144

The message box is created with the WS_EX_TOPMOST window style.

YESNO = 4

The message box contains two push buttons: Yes and No.

YESNOCANCEL = OKCANCEL | ABORTRETRYIGNORE

The 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