123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220 |
- #ifndef _SCROLLWND_H
- #define _SCROLLWND_H
- #define MIN_COOLSB_SIZE 24
- #define MINSCROLLSIZE 50
- #define SNAP_THUMB_BACK
- #define THUMBTRACK_SNAPDIST 128
- #include <windows.h>
- #define COOLSB_NONE (-1)
- #define SB_INSBUT (-2)
- #define SYSTEM_METRIC (-1)
- #define CSBS_THUMBALWAYS 4
- #define CSBS_VISIBLE 8
- #define CSBS_NORMAL 0
- #define CSBS_FLAT 1
- #define CSBS_HOTTRACKED 2
- #define SBBF_TYPE 0x0001
- #define SBBF_ID 0x0002
- #define SBBF_PLACEMENT 0x0004
- #define SBBF_SIZE 0x0008
- #define SBBF_BITMAP 0x0010
- #define SBBF_ENHMETAFILE 0x0020
- #define SBBF_CURSOR 0x0080
- #define SBBF_BUTMINMAX 0x0100
- #define SBBF_STATE 0x0200
- #define SBBS_NORMAL 0
- #define SBBS_PUSHED 1
- #define SBBS_CHECKED SBBS_PUSHED
- #define SBBT_PUSHBUTTON 1
- #define SBBT_TOGGLEBUTTON 2
- #define SBBT_FIXED 3
- #define SBBT_FLAT 4
- #define SBBT_BLANK 5
- #define SBBT_DARK 6
- #define SBBT_OWNERDRAW 7
- #define SBBT_MASK 0x1f
- #define SBBM_RECESSED 0x0020
- #define SBBM_LEFTARROW 0x0040
- #define SBBM_RIGHTARROW 0x0080
- #define SBBM_UPARROW 0x0100
- #define SBBM_DOWNARROW 0x0200
- #define SBBM_RESIZABLE 0x0400
- #define SBBM_TYPE2 0x0800
- #define SBBM_TYPE3 0x1000
- #define SBBM_TOOLTIPS 0x2000
- #define SBBP_LEFT 1
- #define SBBP_RIGHT 2
- #define SBBP_TOP 1
- #define SBBP_BOTTOM 2
- #define CSBN_BASE 0
- #define CSBN_CLICKED (1 + CSBN_BASE)
- #define CSBN_HILIGHT (2 + CSBN_BASE)
- #define MINTHUMBSIZE_NT4 9
- #define MINTHUMBSIZE_2000 7
- #define HTSCROLL_LEFT (SB_LINELEFT)
- #define HTSCROLL_RIGHT (SB_LINERIGHT)
- #define HTSCROLL_UP (SB_LINEUP)
- #define HTSCROLL_DOWN (SB_LINEDOWN)
- #define HTSCROLL_THUMB (SB_THUMBTRACK)
- #define HTSCROLL_PAGEGUP (SB_PAGEUP)
- #define HTSCROLL_PAGEGDOWN (SB_PAGEDOWN)
- #define HTSCROLL_PAGELEFT (SB_PAGELEFT)
- #define HTSCROLL_PAGERIGHT (SB_PAGERIGHT)
- #define HTSCROLL_NONE (-1)
- #define HTSCROLL_NORMAL (-1)
- #define HTSCROLL_INSERTED (128)
- #define HTSCROLL_PRE (32 | HTSCROLL_INSERTED)
- #define HTSCROLL_POST (64 | HTSCROLL_INSERTED)
- #define SCROLLBAR_LISTVIEW 1
- typedef struct
- {
- UINT fScrollFlags;
- BOOL fScrollVisible;
- SCROLLINFO scrollInfo;
-
- int nArrowLength;
- int nArrowWidth;
-
- int nButSizeBefore;
- int nButSizeAfter;
- BOOL fButVisibleBefore;
- BOOL fButVisibleAfter;
- int nBarType;
- UINT fFlatScrollbar;
- int nMinThumbSize;
- int flags;
- } SCROLLBAR;
- #define COOLSB_TIMERID1 65533
- #define COOLSB_TIMERID2 65534
- #define COOLSB_TIMERID3 -14
- #define COOLSB_TIMERINTERVAL1 300
- #define COOLSB_TIMERINTERVAL2 55
- #define COOLSB_TIMERINTERVAL3 20
- #define SM_CXVERTSB 1
- #define SM_CYVERTSB 0
- #define SM_CXHORZSB 0
- #define SM_CYHORZSB 1
- #define SM_SCROLL_WIDTH 1
- #define SM_SCROLL_LENGTH 0
- class ScrollWnd {
- public:
- ScrollWnd(HWND hwnd, int flags=0);
- ~ScrollWnd();
- void update();
-
- HWND m_hwnd;
- UINT bars;
- WNDPROC oldproc;
- BOOL fWndUnicode;
- SCROLLBAR sbarHorz;
- SCROLLBAR sbarVert;
- BOOL fThumbTracking;
- BOOL fLeftScrollbar;
-
- int cxLeftEdge, cxRightEdge;
- int cyTopEdge, cyBottomEdge;
-
-
- BOOL bPreventStyleChange;
- void updatesb(int fnBar, BOOL *fRecalcFrame);
- void disableHorzScroll();
-
- int m_disable_hscroll;
- int m_xp_theme_disabled;
- };
- #endif
|