Share via


CAxDialogImpl Class

This class implements a dialog box (modal or modeless) that hosts ActiveX controls.

Important

This class and its members cannot be used in applications that execute in the Windows Runtime.

template < 
class T, 
class TBase= CWindow 
> 
class ATL_NO_VTABLE CAxDialogImpl : 
public CDialogImplBaseT< TBase>

Parameters

  • T
    Your class, derived from CAxDialogImpl.

  • TBase
    The base window class for CDialogImplBaseT.

Members

Public Methods

Name

Description

CAxDialogImpl::AdviseSinkMap

Call this method to advise or unadvise all entries in the object's sink map event map.

CAxDialogImpl::Create

Call this method to create a modeless dialog box.

CAxDialogImpl::DestroyWindow

Call this method to destroy a modeless dialog box.

CAxDialogImpl::DoModal

Call this method to create a modal dialog box.

CAxDialogImpl::EndDialog

Call this method to destroy a modal dialog box.

CAxDialogImpl::GetDialogProc

Call this method to get a pointer to the DialogProc callback function.

CAxDialogImpl::GetIDD

Call this method to get the dialog template resource ID

CAxDialogImpl::IsDialogMessage

Call this method to determine whether a message is intended for this dialog box and, if it is, process the message.

Protected Data Members

Name

Description

CAxDialogImpl::m_bModal

A variable that exists only in debug builds and is set to true if the dialog box is modal.

Remarks

CAxDialogImpl allows you to create a modal or modeless dialog box. CAxDialogImpl provides the dialog box procedure, which uses the default message map to direct messages to the appropriate handlers.

CAxDialogImpl derives from CDialogImplBaseT, which in turn derives from TBase (by default, CWindow) and CMessageMap.

Your class must define an IDD member that specifies the dialog template resource ID. For example, adding an ATL Dialog object using the Add Class dialog box automatically adds the following line to your class:

enum { IDD = IDD_MYDLG };

where MyDialog is the Short name entered in the ATL Dialog Wizard.

See Implementing a Dialog Box for more information.

Note that an ActiveX control on a modal dialog box created with CAxDialogImpl will not support accelerator keys. To support accelerator keys on a dialog box created with CAxDialogImpl, create a modeless dialog box and, using your own message loop, use CAxDialogImpl::IsDialogMessage after getting a message from the queue to handle an accelerator key.

For more information on CAxDialogImpl, see ATL Control Containment FAQ.

Inheritance Hierarchy

CMessageMap

TBase

CWindowImplRoot

CDialogImplBaseT

CAxDialogImpl

Requirements

Header: atlwin.h

See Also

Reference

CDialogImpl Class

Other Resources

ATL Class Overview