// $impl_file$ : implementation file // #include "pch.h" [!if PROJECT_NAME_HEADER] #include "$projectname$.h" [!endif] #include "$header_file$" [!if CCOLORDIALOG || CFONTDIALOG || CPAGESETUPDIALOG || CPRINTDIALOG] #ifndef _WIN32_WCE // $base_class$ is not supported for Windows CE. [!endif] // $class_name$ [!if CREATABLE] IMPLEMENT_DYNCREATE($class_name$, $base_class$) [!else] IMPLEMENT_DYNAMIC($class_name$, $base_class$) [!endif] [!if CCOLORDIALOG] $class_name$::$class_name$(COLORREF clrInit, DWORD dwFlags, CWnd* pParentWnd) : CColorDialog(clrInit, dwFlags, pParentWnd) [!else] [!if CFILEDIALOG] $class_name$::$class_name$(BOOL bOpenFileDialog, LPCTSTR lpszDefExt, LPCTSTR lpszFileName, DWORD dwFlags, LPCTSTR lpszFilter, CWnd* pParentWnd) : CFileDialog(bOpenFileDialog, lpszDefExt, lpszFileName, dwFlags, lpszFilter, pParentWnd) [!else] [!if CFONTDIALOG] $class_name$::$class_name$(LPLOGFONT lplfInitial, DWORD dwFlags, CDC* pdcPrinter, CWnd* pParentWnd) : CFontDialog(lplfInitial, dwFlags, pdcPrinter, pParentWnd) [!else] [!if CPAGESETUPDIALOG] $class_name$::$class_name$(DWORD dwFlags /*= PSD_MARGINS | PSD_INWININIINTLMEASURE*/, CWnd* pParentWnd /*= nullptr*/) : CPageSetupDialog(dwFlags, pParentWnd) [!else] [!if CPRINTDIALOG] $class_name$::$class_name$(BOOL bPrintSetupOnly, DWORD dwFlags, CWnd* pParentWnd) : CPrintDialog(bPrintSetupOnly, dwFlags, pParentWnd) [!else] [!if CVSTOOLSLISTBOX] $class_name$::$class_name$(CMFCToolBarsToolsPropertyPage* pParent) : CVSToolsListBox(pParent) [!else] $class_name$::$class_name$() [!endif] [!endif] [!endif] [!endif] [!endif] [!endif] { [!if ACCESSIBILITY] #ifndef _WIN32_WCE EnableActiveAccessibility(); #endif [!endif] [!if AUTOMATION || CREATABLE] EnableAutomation(); [!endif] [!if CREATABLE] // To keep the application running as long as an OLE automation // object is active, the constructor calls AfxOleLockApp. AfxOleLockApp(); [!endif] } $class_name$::~$class_name$() { [!if CREATABLE] // To terminate the application when all objects created with // with OLE automation, the destructor calls AfxOleUnlockApp. AfxOleUnlockApp(); [!endif] } [!if AUTOMATION || CREATABLE] void $class_name$::OnFinalRelease() { // When the last reference for an automation object is released // OnFinalRelease is called. The base class will automatically // deletes the object. Add additional cleanup required for your // object before calling the base class. $base_class$::OnFinalRelease(); } [!endif] BEGIN_MESSAGE_MAP($class_name$, $base_class$) END_MESSAGE_MAP() [!if AUTOMATION || CREATABLE] BEGIN_DISPATCH_MAP($class_name$, $base_class$) END_DISPATCH_MAP() // Note: we add support for IID_I$class_name_root$ to support typesafe binding // from VBA. This IID must match the GUID that is attached to the // dispinterface in the .IDL file. // {$guid_dispiid$} static const IID IID_I$class_name_root$ = $guid_dispiid_staticconst$; BEGIN_INTERFACE_MAP($class_name$, $base_class$) INTERFACE_PART($class_name$, IID_I$class_name_root$, Dispatch) END_INTERFACE_MAP() [!endif] [!if CREATABLE] // {$guid_clsid$} IMPLEMENT_OLECREATE($class_name$, "$typeid$", $guid_clsid_olecreate$) [!endif] // $class_name$ message handlers [!if CCONTROLBAR] void $class_name$::OnUpdateCmdUI(CFrameWnd* /*pTarget*/, BOOL /*bDisableIfNoHndler*/) { } [!endif] [!if CCOLORDIALOG || CFONTDIALOG || CPAGESETUPDIALOG || CPRINTDIALOG] #endif // !_WIN32_WCE [!endif]