Microsoft Foundation Classes (mfc.hlp) (
Table of Contents;
Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
CModalDialog::CreateIndirect
◄CModalDialog► ◄Up► ◄Contents► ◄Index► ◄Back►
──Microsoft Foundation Classes──────────────────────────────────────────────
BOOL CreateIndirect( HANDLE hDialogTemplate );
Parameter Description
<hDialogTemplate> Contains a resource handle to global memory containing
a dialog-box resource template. The template data
structure is of type DLGTEMPLATE, which identifies the
block of memory used as a dialog-box template.
Remarks
This member function uses a dialog resource constructed in memory to
initialize a modal dialog object. The resource has the form of a
DLGTEMPLATE structure. For more information on this structure, see the
Windows Software Development Kit documentation.
To create a modal dialog indirectly, first create a DLGTEMPLATE
structure in memory and retain a HANDLE to it. Then call the
CModalDialog constructor to construct the dialog object. In this case,
pass NULL for the first parameter to the constructor. Next, call
CreateIndirect to store your handle to the in-memory dialog template.
The Windows dialog is created and displayed later, when the ◄DoModal►
member function runs.
Return Value
TRUE if the dialog object was created and initialized successfully;
otherwise FALSE.
See Also
◄WM_INITDIALOG►, DLGTEMPLATE, ◄CWnd::DestroyWindow►,
◄CModalDialog::CModalDialog►
-♦-