CAxDialogImpl::DoModal

Call this method to create 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 CAxDialogImpl object.

To create a modeless dialog box, call Create.

Requirements

Header: atlwin.h

See Also

Reference

CAxDialogImpl Class

CAxDialogImpl::EndDialog

CAxDialogImpl::Create

Other Resources

CAxDialogImpl Members