xref: /MusicPlayer2/MusicPlayer2/MenuEditCtrl.h (revision de33a783f4de0e663019c2698196e1b32d056981)
1 #pragma once
2 #include "ColorConvert.h"
3 
4 
5 // CMenuEditCtrl
6 
7 class CMenuEditCtrl : public CMFCEditBrowseCtrl
8 {
9     DECLARE_DYNAMIC(CMenuEditCtrl)
10 
11 public:
12     CMenuEditCtrl();
13     virtual ~CMenuEditCtrl();
14     void SetTooltopText(const CString& tooltip_text);       //设置按钮上鼠标提示的文本
15 
16     virtual void OnBrowse() override;
17     virtual void OnDrawBrowseButton(CDC* pDC, CRect rect, BOOL bIsButtonPressed, BOOL bIsButtonHot) override;
18     virtual void OnChangeLayout()override;
19 
20 protected:
21     void UpdateToolTipPosition();        //更新鼠标提示的位置
22 
23     DECLARE_MESSAGE_MAP()
24 
25 private:
26     ColorTable& m_theme_color;
27     CToolTipCtrl m_tool_tip;
28     CString m_tooltip_text;     //按钮上鼠标提示的文本
29     CRect m_btn_rect;           //按钮的矩形区域
30 
31 public:
32     afx_msg void OnNcLButtonDown(UINT nHitTest, CPoint point);
33 protected:
34     afx_msg LRESULT OnTabletQuerysystemgesturestatus(WPARAM wParam, LPARAM lParam);
35     virtual void PreSubclassWindow();
36 public:
37     virtual BOOL PreTranslateMessage(MSG* pMsg);
38 };
39