include-once
; #INDEX# ============================================================================================================
; Title .........: GUIScrollBars_Ex
; AutoIt Version : v3.3.6.0
; Language ......: English
; Description ...: Generates scrollbars for user defined sizes of GUI and aperture and sets proportional thumb sizes
; Remarks .......:
; Note ..........:
; Author(s) .....: Melba23 - with some code based on the WinAPI and GUIScrollBars includes
; and contributions from rover, czardas, MrCreatoR, Malkey and KaFu
; ====================================================================================================================
;#AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w- 7
; #INCLUDES# =========================================================================================================
include <GUIConstantsEx.au3>
include <WindowsConstants.au3>
include <GuiScrollBars.au3>
include <ScrollBarConstants.au3>
include <SendMessage.au3>
include <WinAPI.au3>
; #GLOBAL VARIABLES# =================================================================================================
Global $__g_aSB_WindowInfo[1][10] = [[0, 0, 0, 0, -1]]
; [0][0] = Count of initiated GUIs [n][0] = Handle to window
; [0][1] = Resizing horz position [n][1] = Not used
; [0][2] = Resizing vert position [n][2] = Average horizontal pixels per char
; [0][3] = Resizing GUI handle [n][3] = Vertical pixels per char
; [0][4] = Resizing GUI index [n][4] = Client area width
; [0][5] = Width of VScrollbar [n][5] = Client area height
; [0][6] = Height of HScrollbar [n][6] = Horizontal max setting
; [0][7] = Non-minimized event flag [n][7] = Vertical max setting
; [n][8] = Vertical scrollbar position for minimize/restore
; [n][9] = Horizontal scrollbar position for minimize/restore
$__g_aSB_WindowInfo[0][5] = _WinAPI_GetSystemMetrics(2) ; Width of VScrollbar: SM_CXVSCROLL
$__g_aSB_WindowInfo[0][6] = _WinAPI_GetSystemMetrics(3) ; Height of HScrollbar: SM_CYHSCROLL
Global $__g_aSB_WindowInfoEx[1][11]
; [n][0] = Horizontal scrollable size
; [n][1] = Vertical scrollable size
; [n][2] = Width correction factor
; [n][3] = Height correction factor
; [n][4] = Before/After flag
; [n][5] = Key repeat value
; [n][6] = Wheel scroll value
; [n][7] = Max horz scroll size if resizeable
; [n][8] = Max vert scroll size if resizeable
; [n][9] = Minimized flag
; #CURRENT# ==========================================================================================================
; _GUIScrollbars_Generate: Generates scrollbars for a GUI with a defined aperture and registers required handlers
; _GUIScrollbars_ReSizer: Registers required handlers and optionally creates GUI at max scrollable size
; _GUIScrollbars_Locate_Ctrl: Calculates coordinates to use to position controls after scrollbar creation
; _GUIScrollbars_Scroll_Page: Scrolls to min, max or page number
; _GUIScrollbars_EventMonitor: Save and restores scrollbar positions on GUI minimize/restore
; ====================================================================================================================
; #INTERNAL_USE_ONLY#=================================================================================================
; __Scrollbars_WM_VSCROLL: Handler for vertical scrollbar
; __Scrollbars_WM_HSCROLL: Handler for horizontal scrollbar
; __Scrollbars_WM_MOUSEWHEEL: Handler for vertical mouse wheel scroll
; __Scrollbars_WM_MOUSEHWHEEL: Handler for horizontal mouse wheel scroll
; __Scrollbars_WM_KEYUP: Handler for scrolling on cursor, pageup/down, home and end key press
; __Scrollbars_WM_ENTERSIZEMOVE: Handler for detecting when GUI resizing is started
; __Scrollbars_WM_EXITSIZEMOVE: Handler for detecting when GUI resizing is complete
; __Scrollbars_WM_SIZE: Handler for detecting when GUI enters/exits minimized state
;=====================================================================================================================
; #FUNCTION# =========================================================================================================
; Name...........: _GUIScrollbars_Generate
; Description ...: Generates scrollbars for a GUI with a defined aperture with proportional thumb sizes
; Syntax.........: _GUIScrollbars_Generate ($hWnd, $iH_Scroll = 0, [$iV_Scroll = 0, [$iH_Tight = 0, [$iV_Tight = 0, [$fBefore = False, [$iRepeat = 0 [, $bRegisterMsg = True]]]]]])
; Parameters ....: $hWnd -> GUI to contain scrollbars
; $iH_Scroll -> Width in pixels of area to be scrolled
; $iV_Scroll -> Height in pixels of area to be scrolled (default = 0)
; $iH_Tight -> 1 = Adjust mean position of right edge of scrolled area to right (default = 0)
;
标签:__,GUI,Handler,111,Scrollbars,include,WM From: https://www.cnblogs.com/zhuoss/p/16798197.html