123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- #if !defined(AFX_XPBUTTON_H__44CD5B2A_756E_4939_9261_E0034E0F2DEF__INCLUDED_)
- #define AFX_XPBUTTON_H__44CD5B2A_756E_4939_9261_E0034E0F2DEF__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- // XPButton.h : header file
- //
- /////////////////////////////////////////////////////////////////////////////
- // CXPButton window
- class CXPButton : public CButton
- {
- // Construction
- public:
- CXPButton();
- // Attributes
- protected:
- //按钮的外边框
- CPen m_BoundryPen;
-
- //鼠标指针置于按钮之上时按钮的内边框
- CPen m_InsideBoundryPenLeft;
- CPen m_InsideBoundryPenRight;
- CPen m_InsideBoundryPenTop;
- CPen m_InsideBoundryPenBottom;
-
- //按钮获得焦点时按钮的内边框
- CPen m_InsideBoundryPenLeftSel;
- CPen m_InsideBoundryPenRightSel;
- CPen m_InsideBoundryPenTopSel;
- CPen m_InsideBoundryPenBottomSel;
-
- //按钮的底色,包括有效和无效两种状态
- CBrush m_FillActive;
- CBrush m_FillInactive;
-
- //按钮的状态
- BOOL m_bOver; //鼠标位于按钮之上时该值为true,反之为flase
- BOOL m_bTracking; //在鼠标按下没有释放时该值为true
- BOOL m_bSelected; //按钮被按下是该值为true
- BOOL m_bFocus; //按钮为当前焦点所在时该值为true
- // Operations
- public:
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CXPButton)
- protected:
- virtual void PreSubclassWindow();
- //}}AFX_VIRTUAL
- // Implementation
- public:
- virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
- virtual void DoGradientFill(CDC *pDC, CRect* rect);
- virtual void DrawInsideBorder(CDC *pDC, CRect* rect);
- virtual ~CXPButton();
- // Generated message map functions
- protected:
- //{{AFX_MSG(CXPButton)
- afx_msg void OnMouseMove(UINT nFlags, CPoint point);
- afx_msg LRESULT OnMouseLeave(WPARAM wParam, LPARAM lParam);
- afx_msg LRESULT OnMouseHover(WPARAM wParam, LPARAM lParam);
-
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- public:
- afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
- afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
- };
- /////////////////////////////////////////////////////////////////////////////
- //{{AFX_INSERT_LOCATION}}
- // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
- #endif // !defined(AFX_XPBUTTON_H__44CD5B2A_756E_4939_9261_E0034E0F2DEF__INCLUDED_)
|