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.

524 lines
20 KiB

  1. #ifndef _MENUBAND_H_
  2. #define _MENUBAND_H_
  3. #include "bands.h"
  4. #include "mnbase.h"
  5. #include "fadetsk.h"
  6. #include "legacy.h"
  7. #define CGID_MenuBand CLSID_MenuBand
  8. // Flags for MBANDCID_POPUPITEM
  9. #define MBPUI_SETITEM 0x00001
  10. #define MBPUI_INITIALSELECT 0x00002
  11. #define MBPUI_ITEMBYPOS 0x00004
  12. #ifdef STARTMENUSPLIT
  13. // Flags for constructor
  14. #define MENUBAND_HORIZ 0x00000001
  15. #define MENUBAND_TOPLEVEL 0x00000002
  16. #endif
  17. // Special indices for MBANDCID_SELECTITEM
  18. #define MBSI_FIRSTITEM 0
  19. #define MBSI_NONE -1
  20. #define MBSI_LASTITEM -2
  21. // This arrow is used when we are in Right-To-Left Mirror mode
  22. #define CH_MENUARROWRTLA '3'
  23. // Forward declare
  24. struct CMBMsgFilter;
  25. // Define this to get Shell Expando menu style
  26. // Undefine to get "Office IntelliMenu" style
  27. //#define DRAWEDGE
  28. // The CMenuBand class handles all menu behavior for bands.
  29. class CMenuBandMetrics : public IUnknown
  30. {
  31. public:
  32. // *** IUnknown methods ***
  33. STDMETHODIMP_(ULONG) AddRef(void);
  34. STDMETHODIMP_(ULONG) Release(void);
  35. STDMETHODIMP QueryInterface(REFIID riid, LPVOID * ppvObj);
  36. HFONT _CalcFont(HWND hwnd, LPCTSTR pszFont, DWORD dwCharSet, TCHAR ch, int* pcx,
  37. int* pcy, int* pcxMargin, int iOrientation, int iWeight);
  38. void _SetMenuFont(); // (Called for TopLevMBand only) Sets: _hFontMenu
  39. void _SetArrowFont(HWND hwnd); // (Called for TopLevMBand only) Sets: _hFontArrow, _cyArrow
  40. void _SetChevronFont(HWND hwnd);
  41. void _SetTextBrush(HWND hwnd);
  42. #ifndef DRAWEDGE
  43. void _SetPaintMetrics(HWND hwnd);
  44. #endif
  45. void _SetColors();
  46. int _cyArrow; // Height of cascade arrow
  47. int _cxArrow; // Width of cascade arrow
  48. int _cxMargin; // Margin b/t text and arrow
  49. int _cyChevron;
  50. int _cxChevron;
  51. int _cxChevronMargin;
  52. HCURSOR _hCursorOld; // Cursor that was in use prior to entering menu mode
  53. HFONT _hFontMenu; // Font for menu text
  54. HFONT _hFontArrow; // Correct sized Marlett font for cascade arrow
  55. HFONT _hFontChevron;
  56. HBRUSH _hbrText;
  57. #ifndef DRAWEDGE
  58. HPEN _hPenHighlight; // Pen for BTNHIGHLIGHT
  59. HPEN _hPenShadow; // Pen for BTNSHADOW
  60. #endif
  61. COLORREF _clrBackground;
  62. COLORREF _clrDemoted;
  63. COLORREF _clrMenuText;
  64. BITBOOL _fHighContrastMode; // Accessibility
  65. CMenuBandMetrics(HWND hwnd);
  66. private:
  67. ~CMenuBandMetrics();
  68. ULONG _cRef;
  69. };
  70. class CMenuBandState
  71. {
  72. // Global State Variables
  73. BYTE _fsUEMState;
  74. BOOL _fKeyboardCue;
  75. CFadeTask* _ptFader;
  76. IShellTaskScheduler* _pScheduler;
  77. HWND _hwndSubclassed;
  78. HWND _hwndToolTip;
  79. HWND _hwndWorker;
  80. void* _pvContext;
  81. // Bits
  82. BITBOOL _fExpand: 1;
  83. BITBOOL _fContainsDrag: 1;
  84. BITBOOL _fTipShown: 1;
  85. BITBOOL _fBalloonStyle: 1;
  86. int _cChangeNotify;
  87. // This will, in the future, contain the menuband stack
  88. public:
  89. CMenuBandState();
  90. virtual ~CMenuBandState();
  91. // Set/Get the expand state for new popups.
  92. BOOL GetExpand() { return (BOOL)_fExpand; };
  93. void SetExpand(BOOL fExpand) { _fExpand = BOOLIFY(fExpand);};
  94. BYTE GetUEMState() { return _fsUEMState; };
  95. void SetUEMState(BYTE bState) { _fsUEMState = bState; };
  96. BOOL GetKeyboardCue();
  97. void SetKeyboardCue(int iKC);
  98. BOOL HasDrag() { return _fContainsDrag; };
  99. void HasDrag(BOOL fHasDrag) { _fContainsDrag = BOOLIFY(fHasDrag); };
  100. void SetSubclassedHWND(HWND hwndSubclassed)
  101. { _hwndSubclassed = hwndSubclassed; };
  102. HWND GetSubclassedHWND() { return _hwndSubclassed; };
  103. HWND GetWorkerWindow(HWND hwndParent);
  104. void PushChangeNotify() { ++_cChangeNotify; };
  105. void PopChangeNotify() { --_cChangeNotify; };
  106. BOOL IsProcessingChangeNotify() { return _cChangeNotify != 0; };
  107. // Context Stuff
  108. // a menuband context is used for the global message filter. Since we may have
  109. // more than one menu present in the system, there is a race condition that can occur
  110. // where the menu in one thread tries to pop off it's menus, when a menuband in another thread
  111. // tries to push them on. Through the use of a context, we can know when this is happening and
  112. // make sure that we pop all of the menus of one context before pushing from another.
  113. // - lamadio 9.15.98
  114. void SetContext(void* pvContext) {_pvContext = pvContext;};
  115. void* GetContext() { return _pvContext;};
  116. // Fade Stuff
  117. BOOL FadeRect(PRECT prc, PFNFADESCREENRECT pfn, LPVOID pvParam);
  118. void CreateFader(HWND hwnd);
  119. IShellTaskScheduler* GetScheduler();
  120. // Chevron Tip Stuff
  121. void CenterOnButton(HWND hwndTB, BOOL fBalloon, int idCmd, LPTSTR pszTitle, LPTSTR szTip);
  122. void HideTooltip(BOOL fAllowBalloonCollapse);
  123. void PutTipOnTop();
  124. };
  125. interface IShellMenuAcc: public IUnknown
  126. {
  127. // *** IShellMenuAcc methods ***
  128. STDMETHOD(GetTop)(THIS_ CMenuToolbarBase** ppmtbTop) PURE;
  129. STDMETHOD(GetBottom)(THIS_ CMenuToolbarBase** ppmtbBottom) PURE;
  130. STDMETHOD(GetTracked)(THIS_ CMenuToolbarBase** ppmtbTracked) PURE;
  131. STDMETHOD(GetParentSite)(THIS_ REFIID riid, void** ppvObj) PURE;
  132. STDMETHOD(GetState)(THIS_ BOOL* pfVertical, BOOL* pfOpen) PURE;
  133. STDMETHOD(DoDefaultAction)(THIS_ VARIANT* pvarChild) PURE;
  134. STDMETHOD(GetSubMenu)(THIS_ VARIANT* pvarChild, REFIID riid, void** ppvObj) PURE;
  135. STDMETHOD(IsEmpty)() PURE;
  136. };
  137. // {FAF6FE96-CE5E-11d1-8371-00C04FD918D0}
  138. DEFINE_GUID(IID_IShellMenuAcc, 0xfaf6fe96, 0xce5e, 0x11d1, 0x83, 0x71, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0xd0);
  139. class CMenuBand : public CToolBand,
  140. public IMenuPopup,
  141. public IMenuBand,
  142. public IShellMenu2,
  143. public IWinEventHandler,
  144. public IShellMenuAcc
  145. {
  146. // REVIEW (lamadio): I don't like this. Should I make these nested classes?
  147. friend class CMenuToolbarBase;
  148. friend class CMenuSFToolbar;
  149. friend class CMenuStaticToolbar;
  150. friend struct CMBMsgFilter;
  151. public:
  152. // *** IUnknown ***
  153. virtual STDMETHODIMP_(ULONG) AddRef(void)
  154. { return CToolBand::AddRef(); };
  155. virtual STDMETHODIMP_(ULONG) Release(void)
  156. { return CToolBand::Release(); };
  157. virtual STDMETHODIMP QueryInterface(REFIID riid, LPVOID * ppvObj);
  158. // *** IDockingWindow methods (override) ***
  159. virtual STDMETHODIMP ShowDW(BOOL fShow);
  160. virtual STDMETHODIMP CloseDW(DWORD dw);
  161. // *** IInputObject methods (override) ***
  162. virtual STDMETHODIMP TranslateAcceleratorIO(LPMSG lpMsg);
  163. virtual STDMETHODIMP HasFocusIO();
  164. virtual STDMETHODIMP UIActivateIO(BOOL fActivate, LPMSG lpMsg);
  165. // *** IOleWindow methods ***
  166. virtual STDMETHODIMP GetWindow(HWND * phwnd);
  167. virtual STDMETHODIMP ContextSensitiveHelp(BOOL bEnterMode);
  168. // *** IServiceProvider methods ***
  169. virtual STDMETHODIMP QueryService(REFGUID guidService, REFIID riid, LPVOID* ppvObj);
  170. // *** IDeskBar methods ***
  171. virtual STDMETHODIMP SetClient(IUnknown* punk) { return E_NOTIMPL; };
  172. virtual STDMETHODIMP GetClient(IUnknown** ppunkClient) { return E_NOTIMPL; };
  173. virtual STDMETHODIMP OnPosRectChangeDB (LPRECT prc);
  174. // *** IDeskBand methods ***
  175. virtual STDMETHODIMP GetBandInfo(DWORD dwBandID, DWORD fViewMode,
  176. DESKBANDINFO* pdbi);
  177. // *** IMenuPopup methods ***
  178. virtual STDMETHODIMP OnSelect(DWORD dwSelectType);
  179. virtual STDMETHODIMP SetSubMenu(IMenuPopup* pmp, BOOL fSet);
  180. virtual STDMETHODIMP Popup(POINTL *ppt, RECTL *prcExclude, DWORD dwFlags) { return E_NOTIMPL; };
  181. // *** IMenuBand methods ***
  182. virtual STDMETHODIMP IsMenuMessage(MSG * pmsg);
  183. virtual STDMETHODIMP TranslateMenuMessage(MSG * pmsg, LRESULT * plRet);
  184. // *** IShellMenu methods ***
  185. virtual STDMETHODIMP Initialize(IShellMenuCallback* psmc, UINT uId, UINT uIdAncestor, DWORD dwFlags);
  186. virtual STDMETHODIMP GetMenuInfo(IShellMenuCallback** ppsmc, UINT* puId,
  187. UINT* puIdAncestor, DWORD* pdwFlags);
  188. virtual STDMETHODIMP SetShellFolder(IShellFolder* psf, LPCITEMIDLIST pidlFolder, HKEY hkey, DWORD dwFlags);
  189. virtual STDMETHODIMP GetShellFolder(DWORD* pdwFlags, LPITEMIDLIST* ppidl, REFIID riid, void** ppvObj);
  190. virtual STDMETHODIMP SetMenu(HMENU hmenu, HWND hwnd, DWORD dwFlags);
  191. virtual STDMETHODIMP GetMenu(HMENU* phmenu, HWND* phwnd, DWORD* pdwFlags);
  192. virtual STDMETHODIMP InvalidateItem(LPSMDATA psmd, DWORD dwFlags);
  193. virtual STDMETHODIMP GetState(LPSMDATA psmd);
  194. virtual STDMETHODIMP SetMenuToolbar(IUnknown* punk, DWORD dwFlags);
  195. // *** IShellMenu2 methods ***
  196. virtual STDMETHODIMP GetSubMenu(UINT idCmd, REFIID riid, LPVOID *ppvObj);
  197. virtual STDMETHODIMP SetToolbar(HWND hwnd, DWORD dwFlags);
  198. virtual STDMETHODIMP SetMinWidth(int cxMenu);
  199. virtual STDMETHODIMP SetNoBorder(BOOL fNoBorder);
  200. virtual STDMETHODIMP SetTheme(LPCWSTR pszTheme);
  201. // ** IPersist ***
  202. virtual STDMETHODIMP GetClassID(CLSID*) { return E_NOTIMPL; };
  203. virtual STDMETHODIMP Load(IStream*) { return E_NOTIMPL; };
  204. virtual STDMETHODIMP Save(IStream*, BOOL) { return E_NOTIMPL; };
  205. // ** IWinEventHandler ***
  206. virtual STDMETHODIMP IsWindowOwner(HWND hwnd);
  207. virtual STDMETHODIMP OnWinEvent(HWND hwnd, UINT dwMsg, WPARAM wParam, LPARAM lParam, LRESULT* plres);
  208. // *** IObjectWithSite methods ***
  209. virtual STDMETHODIMP SetSite(IUnknown* punkSite);
  210. // *** IOleCommandTarget ***
  211. virtual STDMETHODIMP Exec(const GUID *pguidCmdGroup,
  212. DWORD nCmdID, DWORD nCmdexecopt, VARIANTARG *pvarargIn,
  213. VARIANTARG *pvarargOut);
  214. // *** IShellMenuAcc ***
  215. virtual STDMETHODIMP GetTop(CMenuToolbarBase** ppmtbTop);
  216. virtual STDMETHODIMP GetBottom(CMenuToolbarBase** ppmtbBottom);
  217. virtual STDMETHODIMP GetTracked(CMenuToolbarBase** ppmtbTracked);
  218. virtual STDMETHODIMP GetParentSite(REFIID riid, void** ppvObj);
  219. virtual STDMETHODIMP GetState(BOOL* pfVertical, BOOL* pfOpen);
  220. virtual STDMETHODIMP DoDefaultAction(VARIANT* pvarChild);
  221. virtual STDMETHODIMP GetSubMenu(VARIANT* pvarChild, REFIID riid, void** ppvObj);
  222. virtual STDMETHODIMP IsEmpty();
  223. // Other methods
  224. LRESULT GetMsgFilterCB(MSG * pmsg, BOOL bRemove);
  225. inline BOOL IsInSubMenu(void) { return _fInSubMenu; };
  226. inline DWORD GetFlags() {return _dwFlags; };
  227. // Other public methods
  228. void ResizeMenuBar(); // Make our parent menubar resize
  229. void SetTrackMenuPopup(IUnknown* punk);
  230. HRESULT ForwardChangeNotify(LONG lEvent, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2); // Change notify Forwarder.
  231. CMenuBand();
  232. BOOL SetTracked(CMenuToolbarBase* pmtb);
  233. #ifdef UNIX
  234. BOOL RemoveTopLevelFocus();
  235. #endif
  236. private:
  237. friend HRESULT CMenuBand_CreateInstance(IUnknown * punkOuter, IUnknown ** ppunk, LPCOBJECTINFO poi);
  238. friend CMenuBand * CMenuBand_Create(IShellFolder * psf, LPCITEMIDLIST pidl, BOOL bTopLevel);
  239. friend VOID CALLBACK CMenuBand_TimerProc( HWND hwnd, UINT uMsg, UINT idEvent, DWORD dwTime );
  240. virtual ~CMenuBand();
  241. void _Initialize(DWORD dwFlags);// Flags are MENUBAND_*
  242. HRESULT _EnterMenuMode(void);
  243. void _ExitMenuMode(void);
  244. void _GetFontMetrics(); // (Called for non-TopLevelMBands) Uses IUnk_QS to set
  245. // _hFontMenu, _hFontArrow, _cyArrow based on TopLevel's values
  246. void _CancelMode(DWORD dwType);
  247. void _AddToolbar(CMenuToolbarBase* pmtb, DWORD dwFlags);
  248. HRESULT _SiteOnSelect(DWORD dwType);
  249. HRESULT _SubMenuOnSelect(DWORD dwType);
  250. HRESULT _OnSysChar(MSG * pmsg, BOOL bFirstDibs);
  251. HRESULT _HandleAccelerators(MSG * pmsg);
  252. HRESULT _SiteSetSubMenu(IMenuPopup * pmp, BOOL bSet);
  253. void _OnSelectArrow(int iDir);
  254. void _UpdateButtons();
  255. HRESULT _CallCB(DWORD dwMsg, WPARAM wParam = 0, LPARAM lParam = 0);
  256. HRESULT _ProcessMenuPaneMessages(MSG* pmsg);
  257. // Member variables
  258. int _nItemCur; // Current item selected
  259. int _nItemNew; // New item to be selected/expanded
  260. int _nItemTimer; // the timer id for popping up cascading menus
  261. int _nItemMove; // Current item being moved
  262. int _nItemSubMenu; // item that's cascaded
  263. HWND _hwndFocusPrev;
  264. HWND _hwndParent;
  265. CMenuToolbarBase* _pmtbMenu; // The static menu toolbar
  266. // (may be pmtbTop or pmtbBottom)
  267. CMenuToolbarBase* _pmtbShellFolder; // Non-menu toolbar (shellfolder or other)
  268. // (may be pmtbTop or pmtbBottom)
  269. CMenuToolbarBase* _pmtbTop; // The top toolbar
  270. CMenuToolbarBase* _pmtbBottom; // The bottom toolbar (may be == pmtbTop)
  271. CMenuToolbarBase* _pmtbTracked; // This is transient, may be pmtbTop or pmtbBottom
  272. IAugmentedShellFolder2* _pasf2;
  273. UINT _uId; // Id of this band (Derived from the item that poped it up)
  274. UINT _uIdAncestor; // Id of the top most menu item.
  275. HMENU _hmenu;
  276. HWND _hwndMenuOwner;
  277. DWORD _dwMenuFlags;
  278. CMenuBandState* _pmbState; // Menu Band global state
  279. CMenuBandMetrics* _pmbm;
  280. IShellMenuCallback* _psmcb; // Callback Mechanism
  281. HCURSOR _hCursorOld;
  282. DWORD _dwFlags;
  283. UINT _uIconSize;
  284. IMenuPopup* _pmpSubMenu; // Cached submenu
  285. IMenuPopup* _pmpTrackPopup; // BUGBUG: Find a way to use only menubands.
  286. void* _pvUserData; // User associated data.
  287. BITBOOL _fTopLevel: 1; // TRUE: this is the toplevel parent menu
  288. // (may be vertical for context menus)
  289. BITBOOL _fMenuMode: 1; // TRUE: we are in menu mode
  290. BITBOOL _fPopupNewMenu: 1; // TRUE: popup a new menu (_nItemNew)
  291. // once done with current menu
  292. BITBOOL _fInitialSelect: 1; // TRUE: select first item when popping up submenu
  293. BITBOOL _fInSubMenu: 1; // TRUE: currently in a submenu
  294. BITBOOL _fAltSpace: 1; // TRUE: Alt-space was hit
  295. BITBOOL _fMenuFontCreated: 1; // TRUE: This instance created the font and should delete it
  296. BITBOOL _fArrowFontCreated: 1; // TRUE: This instance created the font and should delete it
  297. BITBOOL _fEmpty: 1; // TRUE: Menu is empty
  298. BITBOOL _fParentIsNotASite: 1;
  299. BITBOOL _fKeyboardSelected: 1;
  300. BITBOOL _fInvokedByDrag: 1; // TRUE: the menu cascaded open b/c of drag/drop
  301. BITBOOL _fDragEntered : 1;
  302. BITBOOL _fSysCharHandled: 1; // TRUE: WM_SYSCHAR was already handled
  303. BITBOOL _fHasSubMenu:1;
  304. BITBOOL _fAppActive:1; // TRUE: The Menus should be drawn using Memphis' grey menu.
  305. BITBOOL _fVertical: 1;
  306. BITBOOL _fShow : 1;
  307. BITBOOL _fClosing: 1; // TRUE: When CloseDW is called.
  308. BITBOOL _fForceButtonUpdate: 1; // TRUE: Force a v_UpdateButtons.
  309. BITBOOL _fProcessingDup: 1; // TRUE: when the contained classes are processing Dup chars.
  310. BITBOOL _fExpanded: 1; // TRUE: This band is expanded
  311. BITBOOL _fCascadeAnimate: 1;
  312. BITBOOL _fPopupNewItemOnShow: 1; // Causes _nItemNew to be displayed at ShowDW time.
  313. BITBOOL _fParentIsHorizontal: 1;
  314. #ifdef DEBUG
  315. BITBOOL _fInitialized: 1;
  316. #endif
  317. DEBUG_CODE( int _nMenuLevel; )
  318. };
  319. CMenuBand * CMenuBand_Create(IShellFolder * psf, LPCITEMIDLIST pidl, BOOL bHorizontal);
  320. int MsgFilter_GetCount();
  321. HRESULT IUnknown_BandChildSetKey(IUnknown* punk, HKEY hKey);
  322. // The message filter redirects messages to the menuband
  323. // that is at the top of the stack. Each additional cascade
  324. // pushes the new menuband onto the stack, and a cancel-level
  325. // pops one off.
  326. typedef struct tagMBELEM
  327. {
  328. CMenuBand * pmb;
  329. HWND hwndTB;
  330. HWND hwndBar;
  331. RECT rc; // rect of hwndBar
  332. BITBOOL bInitRect: 1; // TRUE: rc is initialized
  333. } MBELEM;
  334. #define CMBELEM_INIT 10
  335. #define CMBELEM_GROW 10
  336. struct CMBMsgFilter
  337. {
  338. public:
  339. HHOOK _hhookMsg;
  340. HWND _hwndCapture;
  341. FDSA _fdsa; // Stack
  342. MBELEM _rgmbelem[CMBELEM_INIT];
  343. BITBOOL _fPreventCapture : 1;
  344. BITBOOL _fInitialized: 1;
  345. BITBOOL _fSetAtPush: 1;
  346. BITBOOL _fDontIgnoreSysChar: 1;
  347. BITBOOL _fEngaged: 1;
  348. BITBOOL _fModal: 1;
  349. BITBOOL _fAllocated: 1;
  350. POINT _ptLastMove;
  351. CMenuBand* _pmb;
  352. int _iSysCharStack;
  353. void* _pvContext;
  354. HCURSOR _hcurArrow;
  355. int _cRef;
  356. DEBUG_CODE( int _nMenuLevel; )
  357. void AddRef();
  358. void Release();
  359. void ForceModalCollapse();
  360. void SetModal(BOOL fModal); // This is so that
  361. // a modal message band (Links)
  362. // sets activation correctly.
  363. void* GetContext() { return _pvContext; };
  364. void SetContext(void* pvContext, BOOL fSet);
  365. void Push(void* pvContext, CMenuBand * pmb, IUnknown * punkSite);
  366. int Pop(void* pvContext);
  367. void RetakeCapture(void);
  368. void AcquireMouseLocation() { GetCursorPos(&_ptLastMove); };
  369. void ReEngage(void* pvContext);
  370. void DisEngage(void* pvContext);
  371. BOOL IsEngaged() { return _fEngaged;};
  372. CMenuBand * _GetBottomMostSelected(void);
  373. CMenuBand * _GetTopPtr(void);
  374. CMenuBand * _GetWindowOwnerPtr(HWND hwnd);
  375. CMenuBand * _HitTest(POINT pt, HWND * phwnd = NULL);
  376. LRESULT _HandleMouseMsgs(MSG * pmsg, BOOL bRemove);
  377. int GetCount();
  378. void PreventCapture(BOOL bSet) { _fPreventCapture = BOOLIFY(bSet); }
  379. CMenuBand * GetTopMostPtr(void) { return _pmb; };
  380. void SetTopMost(CMenuBand* pmb) {_pmb = pmb; };
  381. void SetHook(BOOL fSet, BOOL fIgnoreSysChar);
  382. static LRESULT CALLBACK GetMsgHook(int nCode, WPARAM wParam, LPARAM lParam);
  383. //private:
  384. };
  385. CMBMsgFilter* GetMessageFilter();
  386. extern CMBMsgFilter g_msgfilter;
  387. extern UINT g_nMBPopupOpen;
  388. extern UINT g_nMBFullCancel;
  389. extern UINT g_nMBDragCancel;
  390. extern UINT g_nMBAutomation;
  391. extern UINT g_nMBExecute;
  392. extern UINT g_nMBOpenChevronMenu;
  393. extern long g_lMenuPopupTimeout;
  394. #define MBTIMER_POPOUT 0x00008001 // event ID for popout menu timer
  395. #define MBTIMER_DRAGOVER 0x00008002 // event ID for popout menu timer
  396. #define MBTIMER_EXPAND 0x00008003
  397. #define MBTIMER_TIMEOUT (GetDoubleClickTime() * 4 / 5) // same formula that USER uses
  398. #define MBTIMER_ENDEDIT 0x00008004
  399. #define MBTIMER_ENDEDITTIME 1000
  400. #define MBTIMER_CLOSE 0x00008005
  401. #define MBTIMER_CLOSETIME 2000
  402. #define MBTIMER_CLICKUNHANDLE 0x00008006
  403. // Flashing Support
  404. #define MBTIMER_FLASH 0x00008007
  405. #define MBTIMER_FLASHTIME 100
  406. #define COUNT_ENDFLASH 8
  407. // UEM Profiling.
  408. #define MBTIMER_UEMTIMEOUT 0x00008008
  409. #define MBTIMER_DRAGPOPDOWN 0x00008009
  410. #define MBTIMER_DRAGPOPDOWNTIMEOUT (2 * GetDoubleClickTime()) //ASSERT(MBTIMER_DRAGPOPDOWNTIMEOUT >
  411. // MBTIMER_TIMEOUR)
  412. #define MBTIMER_CHEVRONTIP 0x0000800A
  413. #define MBTIMER_INFOTIP 0x0000800B
  414. #define CH_RETURN 0xd
  415. #define szfnMarlett TEXT("MARLETT")
  416. #endif // _MENUBAND_H_