XPSliderCtrl.h
上传用户:chly668
上传日期:2010-03-08
资源大小:3k
文件大小:2k
- #if !defined(AFX_XPSLIDERCTRL_H__8EF7A277_729E_43C2_97A3_FCC54D0F828B__INCLUDED_)
- #define AFX_XPSLIDERCTRL_H__8EF7A277_729E_43C2_97A3_FCC54D0F828B__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- // XPSliderCtrl.h : header file
- //
- /////////////////////////////////////////////////////////////////////////////
- // CXPSliderCtrl window
- class CXPSliderCtrl : public CSliderCtrl
- {
- // Construction
- public:
- CXPSliderCtrl();
- // Attributes
- public:
- // Operations
- public:
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CXPSliderCtrl)
- //}}AFX_VIRTUAL
- // Implementation
- public:
- void InitialSiz(UINT nIDBMPChannel, UINT nIDBMPThumb, int iChanelHeit, int iChanelWid, int iThumbHeit, int iThumbWid);
- void DrawVerticalThumb (CDC *pDC, CRect pRect, BOOL hasFocus);
- void DrawHorizontalThumb(CDC *pDC, CRect rect, BOOL hasFocus);
- void DrawActiveDC();
- void DrawInactiveDC();
- void DrawChannel (CDC *pDC, CRect pRect);
- virtual ~CXPSliderCtrl();
- // Generated message map functions
- protected:
- CRect m_RectCtrl;
- CBrush m_WhitBrush;
- BOOL m_bFlagThumbWid;
- BOOL m_bFlagThumbHeit;
- int m_iThumHeit;
- int m_iThumWid;
- CRect m_RectThumb;
- CRect m_RectChanel;
- CBitmap m_BMPThumb;
- CBitmap m_BMPChanel;
- BOOL m_bFlagChanelHeit;
- BOOL m_bFlagChanelLen;
- int m_iChanelTop;
- int m_iChanelBottom;
- int m_iChanelLeft;
- int m_iChanelRight;
- CRect nLastRect;
- CPen nDarkPen, nSelThumbPen, nUnselThumbPen;
- CBrush nSelectedPen;
- CDC nInactiveDC, nActiveDC, nTempDC;
- CBrush pBackBrush, pSelBackBrush, nGreyBrush;
- POINT points[5];
- BOOL bFocus;
-
- //{{AFX_MSG(CXPSliderCtrl)
- afx_msg void OnCustomdraw(NMHDR* pNMHDR, LRESULT* pResult);
- afx_msg void OnKillFocus(CWnd* pNewWnd);
- afx_msg void OnSetFocus(CWnd* pOldWnd);
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- };
- /////////////////////////////////////////////////////////////////////////////
- //{{AFX_INSERT_LOCATION}}
- // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
- #endif // !defined(AFX_XPSLIDERCTRL_H__8EF7A277_729E_43C2_97A3_FCC54D0F828B__INCLUDED_)