PropPageCtrl.h
上传用户:lc8096
上传日期:2007-01-02
资源大小:40k
文件大小:3k
- // PropPageCtrl.h : Declaration of the CPropPageCtrl
- #ifndef __PROPPAGECTRL_H_
- #define __PROPPAGECTRL_H_
- #include "resource.h" // main symbols
- #include "CPPropPageATL.h"
- /////////////////////////////////////////////////////////////////////////////
- // CPropPageCtrl
- class ATL_NO_VTABLE CPropPageCtrl :
- public CComObjectRootEx<CComSingleThreadModel>,
- public CComCoClass<CPropPageCtrl, &CLSID_PropPageCtrl>,
- public CComControl<CPropPageCtrl>,
- public IDispatchImpl<IPropPageCtrl, &IID_IPropPageCtrl, &LIBID_PROPPAGEATLLib>,
- public IProvideClassInfo2Impl<&CLSID_PropPageCtrl, &DIID__DPropPageCtrlEvents, &LIBID_PROPPAGEATLLib>,
- public IPersistStreamInitImpl<CPropPageCtrl>,
- public IPersistStorageImpl<CPropPageCtrl>,
- public IQuickActivateImpl<CPropPageCtrl>,
- public IOleControlImpl<CPropPageCtrl>,
- public IOleObjectImpl<CPropPageCtrl>,
- public IOleInPlaceActiveObjectImpl<CPropPageCtrl>,
- public IViewObjectExImpl<CPropPageCtrl>,
- public IOleInPlaceObjectWindowlessImpl<CPropPageCtrl>,
- public IDataObjectImpl<CPropPageCtrl>,
- public ISpecifyPropertyPagesImpl<CPropPageCtrl>,
- public CProxy_DPropPageCtrlEvents<CPropPageCtrl>,
- public IConnectionPointContainerImpl<CPropPageCtrl>
- {
- public:
- CPropPageCtrl()
- {
-
- }
- DECLARE_REGISTRY_RESOURCEID(IDR_PROPPAGECTRL)
- BEGIN_CONNECTION_POINT_MAP(CPropPageCtrl)
- CONNECTION_POINT_ENTRY(DIID__DPropPageCtrlEvents)
- END_CONNECTION_POINT_MAP()
- BEGIN_COM_MAP(CPropPageCtrl)
- COM_INTERFACE_ENTRY(IPropPageCtrl)
- COM_INTERFACE_ENTRY(IDispatch)
- COM_INTERFACE_ENTRY_IMPL(IViewObjectEx)
- COM_INTERFACE_ENTRY_IMPL_IID(IID_IViewObject2, IViewObjectEx)
- COM_INTERFACE_ENTRY_IMPL_IID(IID_IViewObject, IViewObjectEx)
- COM_INTERFACE_ENTRY_IMPL(IOleInPlaceObjectWindowless)
- COM_INTERFACE_ENTRY_IMPL_IID(IID_IOleInPlaceObject, IOleInPlaceObjectWindowless)
- COM_INTERFACE_ENTRY_IMPL_IID(IID_IOleWindow, IOleInPlaceObjectWindowless)
- COM_INTERFACE_ENTRY_IMPL(IOleInPlaceActiveObject)
- COM_INTERFACE_ENTRY_IMPL(IOleControl)
- COM_INTERFACE_ENTRY_IMPL(IOleObject)
- COM_INTERFACE_ENTRY_IMPL(IQuickActivate)
- COM_INTERFACE_ENTRY_IMPL(IPersistStorage)
- COM_INTERFACE_ENTRY_IMPL(IPersistStreamInit)
- COM_INTERFACE_ENTRY_IMPL(ISpecifyPropertyPages)
- COM_INTERFACE_ENTRY_IMPL(IDataObject)
- COM_INTERFACE_ENTRY(IProvideClassInfo)
- COM_INTERFACE_ENTRY(IProvideClassInfo2)
- COM_INTERFACE_ENTRY_IMPL(IConnectionPointContainer)
- END_COM_MAP()
- BEGIN_PROPERTY_MAP(CPropPageCtrl)
- // Example entries
- // PROP_ENTRY("Property Description", dispid, clsid)
- PROP_PAGE(CLSID_PropPagePpg)
- END_PROPERTY_MAP()
- BEGIN_MSG_MAP(CPropPageCtrl)
- MESSAGE_HANDLER(WM_PAINT, OnPaint)
- MESSAGE_HANDLER(WM_SETFOCUS, OnSetFocus)
- MESSAGE_HANDLER(WM_KILLFOCUS, OnKillFocus)
- END_MSG_MAP()
- // IViewObjectEx
- STDMETHOD(GetViewStatus)(DWORD* pdwStatus)
- {
- ATLTRACE(_T("IViewObjectExImpl::GetViewStatusn"));
- *pdwStatus = VIEWSTATUS_SOLIDBKGND | VIEWSTATUS_OPAQUE;
- return S_OK;
- }
- // IPropPageCtrl
- public:
- STDMETHOD(Execute)();
- HRESULT OnDraw(ATL_DRAWINFO& di);
- };
- #endif //__PROPPAGECTRL_H_