📄 toolbarctrl.h
字号:
#if !defined(AFX_TOOLBARCTRL_H__FE810709_BE93_4DEA_A380_E29023E089E7__INCLUDED_)#define AFX_TOOLBARCTRL_H__FE810709_BE93_4DEA_A380_E29023E089E7__INCLUDED_#if _MSC_VER > 1000#pragma once#endif // _MSC_VER > 1000// ToolBarCtrl.h : header file///////////////////////////////////////////////////////////////////////////////// RxToolBarCtrl window#define RX_TOOL_GAB 7#define RX_TOOL_SEPARATOR 7#define RXTBS1_WRAPPED 0x0010#define RXTBS1_VISIBLE 0x0001#define RXTBS1_DISABLE 0x0002#define RXTBS1_CHECKED 0x0004#define RXTBS2_NORMAL 0#define RXTBS2_FOCUS 1#define RXTBS2_SELECT 2typedef struct{ UINT nID; WORD wStatus[4]; // 2 : button width, 3 : button height} RX_TBBUTTON;class RxToolBarCtrl : public CWnd{// Constructionpublic: RxToolBarCtrl();// Attributesprivate: CPtrArray m_ArrayButton; CBitmap m_bmpNormal, m_bmpSelect, m_bmpDisable; int m_nMouseOverButton;// Operationspublic: BOOL LoadToolBar(UINT nIDResource, UINT nNBimapID, UINT nSBitmapID, UINT nDBitmapID); void RedrawWnd(); void DrawToolButton(int nIndex = -1); void DrawBitmapButton(CDC *pDC, CPoint ptOrg, CPoint ptSrc, CSize size, int nStatus); void SetButtonVisible(int nIndex, BOOL bShow, BOOL bRedraw = TRUE); BOOL GetButtonVisible(int nIndex); void SetButtonEnable(int nIndex, BOOL bEnable); BOOL GetButtonEnable(int nIndex); void SetButtonCheck(int nIndex, BOOL bCheck); int GetButtonCheck(int nIndex); RX_TBBUTTON* GetButton(int nIndex); int GetButtonCount(); int HitTest(CPoint point, LPRECT rect1 = NULL) const; void RemoveAllButton();// Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(RxToolBarCtrl) protected: virtual void PostNcDestroy(); //}}AFX_VIRTUAL virtual void OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler); virtual int OnToolHitTest(CPoint point, TOOLINFO* pTI) const;// Implementationpublic: virtual ~RxToolBarCtrl(); // Generated message map functionsprotected: //{{AFX_MSG(RxToolBarCtrl) afx_msg void OnPaint(); afx_msg void OnLButtonDown(UINT nFlags, CPoint point); afx_msg void OnMouseMove(UINT nFlags, CPoint point); //}}AFX_MSG afx_msg void OnInitialUpdate(); afx_msg LRESULT OnIdleUpdateCmdUI(WPARAM wParam, LPARAM lParam); afx_msg BOOL OnToolTipNotify(UINT id, NMHDR * pNMHDR, LRESULT * pResult); DECLARE_MESSAGE_MAP()};///////////////////////////////////////////////////////////////////////////////{{AFX_INSERT_LOCATION}}// Microsoft Visual C++ will insert additional declarations immediately before the previous line.#endif // !defined(AFX_TOOLBARCTRL_H__FE810709_BE93_4DEA_A380_E29023E089E7__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -