Partager via


CDialogImpl::DoModal

Creates a modal dialog box.

INT_PTR DoModal(
   HWND hWndParent = ::GetActiveWindow( ), 
   LPARAM dwInitParam = NULL 
);

Parameters

  • hWndParent
    [in] The handle to the owner window. The default value is the return value of the GetActiveWindow Win32 function.

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

Return Value

If successful, the value of the nRetCode parameter specified in the call to EndDialog. Otherwise, -1.

Remarks

This dialog box is automatically attached to the CDialogImpl object.

To create a modeless dialog box, call Create.

Requirements

Header: atlwin.h

See Also

Concepts

CDialogImpl Class

CDialogImpl Members

CWindow::m_hWnd

CDialogImpl::EndDialog