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.

525 lines
20 KiB

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