RTScrollBar1.h
上传用户:qhonly
上传日期:2013-06-10
资源大小:487k
文件大小:2k
- #pragma once
- // CRTScrollBar1
- class CRTScrollBar1 : public CScrollBar
- {
- DECLARE_DYNAMIC(CRTScrollBar1)
- public:
- CRTScrollBar1();
- virtual ~CRTScrollBar1();
- typedef enum _ScrollBarSizeArea
- {
- AreaNone = 0,
- AreaTop = 1,
- AreaBottom = 2,
- AreaLeft = 1,
- AreaRight = 2
- }ScrollBarSizeArea;
-
-
- static void EnableRTStyle(BOOL IsEnable = TRUE);
- static void SetHorizontalBitmap(CBitmap* pHorizontal[],UINT DrawMode[]);
- static void SetVerticalBitmap(CBitmap* pVertical[],UINT DrawMode[]);
- static void SetVerticalUpArrowBitmap(CBitmap* pVerticalUpArrowBitmap[],UINT DrawMode[]);
- static void SetVerticalDownArrowBitmap(CBitmap* pVerticalDownArrowBitmap[],UINT DrawMode[]);
- static void SetHorizontalLeftArrowBitmap(CBitmap* pHorizontalLeftArrowBitmap[],UINT DrawMode[]);
- static void SetHorizontalRightArrowBitmap(CBitmap* pHorizontalRightArrowBitmap[],UINT DrawMode[]);
- void SetSizeArea(ScrollBarSizeArea Area = CRTScrollBar1::AreaNone);
- protected:
- BOOL m_bMouseDownArrowForback;
- BOOL m_bMouseDownArrowForwad;
- int m_nThumbStart;
- BOOL m_bDragging;
- BOOL m_bMouseDown;
- ScrollBarSizeArea m_SizeArea;
-
- static BOOL m_IsEnableRTStyle;
- static CBitmap* m_ScrollBarVerticalBitmap[5];
- static CBitmap* m_ScrollBarHorizontalBitmap[5];
- static UINT m_ScrollBarVerticalBitmapDrawMode[5];
- static UINT m_ScrollBarHorizontalBitmapDrawMode[5];
- static CBitmap* m_ScrollBarUpArrowBitmap[5];
- static CBitmap* m_ScrollBarLeftArrowBitmap[5];
- static CBitmap* m_ScrollBarDownArrowBitmap[5];
- static CBitmap* m_ScrollBarRightArrowBitmap[5];
- static UINT m_ScrollBarUpArrowBitmapDrawMode[5];
- static UINT m_ScrollBarLeftArrowBitmapDrawMode[5];
- static UINT m_ScrollBarDownArrowBitmapDrawMode[5];
- static UINT m_ScrollBarRightArrowBitmapDrawMode[5];
- void DrawHorizontal(CDC *pDC);
- void DrawVertical(CDC *pDC);
- protected:
- DECLARE_MESSAGE_MAP()
- public:
- afx_msg BOOL OnEraseBkgnd(CDC* pDC);
- afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
- afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
- afx_msg void OnMouseMove(UINT nFlags, CPoint point);
- afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
- afx_msg void OnPaint();
- };