www.pudn.com > ShortCutEx.rar > ShortCutToolBar.h, change:2004-07-30,size:3027b


//ShortCutToolBar.h : Declaration of the CShortCutToolBar 
 
//***************************************************************************// 
//                                                                           // 
//  This file was created using the DeskBand ATL Object Wizard 2.0           // 
//  By Erik Thompson  2001                                                  // 
//  Email questions and comments to erikt@radbytes.com						 // 
//                                                                           // 
//***************************************************************************// 
 
#ifndef __SHORTCUTTOOLBAR_H_ 
#define __SHORTCUTTOOLBAR_H_ 
 
#include "resource.h"       // main symbols 
 
// 
// These are needed for IDeskBand 
// 
 
#include <shlguid.h> 
#include <shlobj.h> 
#include "BkWnd.h" 
 
///////////////////////////////////////////////////////////////////////////// 
// CShortCutToolBar 
class ATL_NO_VTABLE CShortCutToolBar :  
	public CComObjectRootEx<CComSingleThreadModel>, 
	public CComCoClass<CShortCutToolBar, &CLSID_ShortCutToolBar>, 
	public IDeskBand, 
	public IObjectWithSite, 
	public IPersistStream, 
	public IDispatchImpl<IShortCutToolBar, &IID_IShortCutToolBar, &LIBID_SHORTCUTEXLib> 
{ 
public: 
	CShortCutToolBar(); 
 
DECLARE_REGISTRY_RESOURCEID(IDR_SHORTCUTTOOLBAR) 
 
DECLARE_PROTECT_FINAL_CONSTRUCT() 
 
BEGIN_CATEGORY_MAP(CShortCutToolBar) 
//	IMPLEMENTED_CATEGORY(CATID_InfoBand) 
//	IMPLEMENTED_CATEGORY(CATID_CommBand) 
//	IMPLEMENTED_CATEGORY(CATID_DeskBand) 
END_CATEGORY_MAP() 
 
BEGIN_COM_MAP(CShortCutToolBar) 
	COM_INTERFACE_ENTRY(IShortCutToolBar) 
	COM_INTERFACE_ENTRY(IOleWindow) 
	COM_INTERFACE_ENTRY_IID(IID_IDockingWindow, IDockingWindow) 
	COM_INTERFACE_ENTRY(IObjectWithSite) 
	COM_INTERFACE_ENTRY_IID(IID_IDeskBand, IDeskBand) 
	COM_INTERFACE_ENTRY(IPersist) 
	COM_INTERFACE_ENTRY(IPersistStream) 
	COM_INTERFACE_ENTRY(IDispatch) 
END_COM_MAP() 
 
// IDeskBand 
public: 
	STDMETHOD(GetBandInfo)(DWORD dwBandID, DWORD dwViewMode, DESKBANDINFO* pdbi); 
 
// IObjectWithSite 
public: 
	STDMETHOD(SetSite)(IUnknown* pUnkSite); 
	STDMETHOD(GetSite)(REFIID riid, void **ppvSite); 
 
// IOleWindow 
public: 
	STDMETHOD(GetWindow)(HWND* phwnd); 
	STDMETHOD(ContextSensitiveHelp)(BOOL fEnterMode); 
 
// IDockingWindow 
public: 
	STDMETHOD(CloseDW)(unsigned long dwReserved); 
	STDMETHOD(ResizeBorderDW)(const RECT* prcBorder, IUnknown* punkToolbarSite, BOOL fReserved); 
	STDMETHOD(ShowDW)(BOOL fShow); 
 
// IPersist 
public: 
	STDMETHOD(GetClassID)(CLSID *pClassID); 
 
// IPersistStream 
public: 
	STDMETHOD(IsDirty)(void); 
	STDMETHOD(Load)(IStream *pStm); 
	STDMETHOD(Save)(IStream *pStm, BOOL fClearDirty); 
	STDMETHOD(GetSizeMax)(ULARGE_INTEGER *pcbSize); 
 
// IShortCutToolBar 
public: 
 
protected: 
	BOOL RegisterAndCreateWindow(); 
protected: 
	DWORD m_dwBandID; 
	DWORD m_dwViewMode; 
	BOOL m_bShow; 
	BOOL m_bEnterHelpMode; 
	HWND m_hWndParent; 
	CBkWnd	m_ReflectWnd; 
	IInputObjectSite* m_pSite; 
	 
}; 
 
#endif //__SHORTCUTTOOLBAR_H_