CDialogImpl Class

来源:互联网 发布:2017成都凶宅数据库 编辑:程序博客网 时间:2024/06/07 04:01
  我在AboutDlg这个类中接触到了这个ATL的用法
This class provides methods for creating a modal or modeless dialog box.
template <
class T,
class TBase = CWindow
>
class ATL_NO_VTABLE CDialogImpl :
public CDialogImplBaseT< TBase >

Parameters

T

Your class, derived from CDialogImpl.

TBase

The base class of your new class. The default base class is CWindow.


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

The base class destructor ~CWindowImplRoot ensures that the window is gone before destroying the object.

CDialogImpl derives from CDialogImplBaseT, which in turn derives from CWindowImplRoot.

NoteNote

Your class must define an IDDmember that specifies the dialog template resource ID. For example, theATL Project Wizard automatically adds the following line to your class:


enum { IDD = IDD_MYDIALOG };

where MyDialog is the Short name entered in the wizard's Names page.



原创粉丝点击