#ifndef T2DLL_T2DLGITEMSCR_H #define T2DLL_T2DLGITEMSCR_H #include "../common.h" #include "T2DlgItem.h" class AFX_CLASS_EXPORT T2DlgItemScr : public T2DlgItem { public: T2DlgItemScr(T2TowerDoc* towerDoc, T2ImageObj* imageObj, CPalette* palette); virtual void SetValue(int); virtual void SetPage(int); virtual void SetRange(int); enum { Area_Up = 1, Area_PageUp = 2, Area_Thumb = 3, Area_PageDown = 4, Area_Down = 5 }; protected: virtual void OnT2DlgItemLButtonDown(UINT nFlags, CPoint pt); virtual void OnT2DlgItemLButtonUp(UINT nFlags, CPoint pt); virtual void OnT2DlgItemMouseMove(UINT nFlags, CPoint pt); virtual void OnT2Timer(UINT id); virtual int ScrollBarHittest(CPoint) const = 0; virtual void GetUpButtonRect(const CRect&, CRect&) const = 0; virtual void GetDnButtonRect(const CRect&, CRect&) const = 0; virtual int PositionToValue(const CPoint&) const = 0; virtual int PositionToValue(const CRect&) const = 0; void CalcScrollBarThumb(int* thumbPosition, int* thumbSize) const; void ScrollBarAction(int, int); BOOL IsScrollable() const; int mUpImage; int mDownImage; int mRange; int mPage; CPoint mMouseDownPoint; int mMouseDownValue; int mClickedArea; UINT mTimerID; }; #endif