Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
2.4 KiB

  1. #ifndef CToolbarMenu_H
  2. #define CToolbarMenu_H
  3. #include "menuband.h"
  4. #include "mnbase.h"
  5. #include "cwndproc.h"
  6. #define TF_TBMENU 0
  7. class CToolbarMenu : public CMenuToolbarBase,
  8. public CNotifySubclassWndProc
  9. {
  10. public:
  11. // *** IUnknown (override) ***
  12. virtual STDMETHODIMP_(ULONG) AddRef(void) { return CMenuToolbarBase::AddRef(); };
  13. virtual STDMETHODIMP_(ULONG) Release(void) { return CMenuToolbarBase::Release(); };
  14. virtual STDMETHODIMP QueryInterface(REFIID riid, void** ppvObj) { return CMenuToolbarBase::QueryInterface(riid, ppvObj); };
  15. // *** IWinEventHandler methods (override) ***
  16. virtual STDMETHODIMP IsWindowOwner(HWND hwnd);
  17. virtual STDMETHODIMP OnWinEvent(HWND hwnd, UINT dwMsg, WPARAM wParam, LPARAM lParam, LRESULT *plres);
  18. virtual BOOL v_TrackingSubContextMenu() { return _fTrackingSubMenu; };
  19. virtual void v_Show(BOOL fShow, BOOL fForceUpdate) ;
  20. virtual BOOL v_UpdateIconSize(UINT uIconSize, BOOL fUpdateButtons) { return FALSE; };
  21. virtual void v_UpdateButtons(BOOL fNegotiateSize) ;
  22. virtual HRESULT v_GetSubMenu(int iCmd, const GUID* pguidService, REFIID riid, void** pObj) {return E_FAIL;};
  23. virtual HRESULT v_CallCBItem(int idtCmd, UINT dwMsg, WPARAM wParam, LPARAM lParam) ;
  24. virtual HRESULT v_GetState(int idtCmd, LPSMDATA psmd);
  25. virtual HRESULT v_ExecItem(int iCmd);
  26. virtual DWORD v_GetFlags(int iCmd) { return 0; };
  27. virtual void v_Close(); // override
  28. virtual int v_GetDragOverButton() { ASSERT(0); return 0;};
  29. virtual HRESULT v_GetInfoTip(int iCmd, LPTSTR psz, UINT cch) {return E_NOTIMPL;};
  30. virtual HRESULT v_CreateTrackPopup(int idCmd, REFIID riid, void** ppvObj) {ASSERT(0); return E_NOTIMPL;};
  31. virtual void v_Refresh() {/*ASSERT(0);*/};
  32. virtual void v_SendMenuNotification(UINT idCmd, BOOL fClear) {};
  33. CToolbarMenu(DWORD dwFlags, HWND hwndTB);
  34. protected:
  35. virtual STDMETHODIMP OnChange(LONG lEvent, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) { return E_NOTIMPL; }
  36. virtual LRESULT _DefWindowProc(HWND hwnd, UINT uMessage, WPARAM wParam, LPARAM lParam);
  37. virtual HRESULT CreateToolbar(HWND hwndParent);
  38. virtual void GetSize(SIZE* psize);
  39. void _CancelMenu();
  40. void _FillToolbar();
  41. HWND _hwndSubject;
  42. BITBOOL _fTrackingSubMenu:1;
  43. friend CMenuToolbarBase* ToolbarMenu_Create(HWND hwnd);
  44. };
  45. #endif