CDialog::CreateIndirect
BOOL CreateIndirect(LPCDLGTEMPLATE lpDialogTemplate**, CWnd*** pParentWnd = NULL );
BOOL CreateIndirect(HGLOBAL hDialogTemplate**,CWnd*** pParentWnd = NULL );
Return Value
Nonzero if the dialog box was created and initialized successfully; otherwise 0.
Parameters
lpDialogTemplate
Points to memory that contains a dialog-box template used to create the dialog box. This template is in the form of a structure and control information. For more information on this structure, see the Win32 SDK documentation.
pParentWnd
Points to the dialog object’s parent window object (of type CWnd). If it is NULL, the dialog object’s parent window is set to the main application window.
hDialogTemplate
Contains a handle to global memory containing a dialog-box template. This template is in the form of a DLGTEMPLATE structure and data for each control in the dialog box.
Remarks
Call this member function to create a modeless dialog box from a dialog-box template in memory.
The CreateIndirect member function returns immediately after it creates the dialog box.
Use the WS_VISIBLE style in the dialog-box template if the dialog box should appear when the parent window is created. Otherwise, you must call ShowWindow to cause it to appear. For more information on how you can specify other dialog-box styles in the template, see the structure in the Win32 SDK documentation.
Use the CWnd::DestroyWindow function to destroy a dialog box created by the CreateIndirect function.
CDialog Overview | Class Members | Hierarchy Chart
See Also CDialog::CDialog, CWnd::DestroyWindow, CDialog::Create,