00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #if !defined(AFX_COMTOOLBAR_H__CA9210C9_DDBF_4949_AB60_15FFBA51C859__INCLUDED_)
00023 #define AFX_COMTOOLBAR_H__CA9210C9_DDBF_4949_AB60_15FFBA51C859__INCLUDED_
00024
00025 #pragma once
00026
00027 class CCoolBarCtrl;
00028 class CCoolBarItem;
00029
00030
00031 class CComToolbar : public CComObject
00032 {
00033
00034 public:
00035 CComToolbar(CCoolBarCtrl* pBar, CCoolBarItem* pItem);
00036 virtual ~CComToolbar();
00037
00038
00039 public:
00040 CCoolBarCtrl* m_pBar;
00041 CCoolBarItem* m_pItem;
00042
00043
00044 public:
00045 static ISToolbar* Wrap(CCoolBarCtrl* pBar);
00046 static ISToolbarItem* Wrap(CCoolBarCtrl* pBar, CCoolBarItem* pItem);
00047
00048
00049 protected:
00050 BEGIN_INTERFACE_PART(SToolbar, ISToolbar)
00051 DECLARE_DISPATCH()
00052 STDMETHOD(get_Application)(IApplication FAR* FAR* ppApplication);
00053 STDMETHOD(get_UserInterface)(IUserInterface FAR* FAR* ppUserInterface);
00054 STDMETHOD(get__NewEnum)(IUnknown FAR* FAR* ppEnum);
00055 STDMETHOD(get_Item)(VARIANT vIndex, ISToolbarItem FAR* FAR* ppItem);
00056 STDMETHOD(get_Count)(LONG FAR* pnCount);
00057 STDMETHOD(InsertSeparator)(LONG nPosition);
00058 STDMETHOD(InsertButton)(LONG nPosition, LONG nCommandID, BSTR sText, ISToolbarItem FAR* FAR* ppItem);
00059 END_INTERFACE_PART(SToolbar)
00060
00061 BEGIN_INTERFACE_PART(SToolbarItem, ISToolbarItem)
00062 DECLARE_DISPATCH()
00063 STDMETHOD(get_Application)(IApplication FAR* FAR* ppApplication);
00064 STDMETHOD(get_UserInterface)(IUserInterface FAR* FAR* ppUserInterface);
00065 STDMETHOD(get_Toolbar)(ISToolbar FAR* FAR* ppToolbar);
00066 STDMETHOD(get_ItemType)(SToolbarType FAR* pnType);
00067 STDMETHOD(get_CommandID)(LONG FAR* pnCommandID);
00068 STDMETHOD(put_CommandID)(LONG nCommandID);
00069 STDMETHOD(get_Text)(BSTR FAR* psText);
00070 STDMETHOD(put_Text)(BSTR sText);
00071 STDMETHOD(Remove)();
00072 END_INTERFACE_PART(SToolbarItem)
00073
00074 BEGIN_INTERFACE_PART(EnumVARIANT, IEnumVARIANT)
00075 STDMETHOD(Next)(THIS_ DWORD celt, VARIANT FAR* rgvar, DWORD FAR* pceltFetched);
00076 STDMETHOD(Skip)(THIS_ DWORD celt);
00077 STDMETHOD(Reset)(THIS);
00078 STDMETHOD(Clone)(THIS_ IEnumVARIANT FAR* FAR* ppenum);
00079 UINT m_nIndex;
00080 END_INTERFACE_PART(EnumVARIANT)
00081
00082 DECLARE_INTERFACE_MAP()
00083
00084
00085 protected:
00086
00087
00088
00089
00090
00091 DECLARE_MESSAGE_MAP()
00092 };
00093
00094
00095
00096 #endif