A | B | C |  D | E | F |  G | H | I |  J | K | L |  M | N | O |  P | Q | R |  S | T | U |  V | W | X |  Y | Z



MessageBoxIndirect

The MessageBoxIndirect function creates, displays, and operates a message box. The message box contains application-defined message text and title, any icon, and any combination of predefined push buttons.

VB4-32,5,6
Declare Function MessageBoxIndirect Lib "user32" Alias "MessageBoxIndirectA" (lpMsgBoxParams As MSGBOXPARAMS) As Long

VB.NET
System.Windows.Forms.MessageBox

Operating Systems Supported
Requires Windows NT 4.0 or later; Requires Windows 95 or later

Library
User32

Parameter Information
- lpMsgBoxParams
Pointer to a MSGBOXPARAMS structure that contains information used to display the message box.

Return Values
The return value is zero if there is not enough memory to create the message box.

If the function succeeds, the return value is one of the following menu-item values returned by the dialog box:
IDABORT
Abort button was selected.

IDCANCEL
Cancel button was selected.

IDIGNORE
Ignore button was selected.

IDNO
No button was selected.

IDOK
OK button was selected.

IDRETRY
Retry button was selected.

IDYES
Yes button was selected.



If a message box has a Cancel button, the function returns the IDCANCEL value if either the ESC key is pressed or the Cancel button is selected. If the message box has no Cancel button, pressing ESC has no effect.

Last update: 07 April 2006