⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 atldiceprop.h

📁 控件的相用的实现利用MFC实现相拥的控件
💻 H
字号:
// Atldiceprop.h : Declaration of the CAtldiceprop

#ifndef __ATLDICEPROP_H_
#define __ATLDICEPROP_H_

#include "resource.h"       // main symbols

EXTERN_C const CLSID CLSID_Atldiceprop;

/////////////////////////////////////////////////////////////////////////////
// CAtldiceprop
class ATL_NO_VTABLE CAtldiceprop :
	public CComObjectRootEx<CComSingleThreadModel>,
	public CComCoClass<CAtldiceprop, &CLSID_Atldiceprop>,
	public IPropertyPageImpl<CAtldiceprop>,
	public CDialogImpl<CAtldiceprop>
{
public:
	CAtldiceprop() 
	{
		m_dwTitleID = IDS_TITLEAtldiceprop;
		m_dwHelpFileID = IDS_HELPFILEAtldiceprop;
		m_dwDocStringID = IDS_DOCSTRINGAtldiceprop;
	}

	enum {IDD = IDD_ATLDICEPROP};

DECLARE_REGISTRY_RESOURCEID(IDR_ATLDICEPROP)

DECLARE_PROTECT_FINAL_CONSTRUCT()

BEGIN_COM_MAP(CAtldiceprop) 
	COM_INTERFACE_ENTRY(IPropertyPage)
END_COM_MAP()

BEGIN_MSG_MAP(CAtldiceprop)
	CHAIN_MSG_MAP(IPropertyPageImpl<CAtldiceprop>)
END_MSG_MAP()
// Handler prototypes:
//  LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
//  LRESULT CommandHandler(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
//  LRESULT NotifyHandler(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);

	STDMETHOD(Apply)(void)
	{
		ATLTRACE(_T("CAtldiceprop::Apply\n"));
		for (UINT i = 0; i < m_nObjects; i++)
		{
			// Do something interesting here
			// ICircCtl* pCirc;
			// m_ppUnk[i]->QueryInterface(IID_ICircCtl, (void**)&pCirc);
			// pCirc->put_Caption(CComBSTR("something special"));
			// pCirc->Release();
		}
		m_bDirty = FALSE;
		return S_OK;
	}
};

#endif //__ATLDICEPROP_H_

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -