用纯粹的C/C++编写ActiveX(非mfc/atl),该怎么处理
用纯粹的C/C++编写ActiveX(非mfc/atl)
谁有纯用c/c++编写ActiveX控件的源代码。
需要实现哪些com接口。
谢谢!
------解决方案--------------------
需要支持
IDispatch
IViewObjectEx
IViewObject2
IViewObject
IOleInPlaceObjectWindowless
IOleInPlaceObject
IOleWindow
IOleInPlaceActiveObject
IOleControl
IOleObject
IPersistStreamInit
IPersist
ISupportErrorInfo
ISpecifyPropertyPages
IQuickActivate
IPersistStorage
IProvideClassInfo
IProvideClassInfo2
这些接口
------解决方案--------------------
IOleControl and IOleControlSite
These interfaces extend the communication that usually occurs between a container and an object in OLE Documents for the purpose of handling control mnemonics, ambient properties, and extended controls:
interface IOleControl : IUnknown { HRESULT GetControlInfo(CONTROLINFO *pCtrlInfo); HRESULT OnMnemonic(LPMSG pMsg); HRESULT OnAmbientPropertyChange(DISPID dispID); HRESULT FreezeEvents(BOOL fFreeze); }interface IOleControlSite : public IUnknown { HRESULT OnControlInfoChanged(void); HRESULT LockInPlaceActive(BOOL fLock); HRESULT GetExtendedControl(IDispatch **pIDispatch); HRESULT TransformCoords(POINTL *ptlHimetric , POINTF *ptlContainer, DWORD dwFlags); HRESULT TranslateAccelerator(LPMSG pMsg, DWORD grfModifiers); HRESULT OnFocus(BOOL fGotFocus); HRESULT ShowPropertyFrame(void); }
这个就是书里面的内容!!
------解决方案--------------------
你有MSDN吗,在里面就有这本书及其例子
book: Books\Inside OLE
samples: Visual C++ Documentation\Samples\SDK Samples\Samples for Inside OLE
谁有纯用c/c++编写ActiveX控件的源代码。
需要实现哪些com接口。
谢谢!
------解决方案--------------------
需要支持
IDispatch
IViewObjectEx
IViewObject2
IViewObject
IOleInPlaceObjectWindowless
IOleInPlaceObject
IOleWindow
IOleInPlaceActiveObject
IOleControl
IOleObject
IPersistStreamInit
IPersist
ISupportErrorInfo
ISpecifyPropertyPages
IQuickActivate
IPersistStorage
IProvideClassInfo
IProvideClassInfo2
这些接口
------解决方案--------------------
IOleControl and IOleControlSite
These interfaces extend the communication that usually occurs between a container and an object in OLE Documents for the purpose of handling control mnemonics, ambient properties, and extended controls:
interface IOleControl : IUnknown { HRESULT GetControlInfo(CONTROLINFO *pCtrlInfo); HRESULT OnMnemonic(LPMSG pMsg); HRESULT OnAmbientPropertyChange(DISPID dispID); HRESULT FreezeEvents(BOOL fFreeze); }interface IOleControlSite : public IUnknown { HRESULT OnControlInfoChanged(void); HRESULT LockInPlaceActive(BOOL fLock); HRESULT GetExtendedControl(IDispatch **pIDispatch); HRESULT TransformCoords(POINTL *ptlHimetric , POINTF *ptlContainer, DWORD dwFlags); HRESULT TranslateAccelerator(LPMSG pMsg, DWORD grfModifiers); HRESULT OnFocus(BOOL fGotFocus); HRESULT ShowPropertyFrame(void); }
这个就是书里面的内容!!
------解决方案--------------------
你有MSDN吗,在里面就有这本书及其例子
book: Books\Inside OLE
samples: Visual C++ Documentation\Samples\SDK Samples\Samples for Inside OLE