• Scroll Bar 控件


    • Structure
      •  1 typedef struct tagSCROLLINFO {
        2 UINT cbSize; //Sizeof(SCROLLINFO)
        3 UINT fMask;
        4 int nMin; //minimum scrolling position
        5 int nMax; //maximum scrolling position
        6 UINT nPage;
        7 int nPos; //position of the scroll box
        8 int nTrackPos;
        9 } SCROLLINFO;
        10 typedef SCROLLINFO FAR* LPSCROLLINFO;
      • fMask:需要设置或获取的参数。SIF_ALL、SIF_DISABLENOSCROLL、SIF_PAGE、SIF_POS、SIF_RANGE、SIF_TRACKPOS
      • nPage:页尺寸。用来设置scroll box的适当尺寸。
      • nTrackPos:拖动scroll box时的当前位置,对应SB_THUMBTRACK消息
    • Functions
      • BOOL GetScrollInfo(HWND hwnd, int fnBar, LPSCROLLINFO lpsi );
        int SetScrollInfo(HWND hwnd, int fnBar, LPSCROLLINFO lpsi, BOOL fRedraw ); 
        int SetScrollPos(HWND hWnd, int nBar, int nPos, BOOL bRedraw ); 
        BOOL SetScrollRange(HWND hWnd, int nBar, int nMinPos, int nMaxPos, BOOL bRedraw ); 
        BOOL GetScrollInfo(HWND hwnd, int fnBar, LPSCROLLINFO lpsi ); 
        BOOL ScrollDC(
          HDC hDC, 
          int dx, 
          int dy, 
          const RECT* lprcScroll, 
          const RECT* lprcClip, 
          HRGN hrgnUpdate, 
          LPRECT lprcUpdate 
        ); 
        int ScrollWindowEx( 
          HWND hWnd, 
          int dx, 
          int dy, 
          const RECT* prcScroll, 
          const RECT* prcClip, 
          HRGN hrgnUpdate, 
          LPRECT prcUpdate, 
          UINT flags 
        ); 
    • Messages
      • WM_HSCROLL:nScrollCode、nPos、hwndScrollBar
      • WM_VSCROLL
  • 相关阅读:
    盘子序列
    最大矩形面积
    【模板】ST表
    排队
    map循环遍历
    vue循环遍历给div添加id
    正则 匹配
    字符串拼接
    js对象追加到数组里
    二级标题左侧加粗线条
  • 原文地址:https://www.cnblogs.com/dahai/p/2189386.html
Copyright © 2020-2023  润新知