www.pudn.com > ButtonMail0523.rar > YokButtonMail.h


// YokButtonMail.h: Definition of the CYokButtonMail class 
// 
////////////////////////////////////////////////////////////////////// 
 
#if !defined(AFX_YOKBUTTONMAIL_H__6A4E03FA_040D_49F7_B2ED_B96951F34205__INCLUDED_) 
#define AFX_YOKBUTTONMAIL_H__6A4E03FA_040D_49F7_B2ED_B96951F34205__INCLUDED_ 
 
#if _MSC_VER > 1000 
#pragma once 
#endif // _MSC_VER > 1000 
 
#include "resource.h"       // main symbols 
 
///////////////////////////////////////////////////////////////////////////// 
// CYokButtonMail 
 
class CYokButtonMail :  
	public IDispatchImpl,  
	public ISupportErrorInfo, 
	public CComObjectRoot, 
	public IOleCommandTarget,		// heng , 按钮插件必需提供此接口来响应鼠标单击事件	 
	public CComCoClass 
{ 
public: 
	CYokButtonMail() {} 
BEGIN_COM_MAP(CYokButtonMail) 
	COM_INTERFACE_ENTRY(IDispatch) 
	COM_INTERFACE_ENTRY(IYokButtonMail) 
	COM_INTERFACE_ENTRY(ISupportErrorInfo) 
	COM_INTERFACE_ENTRY(IOleCommandTarget)	 
END_COM_MAP() 
//DECLARE_NOT_AGGREGATABLE(CYokButtonMail)  
// Remove the comment from the line above if you don't want your object to  
// support aggregation.  
 
DECLARE_REGISTRY_RESOURCEID(IDR_YokButtonMail) 
// ISupportsErrorInfo 
	STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid); 
 
// IYokButtonMail 
public: 
 
	// IOleCommandTarget 
	STDMETHOD (Exec)(const GUID *pguidCmdGroup,DWORD nCmdID,DWORD nCmdExecOpt,VARIANTARG *pvaIn,VARIANTARG *pvaOut); 
	virtual HRESULT STDMETHODCALLTYPE QueryStatus(const GUID *pguidCmdGroup,ULONG cCmds,OLECMD prgCmds[  ],OLECMDTEXT *pCmdText) 
	{ 
		return E_FAIL ; 
	} 
	 
 
}; 
 
#endif // !defined(AFX_YOKBUTTONMAIL_H__6A4E03FA_040D_49F7_B2ED_B96951F34205__INCLUDED_)