PWLX_MESSAGE_BOX callback function (winwlx.h)
[The WlxMessageBox function is no longer available for use as of Windows Server 2008 and Windows Vista.]
The WlxMessageBox function is called by GINA to create, display, and operate a message box.
Syntax
PWLX_MESSAGE_BOX PwlxMessageBox;
int PwlxMessageBox(
[in] HANDLE hWlx,
[in] HWND hwndOwner,
[in] LPWSTR lpszText,
[in] LPWSTR lpszTitle,
[in] UINT fuStyle
)
{...}
Parameters
[in] hWlx
Specifies the Winlogon handle passed to GINA in the WlxInitialize call.
[in] hwndOwner
Specifies the owner window of the message box to be created. If this parameter is NULL, the message box has no owner window.
[in] lpszText
Points to a null-terminated string that contains the message to be displayed.
[in] lpszTitle
Points to a null-terminated string used for the dialog box title. If this parameter is NULL, the default title Error is used.
[in] fuStyle
Specifies the content and behavior of the dialog box. This parameter can be a combination of the following values.
Value | Meaning |
---|---|
|
The message box contains three command buttons: Abort, Retry, and Ignore. |
|
The user must respond to the message box before continuing to work in the window identified by the hWndOwner parameter. However, the user can move to windows of other applications to work.
Depending on the hierarchy of windows in the application, the user may be able to move to other windows within the application. All child windows of the parent of the message box are automatically disabled but pop-up windows are not. MB_APPLMODAL is the default value if neither MB_SYSTEMMODAL nor MB_TASKMODAL is specified. |
|
The desktop currently receiving input must be a default desktop; otherwise, the function fails. A default desktop is one on which an application runs after the user has logged on. |
|
The first button is the default button. Note that the first button is always the default unless MB_DEFBUTTON2 or MB_DEFBUTTON3 is specified. |
|
The second button is a default button. |
|
The third button is a default button. |
|
The fourth button is a default button. |
|
An icon that consists of a lowercase letter in a circle appears in the message box. |
|
An exclamation point icon appears in the message box. |
|
A hand icon appears in the message box. |
|
An icon that consists of a lowercase letter in a circle appears in the message box. |
|
A question mark icon appears in the message box. |
|
A stop sign icon appears in the message box. |
|
The message box contains one command button: OK. |
|
The message box contains two command buttons: OK and Cancel. |
|
The message box contains two command buttons: Retry and Cancel. |
|
The caller is a service notifying the user of an event. The function brings up a message box on the current active desktop, even if there is no user logged on to the computer. |
|
The message box becomes the foreground window. Internally, Windows calls the SetForegroundWindow function for the message box. |
|
All applications are suspended until the user responds to the message box. Unless the application specifies MB_ICONHAND, the message box does not become modal until after it is created. Consequently, the owner window and other windows continue to receive messages resulting from its activation. Use system-modal message boxes to notify the user of serious, potentially damaging errors that require immediate attention, for example, running out of memory. |
|
Same as MB_APPLMODAL except that all the top-level windows that belong to the current task are disabled if the hWndOwner 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 current application without suspending other applications. |
|
The message box contains two command buttons: Yes and No. |
|
The message box contains three command buttons: Yes, No, and Cancel. |
Return value
If the function fails, or if there is not enough memory to create the message box, the return value is zero.
If the function succeeds, the return value is one of the following menu item values returned by the dialog box.
Return code | Description |
---|---|
|
Abort button was selected. |
|
Cancel button was selected. |
|
Ignore button was selected. |
|
A button was not selected. |
|
OK button was selected. |
|
Retry button was selected. |
|
Yes button was selected. |
Remarks
The WlxMessageBox function does not handle SAS events, and is not suitable for security dialog boxes. Use the WlxDialogBox, WlxDialogBoxIndirect, or WlxDialogBoxIndirectParam function for security dialog boxes.
WlxMessageBox duplicates the Windows MessageBox function, with the exception that this function also allows Winlogon to time out the dialog box. For more information, see MessageBox.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | winwlx.h |