www.pudn.com > holder.zip > MySite.h


 
#include "stdafx.h" 
 
 
//SAMPLE: our replacement control site does nothing but offer an implementation 
// of IDocHostUIHandler. The class implementation, then, provides a constructor 
// and the interface map. We also have a couple of members that handle the 
// actual implementation of IDocHostUIHAndler::GetExternal() for us, but that's 
// that! 
 
class CMySite : public COleControlSite 
{ 
public: 
	CMySite(COleControlContainer* pCtrlCont); 
 
	LPUNKNOWN GetInterfaceHook(const void* piid); 
 
	BEGIN_INTERFACE_PART(DocHostUIHandler, IDocHostUIHandler) 
		INIT_INTERFACE_PART(CMySite, DocHostUIHandler) 
		STDMETHOD(ShowContextMenu)(unsigned long, LPPOINT, LPUNKNOWN, LPDISPATCH); 
		STDMETHOD(GetHostInfo)(struct _DOCHOSTUIINFO *); 
		STDMETHOD(ShowUI)(unsigned long, LPOLEINPLACEACTIVEOBJECT, 
			LPOLECOMMANDTARGET, LPOLEINPLACEFRAME, LPOLEINPLACEUIWINDOW); 
		STDMETHOD(HideUI)(void); 
		STDMETHOD(UpdateUI)(void); 
		STDMETHOD(EnableModeless)(int); 
		STDMETHOD(OnDocWindowActivate)(int); 
		STDMETHOD(OnFrameWindowActivate)(int); 
		STDMETHOD(ResizeBorder)(LPCRECT, LPOLEINPLACEUIWINDOW, int); 
		STDMETHOD(TranslateAcceleratorA)(LPMSG , const struct _GUID *, unsigned long); 
		STDMETHOD(GetOptionKeyPath)(unsigned short **, unsigned long); 
		STDMETHOD(GetDropTarget)(LPDROPTARGET, LPDROPTARGET*); 
		STDMETHOD(GetExternal)(LPDISPATCH*); 
		STDMETHOD(TranslateUrl)(unsigned long, unsigned short *, unsigned short ** ); 
		STDMETHOD(FilterDataObject)(LPDATAOBJECT , LPDATAOBJECT*); 
	END_INTERFACE_PART(DocHostUIHandler) 
 
//	DECLARE_INTERFACE_MAP() 
};