CModalDialog::CModalDialog

Syntax

CModalDialog( const char FAR* lpTemplateName, CWnd* pParentWnd = NULL );

CModalDialog( UINT nIDTemplate, CWnd* pParentWnd = NULL );

Parameters

lpTemplateName

Contains a string that is the name of a dialog-box resource template.

pParentWnd

Points to the parent window object (of type CWnd) of the dialog object. If it is NULL, the dialog object's parent window is set to the main application window, as shown in the following code:

if( pParentWnd == NULL )

pParentWnd = AfxGetApp()->m_pMainWnd;

nIDTemplate

Contains a dialog resource template ID number.

Remarks

Provides two public constructors, with different argument signatures, to permit the construction of CModalDialog objects directly or from resource templates.

When you construct the dialog object to be used with CreateIndirect, pass NULL for the first parameter because there is no resource file template to be used in this case.

See Also

CModalDialog::CreateIndirect