windows_programming_notes.nbk: Home | Index | Next Page: MINMAXINFO | Previous Page: MessageBoxEx


 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.

Syntax

    int MessageBoxIndirect(  
        const LPMSGBOXPARAMS lpMsgBoxParams
    );

Parameters

Return Value

If the function succeeds, the return value is one of the following menu-item values.

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.

If there is not enough memory to create the message box, the return value is zero.

Remarks

When you use a system-modal message box to indicate that the system is low on memory, the strings pointed to by the lpszText and lpszCaption members of the MSGBOXPARAMS structure should not be taken from a resource file, because an attempt to load the resource may fail.

If you create a message box while a dialog box is present, use a handle to the dialog box as the hWnd parameter. The hWnd parameter should not identify a child window, such as a control in a dialog box.

Windows 95/98/Me: The system can support a maximum of 16,364 window handles.

Windows 95/98/Me: MessageBoxIndirectW is supported by the Microsoft Layer for Unicode. To use this, you must add certain files to your application, as outlined in Microsoft Layer for Unicode on Windows 95/98/Me Systems .

Function Information


windows_programming_notes.nbk: Home | Index | Next Page: MINMAXINFO | Previous Page: MessageBoxEx


Notebook exported on Monday, 7 July 2008, 18:56:50 PM Eastern Daylight Time