Compartilhar via


AtlAxDialogBox

 

Creates a modal dialog box from a dialog template provided by the user.

Important

This function cannot be used in applications that execute in the Windows Runtime.

Syntax

      ATLAPI_(int) AtlAxDialogBox(
HINSTANCE hInstance,
LPCWSTR lpTemplateName,
HWND hWndParent,
DLGPROC lpDialogProc,
LPARAM dwInitParam 
);

Parameters

  • hInstance
    [in] Identifies an instance of the module whose executable file contains the dialog box template.

  • lpTemplateName
    [in] Identifies the dialog box template. This parameter is either the pointer to a null-terminated character string that specifies the name of the dialog box template or an integer value that specifies the resource identifier of the dialog box template. If the parameter specifies a resource identifier, its high-order word must be zero and its low-order word must contain the identifier. You can use the MAKEINTRESOURCE macro to create this value.

  • hWndParent
    [in] Identifies the window that owns the dialog box.

  • lpDialogProc
    [in] Points to the dialog box procedure. For more information about the dialog box procedure, see DialogProc.

  • dwInitParam
    [in] Specifies the value to pass to the dialog box in the lParam parameter of the WM_INITDIALOG message.

Return Value

One of the standard HRESULT values.

Remarks

To use AtlAxDialogBox with a dialog template that contains an ActiveX control, specify a valid CLSID, APPID or URL string as the text field of the CONTROL section of the dialog resource, along with "AtlAxWin80" as the class name field under the same section. The following demonstrates what a valid CONTROL section might look like:

CONTROL "{04FE35E9-ADBC-4f1d-83FE-8FA4D1F71C7F}", IDC_TEST,

"AtlAxWin80", WS_GROUP | WS_TABSTOP, 0, 0, 100, 100

For more information on editing resource scripts, see How to: Open a Resource Script File in Text Format. For more information on control resource-definition statements, see Common Control Parameters under Windows SDK*: SDK Tools*.

For more information on dialog boxes in general, refer to DialogBox and CreateDialogParam in the Windows SDK.

Requirements

Header: atlhost.h

See Also

Composite Control Global Functions
ATL Composite Control Fundamentals
AtlAxCreateDialog