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_COMMENU_H__CF7CC23F_25E1_48A8_8957_B1787AF67599__INCLUDED_)
00023 #define AFX_COMMENU_H__CF7CC23F_25E1_48A8_8957_B1787AF67599__INCLUDED_
00024
00025 #pragma once
00026
00027
00028 class CComMenu : public CComObject
00029 {
00030
00031 public:
00032 CComMenu(HMENU hMenu, UINT nPosition = 0xFFFFFFFF);
00033 virtual ~CComMenu();
00034
00035
00036 public:
00037 HMENU m_hParent;
00038 HMENU m_hMenu;
00039 UINT m_nPosition;
00040
00041
00042 public:
00043 static ISMenu* Wrap(HMENU hMenu, UINT nPosition = 0xFFFFFFFF);
00044
00045
00046 protected:
00047 BEGIN_INTERFACE_PART(SMenu, ISMenu)
00048 DECLARE_DISPATCH()
00049 STDMETHOD(get_Application)(IApplication FAR* FAR* ppApplication);
00050 STDMETHOD(get_UserInterface)(IUserInterface FAR* FAR* ppUserInterface);
00051 STDMETHOD(get__NewEnum)(IUnknown FAR* FAR* ppEnum);
00052 STDMETHOD(get_Item)(VARIANT vIndex, ISMenu FAR* FAR* ppMenu);
00053 STDMETHOD(get_Count)(LONG FAR* pnCount);
00054 STDMETHOD(get_ItemType)(SMenuType FAR* pnType);
00055 STDMETHOD(get_CommandID)(LONG FAR* pnCommandID);
00056 STDMETHOD(put_CommandID)(LONG nCommandID);
00057 STDMETHOD(get_Text)(BSTR FAR* psText);
00058 STDMETHOD(put_Text)(BSTR sText);
00059 STDMETHOD(get_HotKey)(BSTR FAR* psText);
00060 STDMETHOD(put_HotKey)(BSTR sText);
00061 STDMETHOD(Remove)();
00062 STDMETHOD(InsertSeparator)(LONG nPosition);
00063 STDMETHOD(InsertMenu)(LONG nPosition, BSTR sText, ISMenu FAR* FAR* ppMenu);
00064 STDMETHOD(InsertCommand)(LONG nPosition, LONG nCommandID, BSTR sText, ISMenu FAR* FAR* ppMenu);
00065 END_INTERFACE_PART(SMenu)
00066
00067 BEGIN_INTERFACE_PART(EnumVARIANT, IEnumVARIANT)
00068 STDMETHOD(Next)(THIS_ DWORD celt, VARIANT FAR* rgvar, DWORD FAR* pceltFetched);
00069 STDMETHOD(Skip)(THIS_ DWORD celt);
00070 STDMETHOD(Reset)(THIS);
00071 STDMETHOD(Clone)(THIS_ IEnumVARIANT FAR* FAR* ppenum);
00072 UINT m_nIndex;
00073 END_INTERFACE_PART(EnumVARIANT)
00074
00075 DECLARE_INTERFACE_MAP()
00076
00077
00078 protected:
00079
00080
00081
00082
00083
00084 DECLARE_MESSAGE_MAP()
00085 };
00086
00087
00088
00089 #endif