123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928 |
- #include-once
- #include "DirConstants.au3"
- #include "ListBoxConstants.au3"
- #include "SendMessage.au3"
- #include "UDFGlobalID.au3"
- #include "WinAPIConv.au3"
- #include "WinAPIRes.au3"
- #include "WinAPISysInternals.au3"
- ; #INDEX# =======================================================================================================================
- ; Title .........: ListBox
- ; AutoIt Version : 3.3.14.5
- ; Language ......: English
- ; Description ...: Functions that assist with ListBox control management.
- ; Author(s) .....: Paul Campbell (PaulIA)
- ; ===============================================================================================================================
- ; #VARIABLES# ===================================================================================================================
- Global $__g_hLBLastWnd
- ; ===============================================================================================================================
- ; #CONSTANTS# ===================================================================================================================
- Global Const $__LISTBOXCONSTANT_ClassName = "ListBox"
- Global Const $__LISTBOXCONSTANT_ClassNames = $__LISTBOXCONSTANT_ClassName & "|TListbox"
- Global Const $__LISTBOXCONSTANT_DEFAULT_GUI_FONT = 17
- Global Const $__LISTBOXCONSTANT_WM_SETREDRAW = 0x000B
- Global Const $__LISTBOXCONSTANT_WM_GETFONT = 0x0031
- ; ===============================================================================================================================
- ; #CURRENT# =====================================================================================================================
- ; _GUICtrlListBox_AddFile
- ; _GUICtrlListBox_AddString
- ; _GUICtrlListBox_BeginUpdate
- ; _GUICtrlListBox_ClickItem
- ; _GUICtrlListBox_Create
- ; _GUICtrlListBox_DeleteString
- ; _GUICtrlListBox_Destroy
- ; _GUICtrlListBox_Dir
- ; _GUICtrlListBox_EndUpdate
- ; _GUICtrlListBox_FindString
- ; _GUICtrlListBox_FindInText
- ; _GUICtrlListBox_GetAnchorIndex
- ; _GUICtrlListBox_GetCaretIndex
- ; _GUICtrlListBox_GetCount
- ; _GUICtrlListBox_GetCurSel
- ; _GUICtrlListBox_GetHorizontalExtent
- ; _GUICtrlListBox_GetItemData
- ; _GUICtrlListBox_GetItemHeight
- ; _GUICtrlListBox_GetItemRect
- ; _GUICtrlListBox_GetItemRectEx
- ; _GUICtrlListBox_GetListBoxInfo
- ; _GUICtrlListBox_GetLocale
- ; _GUICtrlListBox_GetLocaleCountry
- ; _GUICtrlListBox_GetLocaleLang
- ; _GUICtrlListBox_GetLocalePrimLang
- ; _GUICtrlListBox_GetLocaleSubLang
- ; _GUICtrlListBox_GetSel
- ; _GUICtrlListBox_GetSelCount
- ; _GUICtrlListBox_GetSelItems
- ; _GUICtrlListBox_GetSelItemsText
- ; _GUICtrlListBox_GetText
- ; _GUICtrlListBox_GetTextLen
- ; _GUICtrlListBox_GetTopIndex
- ; _GUICtrlListBox_InitStorage
- ; _GUICtrlListBox_InsertString
- ; _GUICtrlListBox_ItemFromPoint
- ; _GUICtrlListBox_ReplaceString
- ; _GUICtrlListBox_ResetContent
- ; _GUICtrlListBox_SelectString
- ; _GUICtrlListBox_SelItemRange
- ; _GUICtrlListBox_SelItemRangeEx
- ; _GUICtrlListBox_SetAnchorIndex
- ; _GUICtrlListBox_SetCaretIndex
- ; _GUICtrlListBox_SetColumnWidth
- ; _GUICtrlListBox_SetCurSel
- ; _GUICtrlListBox_SetHorizontalExtent
- ; _GUICtrlListBox_SetItemData
- ; _GUICtrlListBox_SetItemHeight
- ; _GUICtrlListBox_SetLocale
- ; _GUICtrlListBox_SetSel
- ; _GUICtrlListBox_SetTabStops
- ; _GUICtrlListBox_SetTopIndex
- ; _GUICtrlListBox_Sort
- ; _GUICtrlListBox_SwapString
- ; _GUICtrlListBox_UpdateHScroll
- ; ===============================================================================================================================
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: Paul Campbell (PaulIA)
- ; Modified.......: Gary Frost (gafrost)
- ; ===============================================================================================================================
- Func _GUICtrlListBox_AddFile($hWnd, $sFilePath)
- If Not IsString($sFilePath) Then $sFilePath = String($sFilePath)
- If IsHWnd($hWnd) Then
- Return _SendMessage($hWnd, $LB_ADDFILE, 0, $sFilePath, 0, "wparam", "wstr")
- Else
- Return GUICtrlSendMsg($hWnd, $LB_ADDFILE, 0, $sFilePath)
- EndIf
- EndFunc ;==>_GUICtrlListBox_AddFile
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: Gary Frost
- ; Modified.......:
- ; ===============================================================================================================================
- Func _GUICtrlListBox_AddString($hWnd, $sText)
- If Not IsString($sText) Then $sText = String($sText)
- If IsHWnd($hWnd) Then
- Return _SendMessage($hWnd, $LB_ADDSTRING, 0, $sText, 0, "wparam", "wstr")
- Else
- Return GUICtrlSendMsg($hWnd, $LB_ADDSTRING, 0, $sText)
- EndIf
- EndFunc ;==>_GUICtrlListBox_AddString
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: Paul Campbell (PaulIA)
- ; Modified.......: Gary Frost (gafrost)
- ; ===============================================================================================================================
- Func _GUICtrlListBox_BeginUpdate($hWnd)
- If Not IsHWnd($hWnd) Then $hWnd = GUICtrlGetHandle($hWnd)
- Return _SendMessage($hWnd, $__LISTBOXCONSTANT_WM_SETREDRAW, False) = 0
- EndFunc ;==>_GUICtrlListBox_BeginUpdate
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: Paul Campbell (PaulIA)
- ; Modified.......: Gary Frost (gafrost)
- ; ===============================================================================================================================
- Func _GUICtrlListBox_ClickItem($hWnd, $iIndex, $sButton = "left", $bMove = False, $iClicks = 1, $iSpeed = 0)
- If Not IsHWnd($hWnd) Then $hWnd = GUICtrlGetHandle($hWnd)
- Local $tRECT = _GUICtrlListBox_GetItemRectEx($hWnd, $iIndex)
- Local $tPoint = _WinAPI_PointFromRect($tRECT)
- $tPoint = _WinAPI_ClientToScreen($hWnd, $tPoint)
- Local $iX, $iY
- _WinAPI_GetXYFromPoint($tPoint, $iX, $iY)
- Local $iMode = Opt("MouseCoordMode", 1)
- If Not $bMove Then
- Local $aPos = MouseGetPos()
- _WinAPI_ShowCursor(False)
- MouseClick($sButton, $iX, $iY, $iClicks, $iSpeed)
- MouseMove($aPos[0], $aPos[1], 0)
- _WinAPI_ShowCursor(True)
- Else
- MouseClick($sButton, $iX, $iY, $iClicks, $iSpeed)
- EndIf
- Opt("MouseCoordMode", $iMode)
- EndFunc ;==>_GUICtrlListBox_ClickItem
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: Paul Campbell (PaulIA)
- ; Modified.......: Gary Frost
- ; ===============================================================================================================================
- Func _GUICtrlListBox_Create($hWnd, $sText, $iX, $iY, $iWidth = 100, $iHeight = 200, $iStyle = 0x00B00002, $iExStyle = 0x00000200)
- If Not IsHWnd($hWnd) Then
- ; Invalid Window handle for _GUICtrlListBox_Create 1st parameter
- Return SetError(1, 0, 0)
- EndIf
- If Not IsString($sText) Then
- ; 2nd parameter not a string for _GUICtrlListBox_Create
- Return SetError(2, 0, 0)
- EndIf
- If $iWidth = -1 Then $iWidth = 100
- If $iHeight = -1 Then $iHeight = 200
- Local Const $WS_VSCROLL = 0x00200000, $WS_HSCROLL = 0x00100000, $WS_BORDER = 0x00800000
- If $iStyle = -1 Then $iStyle = BitOR($WS_BORDER, $WS_VSCROLL, $WS_HSCROLL, $LBS_SORT)
- If $iExStyle = -1 Then $iExStyle = 0x00000200
- $iStyle = BitOR($iStyle, $__UDFGUICONSTANT_WS_VISIBLE, $__UDFGUICONSTANT_WS_TABSTOP, $__UDFGUICONSTANT_WS_CHILD, $LBS_NOTIFY)
- Local $nCtrlID = __UDF_GetNextGlobalID($hWnd)
- If @error Then Return SetError(@error, @extended, 0)
- Local $hList = _WinAPI_CreateWindowEx($iExStyle, $__LISTBOXCONSTANT_ClassName, "", $iStyle, $iX, $iY, $iWidth, $iHeight, $hWnd, $nCtrlID)
- _WinAPI_SetFont($hList, _WinAPI_GetStockObject($__LISTBOXCONSTANT_DEFAULT_GUI_FONT))
- If StringLen($sText) Then _GUICtrlListBox_AddString($hList, $sText)
- Return $hList
- EndFunc ;==>_GUICtrlListBox_Create
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: Gary Frost
- ; Modified.......:
- ; ===============================================================================================================================
- Func _GUICtrlListBox_DeleteString($hWnd, $iIndex)
- If IsHWnd($hWnd) Then
- Return _SendMessage($hWnd, $LB_DELETESTRING, $iIndex)
- Else
- Return GUICtrlSendMsg($hWnd, $LB_DELETESTRING, $iIndex, 0)
- EndIf
- EndFunc ;==>_GUICtrlListBox_DeleteString
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: Gary Frost (gafrost)
- ; Modified.......:
- ; ===============================================================================================================================
- Func _GUICtrlListBox_Destroy(ByRef $hWnd)
- ;If Not _WinAPI_IsClassName($hWnd, $__LISTBOXCONSTANT_ClassNames) Then Return SetError(2, 2, False)
- Local $iDestroyed = 0
- If IsHWnd($hWnd) Then
- If _WinAPI_InProcess($hWnd, $__g_hLBLastWnd) Then
- Local $nCtrlID = _WinAPI_GetDlgCtrlID($hWnd)
- Local $hParent = _WinAPI_GetParent($hWnd)
- $iDestroyed = _WinAPI_DestroyWindow($hWnd)
- Local $iRet = __UDF_FreeGlobalID($hParent, $nCtrlID)
- If Not $iRet Then
- ; can check for errors here if needed, for debug
- EndIf
- Else
- ; Not Allowed to Destroy Other Applications Control(s)
- Return SetError(1, 1, False)
- EndIf
- Else
- $iDestroyed = GUICtrlDelete($hWnd)
- EndIf
- If $iDestroyed Then $hWnd = 0
- Return $iDestroyed <> 0
- EndFunc ;==>_GUICtrlListBox_Destroy
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: Gary Frost (gafrost), CyberSlug
- ; Modified.......:
- ; ===============================================================================================================================
- Func _GUICtrlListBox_Dir($hWnd, $sFilePath, $iAttributes = 0, $bBrackets = True)
- If Not IsString($sFilePath) Then $sFilePath = String($sFilePath)
- If BitAND($iAttributes, $DDL_DRIVES) = $DDL_DRIVES And Not $bBrackets Then
- Local $sText
- Local $hGui_no_brackets = GUICreate("no brackets")
- Local $idList_no_brackets = GUICtrlCreateList("", 240, 40, 120, 120)
- Local $iRet = GUICtrlSendMsg($idList_no_brackets, $LB_DIR, $iAttributes, $sFilePath)
- For $i = 0 To _GUICtrlListBox_GetCount($idList_no_brackets) - 1
- $sText = _GUICtrlListBox_GetText($idList_no_brackets, $i)
- $sText = StringReplace(StringReplace(StringReplace($sText, "[", ""), "]", ":"), "-", "")
- _GUICtrlListBox_InsertString($hWnd, $sText)
- Next
- GUIDelete($hGui_no_brackets)
- Return $iRet
- Else
- If IsHWnd($hWnd) Then
- Return _SendMessage($hWnd, $LB_DIR, $iAttributes, $sFilePath, 0, "wparam", "wstr")
- Else
- Return GUICtrlSendMsg($hWnd, $LB_DIR, $iAttributes, $sFilePath)
- EndIf
- EndIf
- EndFunc ;==>_GUICtrlListBox_Dir
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: Paul Campbell (PaulIA)
- ; Modified.......: Gary Frost (gafrost)
- ; ===============================================================================================================================
- Func _GUICtrlListBox_EndUpdate($hWnd)
- If Not IsHWnd($hWnd) Then $hWnd = GUICtrlGetHandle($hWnd)
- Return _SendMessage($hWnd, $__LISTBOXCONSTANT_WM_SETREDRAW, True) = 0
- EndFunc ;==>_GUICtrlListBox_EndUpdate
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: Gary Frost (gafrost)
- ; Modified.......:
- ; ===============================================================================================================================
- Func _GUICtrlListBox_FindString($hWnd, $sText, $bExact = False)
- If Not IsString($sText) Then $sText = String($sText)
- If IsHWnd($hWnd) Then
- If ($bExact) Then
- Return _SendMessage($hWnd, $LB_FINDSTRINGEXACT, -1, $sText, 0, "wparam", "wstr")
- Else
- Return _SendMessage($hWnd, $LB_FINDSTRING, -1, $sText, 0, "wparam", "wstr")
- EndIf
- Else
- If ($bExact) Then
- Return GUICtrlSendMsg($hWnd, $LB_FINDSTRINGEXACT, -1, $sText)
- Else
- Return GUICtrlSendMsg($hWnd, $LB_FINDSTRING, -1, $sText)
- EndIf
- EndIf
- EndFunc ;==>_GUICtrlListBox_FindString
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: Paul Campbell (PaulIA)
- ; Modified.......:
- ; ===============================================================================================================================
- Func _GUICtrlListBox_FindInText($hWnd, $sText, $iStart = -1, $bWrapOK = True)
- Local $sList
- Local $iCount = _GUICtrlListBox_GetCount($hWnd)
- For $iI = $iStart + 1 To $iCount - 1
- $sList = _GUICtrlListBox_GetText($hWnd, $iI)
- If StringInStr($sList, $sText) Then Return $iI
- Next
- If ($iStart = -1) Or Not $bWrapOK Then Return -1
- For $iI = 0 To $iStart - 1
- $sList = _GUICtrlListBox_GetText($hWnd, $iI)
- If StringInStr($sList, $sText) Then Return $iI
- Next
- Return -1
- EndFunc ;==>_GUICtrlListBox_FindInText
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: CyberSlug
- ; Modified.......: Gary Frost (gafrost)
- ; ===============================================================================================================================
- Func _GUICtrlListBox_GetAnchorIndex($hWnd)
- If IsHWnd($hWnd) Then
- Return _SendMessage($hWnd, $LB_GETANCHORINDEX)
- Else
- Return GUICtrlSendMsg($hWnd, $LB_GETANCHORINDEX, 0, 0)
- EndIf
- EndFunc ;==>_GUICtrlListBox_GetAnchorIndex
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: CyberSlug
- ; Modified.......: Gary Frost (gafrost)
- ; ===============================================================================================================================
- Func _GUICtrlListBox_GetCaretIndex($hWnd)
- If IsHWnd($hWnd) Then
- Return _SendMessage($hWnd, $LB_GETCARETINDEX)
- Else
- Return GUICtrlSendMsg($hWnd, $LB_GETCARETINDEX, 0, 0)
- EndIf
- EndFunc ;==>_GUICtrlListBox_GetCaretIndex
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: Gary Frost (gafrost)
- ; Modified.......:
- ; ===============================================================================================================================
- Func _GUICtrlListBox_GetCount($hWnd)
- If IsHWnd($hWnd) Then
- Return _SendMessage($hWnd, $LB_GETCOUNT)
- Else
- Return GUICtrlSendMsg($hWnd, $LB_GETCOUNT, 0, 0)
- EndIf
- EndFunc ;==>_GUICtrlListBox_GetCount
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: Gary Frost (gafrost)
- ; Modified.......:
- ; ===============================================================================================================================
- Func _GUICtrlListBox_GetCurSel($hWnd)
- If IsHWnd($hWnd) Then
- Return _SendMessage($hWnd, $LB_GETCURSEL)
- Else
- Return GUICtrlSendMsg($hWnd, $LB_GETCURSEL, 0, 0)
- EndIf
- EndFunc ;==>_GUICtrlListBox_GetCurSel
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: Gary Frost (gafrost)
- ; Modified.......:
- ; ===============================================================================================================================
- Func _GUICtrlListBox_GetHorizontalExtent($hWnd)
- If IsHWnd($hWnd) Then
- Return _SendMessage($hWnd, $LB_GETHORIZONTALEXTENT)
- Else
- Return GUICtrlSendMsg($hWnd, $LB_GETHORIZONTALEXTENT, 0, 0)
- EndIf
- EndFunc ;==>_GUICtrlListBox_GetHorizontalExtent
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: Paul Campbell (PaulIA)
- ; Modified.......: Gary Frost (gafrost)
- ; ===============================================================================================================================
- Func _GUICtrlListBox_GetItemData($hWnd, $iIndex)
- If IsHWnd($hWnd) Then
- Return _SendMessage($hWnd, $LB_GETITEMDATA, $iIndex)
- Else
- Return GUICtrlSendMsg($hWnd, $LB_GETITEMDATA, $iIndex, 0)
- EndIf
- EndFunc ;==>_GUICtrlListBox_GetItemData
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: Paul Campbell (PaulIA)
- ; Modified.......: Gary Frost (gafrost)
- ; ===============================================================================================================================
- Func _GUICtrlListBox_GetItemHeight($hWnd)
- If IsHWnd($hWnd) Then
- Return _SendMessage($hWnd, $LB_GETITEMHEIGHT)
- Else
- Return GUICtrlSendMsg($hWnd, $LB_GETITEMHEIGHT, 0, 0)
- EndIf
- EndFunc ;==>_GUICtrlListBox_GetItemHeight
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: Paul Campbell (PaulIA)
- ; Modified.......:
- ; ===============================================================================================================================
- Func _GUICtrlListBox_GetItemRect($hWnd, $iIndex)
- Local $aRect[4]
- Local $tRECT = _GUICtrlListBox_GetItemRectEx($hWnd, $iIndex)
- $aRect[0] = DllStructGetData($tRECT, "Left")
- $aRect[1] = DllStructGetData($tRECT, "Top")
- $aRect[2] = DllStructGetData($tRECT, "Right")
- $aRect[3] = DllStructGetData($tRECT, "Bottom")
- Return $aRect
- EndFunc ;==>_GUICtrlListBox_GetItemRect
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: Paul Campbell (PaulIA)
- ; Modified.......: Gary Frost (gafrost)
- ; ===============================================================================================================================
- Func _GUICtrlListBox_GetItemRectEx($hWnd, $iIndex)
- Local $tRECT = DllStructCreate($tagRECT)
- If IsHWnd($hWnd) Then
- _SendMessage($hWnd, $LB_GETITEMRECT, $iIndex, $tRECT, 0, "wparam", "struct*")
- Else
- GUICtrlSendMsg($hWnd, $LB_GETITEMRECT, $iIndex, DllStructGetPtr($tRECT))
- EndIf
- Return $tRECT
- EndFunc ;==>_GUICtrlListBox_GetItemRectEx
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: Gary Frost (gafrost)
- ; Modified.......:
- ; ===============================================================================================================================
- Func _GUICtrlListBox_GetListBoxInfo($hWnd)
- If IsHWnd($hWnd) Then
- Return _SendMessage($hWnd, $LB_GETLISTBOXINFO)
- Else
- Return GUICtrlSendMsg($hWnd, $LB_GETLISTBOXINFO, 0, 0)
- EndIf
- EndFunc ;==>_GUICtrlListBox_GetListBoxInfo
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: CyberSlug
- ; Modified.......: Gary Frost (gafrost)
- ; ===============================================================================================================================
- Func _GUICtrlListBox_GetLocale($hWnd)
- If IsHWnd($hWnd) Then
- Return _SendMessage($hWnd, $LB_GETLOCALE)
- Else
- Return GUICtrlSendMsg($hWnd, $LB_GETLOCALE, 0, 0)
- EndIf
- EndFunc ;==>_GUICtrlListBox_GetLocale
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: Paul Campbell (PaulIA)
- ; Modified.......:
- ; ===============================================================================================================================
- Func _GUICtrlListBox_GetLocaleCountry($hWnd)
- Return _WinAPI_HiWord(_GUICtrlListBox_GetLocale($hWnd))
- EndFunc ;==>_GUICtrlListBox_GetLocaleCountry
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: Paul Campbell (PaulIA)
- ; Modified.......:
- ; ===============================================================================================================================
- Func _GUICtrlListBox_GetLocaleLang($hWnd)
- Return _WinAPI_LoWord(_GUICtrlListBox_GetLocale($hWnd))
- EndFunc ;==>_GUICtrlListBox_GetLocaleLang
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: Gary Frost (gafrost)
- ; Modified.......:
- ; ===============================================================================================================================
- Func _GUICtrlListBox_GetLocalePrimLang($hWnd)
- Return _WinAPI_PrimaryLangId(_GUICtrlListBox_GetLocaleLang($hWnd))
- EndFunc ;==>_GUICtrlListBox_GetLocalePrimLang
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: Gary Frost (gafrost)
- ; Modified.......:
- ; ===============================================================================================================================
- Func _GUICtrlListBox_GetLocaleSubLang($hWnd)
- Return _WinAPI_SubLangId(_GUICtrlListBox_GetLocaleLang($hWnd))
- EndFunc ;==>_GUICtrlListBox_GetLocaleSubLang
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: CyberSlug
- ; Modified.......: Gary Frost (gafrost)
- ; ===============================================================================================================================
- Func _GUICtrlListBox_GetSel($hWnd, $iIndex)
- If IsHWnd($hWnd) Then
- Return _SendMessage($hWnd, $LB_GETSEL, $iIndex) <> 0
- Else
- Return GUICtrlSendMsg($hWnd, $LB_GETSEL, $iIndex, 0) <> 0
- EndIf
- EndFunc ;==>_GUICtrlListBox_GetSel
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: CyberSlug
- ; Modified.......: Gary Frost (gafrost)
- ; ===============================================================================================================================
- Func _GUICtrlListBox_GetSelCount($hWnd)
- If IsHWnd($hWnd) Then
- Return _SendMessage($hWnd, $LB_GETSELCOUNT)
- EndIf
- If IsHWnd(GUICtrlGetHandle($hWnd)) Then
- Return GUICtrlSendMsg($hWnd, $LB_GETSELCOUNT, 0, 0)
- EndIf
- ; Invalid controlID
- Return -1
- EndFunc ;==>_GUICtrlListBox_GetSelCount
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: Paul Campbell (PaulIA)
- ; Modified.......: Gary Frost (gafrost)
- ; ===============================================================================================================================
- Func _GUICtrlListBox_GetSelItems($hWnd)
- Local $aArray[1] = [0]
- Local $iCount = _GUICtrlListBox_GetSelCount($hWnd)
- If $iCount > 0 Then
- ReDim $aArray[$iCount + 1]
- Local $tArray = DllStructCreate("int[" & $iCount & "]")
- If IsHWnd($hWnd) Then
- _SendMessage($hWnd, $LB_GETSELITEMS, $iCount, $tArray, 0, "wparam", "struct*")
- Else
- GUICtrlSendMsg($hWnd, $LB_GETSELITEMS, $iCount, DllStructGetPtr($tArray))
- EndIf
- $aArray[0] = $iCount
- For $iI = 1 To $iCount
- $aArray[$iI] = DllStructGetData($tArray, 1, $iI)
- Next
- EndIf
- Return $aArray
- EndFunc ;==>_GUICtrlListBox_GetSelItems
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: Gary Frost (gafrost), CyberSlug
- ; Modified.......:
- ; ===============================================================================================================================
- Func _GUICtrlListBox_GetSelItemsText($hWnd)
- Local $aText[1] = [0], $iCount = _GUICtrlListBox_GetSelCount($hWnd)
- If $iCount > 0 Then
- Local $aIndices = _GUICtrlListBox_GetSelItems($hWnd)
- ReDim $aText[UBound($aIndices)]
- $aText[0] = $aIndices[0]
- For $i = 1 To $aIndices[0]
- $aText[$i] = _GUICtrlListBox_GetText($hWnd, $aIndices[$i])
- Next
- EndIf
- Return $aText
- EndFunc ;==>_GUICtrlListBox_GetSelItemsText
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: CyberSlug
- ; Modified.......: Gary Frost (gafrost
- ; ===============================================================================================================================
- Func _GUICtrlListBox_GetText($hWnd, $iIndex)
- Local $tText = DllStructCreate("wchar Text[" & _GUICtrlListBox_GetTextLen($hWnd, $iIndex) + 1 & "]")
- If Not IsHWnd($hWnd) Then $hWnd = GUICtrlGetHandle($hWnd)
- _SendMessage($hWnd, $LB_GETTEXT, $iIndex, $tText, 0, "wparam", "struct*")
- Return DllStructGetData($tText, "Text")
- EndFunc ;==>_GUICtrlListBox_GetText
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: CyberSlug
- ; Modified.......: Gary Frost (gafrost)
- ; ===============================================================================================================================
- Func _GUICtrlListBox_GetTextLen($hWnd, $iIndex)
- If IsHWnd($hWnd) Then
- Return _SendMessage($hWnd, $LB_GETTEXTLEN, $iIndex)
- Else
- Return GUICtrlSendMsg($hWnd, $LB_GETTEXTLEN, $iIndex, 0)
- EndIf
- EndFunc ;==>_GUICtrlListBox_GetTextLen
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: Gary Frost (gafrost), CyberSlug
- ; Modified.......: Gary Frost (gafrost)
- ; ===============================================================================================================================
- Func _GUICtrlListBox_GetTopIndex($hWnd)
- If IsHWnd($hWnd) Then
- Return _SendMessage($hWnd, $LB_GETTOPINDEX)
- Else
- Return GUICtrlSendMsg($hWnd, $LB_GETTOPINDEX, 0, 0)
- EndIf
- EndFunc ;==>_GUICtrlListBox_GetTopIndex
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: Paul Campbell (PaulIA)
- ; Modified.......: Gary Frost (gafrost)
- ; ===============================================================================================================================
- Func _GUICtrlListBox_InitStorage($hWnd, $iItems, $iBytes)
- If IsHWnd($hWnd) Then
- Return _SendMessage($hWnd, $LB_INITSTORAGE, $iItems, $iBytes)
- Else
- Return GUICtrlSendMsg($hWnd, $LB_INITSTORAGE, $iItems, $iBytes)
- EndIf
- EndFunc ;==>_GUICtrlListBox_InitStorage
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: Gary Frost (gafrost)
- ; Modified.......:
- ; ===============================================================================================================================
- Func _GUICtrlListBox_InsertString($hWnd, $sText, $iIndex = -1)
- If Not IsString($sText) Then $sText = String($sText)
- If IsHWnd($hWnd) Then
- Return _SendMessage($hWnd, $LB_INSERTSTRING, $iIndex, $sText, 0, "wparam", "wstr")
- Else
- Return GUICtrlSendMsg($hWnd, $LB_INSERTSTRING, $iIndex, $sText)
- EndIf
- EndFunc ;==>_GUICtrlListBox_InsertString
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: Paul Campbell (PaulIA)
- ; Modified.......: Gary Frost (gafrost)
- ; ===============================================================================================================================
- Func _GUICtrlListBox_ItemFromPoint($hWnd, $iX, $iY)
- Local $iRet
- If IsHWnd($hWnd) Then
- $iRet = _SendMessage($hWnd, $LB_ITEMFROMPOINT, 0, _WinAPI_MakeLong($iX, $iY))
- Else
- $iRet = GUICtrlSendMsg($hWnd, $LB_ITEMFROMPOINT, 0, _WinAPI_MakeLong($iX, $iY))
- EndIf
- If _WinAPI_HiWord($iRet) <> 0 Then $iRet = -1
- Return $iRet
- EndFunc ;==>_GUICtrlListBox_ItemFromPoint
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: Gary Frost (gafrost), CyberSlug
- ; Modified.......:
- ; ===============================================================================================================================
- Func _GUICtrlListBox_ReplaceString($hWnd, $iIndex, $sText)
- If (_GUICtrlListBox_DeleteString($hWnd, $iIndex) == $LB_ERR) Then Return SetError($LB_ERR, $LB_ERR, False)
- If (_GUICtrlListBox_InsertString($hWnd, $sText, $iIndex) == $LB_ERR) Then Return SetError($LB_ERR, $LB_ERR, False)
- Return True
- EndFunc ;==>_GUICtrlListBox_ReplaceString
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: Gary Frost (gafrost)
- ; Modified.......:
- ; ===============================================================================================================================
- Func _GUICtrlListBox_ResetContent($hWnd)
- If IsHWnd($hWnd) Then
- _SendMessage($hWnd, $LB_RESETCONTENT)
- Else
- GUICtrlSendMsg($hWnd, $LB_RESETCONTENT, 0, 0)
- EndIf
- EndFunc ;==>_GUICtrlListBox_ResetContent
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: Gary Frost (gafrost)
- ; Modified.......:
- ; ===============================================================================================================================
- Func _GUICtrlListBox_SelectString($hWnd, $sText, $iIndex = -1)
- If Not IsString($sText) Then $sText = String($sText)
- If IsHWnd($hWnd) Then
- Return _SendMessage($hWnd, $LB_SELECTSTRING, $iIndex, $sText, 0, "wparam", "wstr")
- Else
- Return GUICtrlSendMsg($hWnd, $LB_SELECTSTRING, $iIndex, $sText)
- EndIf
- EndFunc ;==>_GUICtrlListBox_SelectString
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: Gary Frost (gafrost), CyberSlug
- ; Modified.......: Gary Frost (gafrost, re-written
- ; ===============================================================================================================================
- Func _GUICtrlListBox_SelItemRange($hWnd, $iFirst, $iLast, $bSelect = True)
- If IsHWnd($hWnd) Then
- Return _SendMessage($hWnd, $LB_SELITEMRANGE, $bSelect, _WinAPI_MakeLong($iFirst, $iLast)) = 0
- Else
- Return GUICtrlSendMsg($hWnd, $LB_SELITEMRANGE, $bSelect, _WinAPI_MakeLong($iFirst, $iLast)) = 0
- EndIf
- EndFunc ;==>_GUICtrlListBox_SelItemRange
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: CyberSlug
- ; Modified.......: Gary Frost (gafrost)
- ; ===============================================================================================================================
- Func _GUICtrlListBox_SelItemRangeEx($hWnd, $iFirst, $iLast)
- If IsHWnd($hWnd) Then
- Return _SendMessage($hWnd, $LB_SELITEMRANGEEX, $iFirst, $iLast) = 0
- Else
- Return GUICtrlSendMsg($hWnd, $LB_SELITEMRANGEEX, $iFirst, $iLast) = 0
- EndIf
- EndFunc ;==>_GUICtrlListBox_SelItemRangeEx
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: Gary Frost (gafrost)
- ; Modified.......:
- ; ===============================================================================================================================
- Func _GUICtrlListBox_SetAnchorIndex($hWnd, $iIndex)
- If IsHWnd($hWnd) Then
- Return _SendMessage($hWnd, $LB_SETANCHORINDEX, $iIndex) = 0
- Else
- Return GUICtrlSendMsg($hWnd, $LB_SETANCHORINDEX, $iIndex, 0) = 0
- EndIf
- EndFunc ;==>_GUICtrlListBox_SetAnchorIndex
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: Gary Frost (gafrost)
- ; Modified.......:
- ; ===============================================================================================================================
- Func _GUICtrlListBox_SetCaretIndex($hWnd, $iIndex, $bPartial = False)
- If IsHWnd($hWnd) Then
- Return _SendMessage($hWnd, $LB_SETCARETINDEX, $iIndex, $bPartial) = 0
- Else
- Return GUICtrlSendMsg($hWnd, $LB_SETCARETINDEX, $iIndex, $bPartial) = 0
- EndIf
- EndFunc ;==>_GUICtrlListBox_SetCaretIndex
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: Paul Campbell (PaulIA)
- ; Modified.......: Gary Frost (gafrost)
- ; ===============================================================================================================================
- Func _GUICtrlListBox_SetColumnWidth($hWnd, $iWidth)
- If IsHWnd($hWnd) Then
- _SendMessage($hWnd, $LB_SETCOLUMNWIDTH, $iWidth)
- Else
- GUICtrlSendMsg($hWnd, $LB_SETCOLUMNWIDTH, $iWidth, 0)
- EndIf
- EndFunc ;==>_GUICtrlListBox_SetColumnWidth
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: Sokko
- ; Modified.......: Gary Frost (gafrost)
- ; ===============================================================================================================================
- Func _GUICtrlListBox_SetCurSel($hWnd, $iIndex)
- If IsHWnd($hWnd) Then
- Return _SendMessage($hWnd, $LB_SETCURSEL, $iIndex)
- Else
- Return GUICtrlSendMsg($hWnd, $LB_SETCURSEL, $iIndex, 0)
- EndIf
- EndFunc ;==>_GUICtrlListBox_SetCurSel
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: Gary Frost (gafrost)
- ; Modified.......:
- ; ===============================================================================================================================
- Func _GUICtrlListBox_SetHorizontalExtent($hWnd, $iWidth)
- If IsHWnd($hWnd) Then
- _SendMessage($hWnd, $LB_SETHORIZONTALEXTENT, $iWidth)
- Else
- GUICtrlSendMsg($hWnd, $LB_SETHORIZONTALEXTENT, $iWidth, 0)
- EndIf
- EndFunc ;==>_GUICtrlListBox_SetHorizontalExtent
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: Paul Campbell (PaulIA)
- ; Modified.......: Gary Frost (gafrost)
- ; ===============================================================================================================================
- Func _GUICtrlListBox_SetItemData($hWnd, $iIndex, $iValue)
- If IsHWnd($hWnd) Then
- Return _SendMessage($hWnd, $LB_SETITEMDATA, $iIndex, $iValue) <> -1
- Else
- Return GUICtrlSendMsg($hWnd, $LB_SETITEMDATA, $iIndex, $iValue) <> -1
- EndIf
- EndFunc ;==>_GUICtrlListBox_SetItemData
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: Paul Campbell (PaulIA)
- ; Modified.......: Gary Frost (gafrost)
- ; ===============================================================================================================================
- Func _GUICtrlListBox_SetItemHeight($hWnd, $iHeight, $iIndex = 0)
- Local $iRet
- If IsHWnd($hWnd) Then
- $iRet = _SendMessage($hWnd, $LB_SETITEMHEIGHT, $iIndex, $iHeight)
- _WinAPI_InvalidateRect($hWnd)
- Else
- $iRet = GUICtrlSendMsg($hWnd, $LB_SETITEMHEIGHT, $iIndex, $iHeight)
- _WinAPI_InvalidateRect(GUICtrlGetHandle($hWnd))
- EndIf
- Return $iRet <> -1
- EndFunc ;==>_GUICtrlListBox_SetItemHeight
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: CyberSlug
- ; Modified.......: Gary Frost (gafrost)
- ; ===============================================================================================================================
- Func _GUICtrlListBox_SetLocale($hWnd, $iLocal)
- If IsHWnd($hWnd) Then
- Return _SendMessage($hWnd, $LB_SETLOCALE, $iLocal)
- Else
- Return GUICtrlSendMsg($hWnd, $LB_SETLOCALE, $iLocal, 0)
- EndIf
- EndFunc ;==>_GUICtrlListBox_SetLocale
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: Gary Frost (gafrost), CyberSlug
- ; Modified.......:
- ; ===============================================================================================================================
- Func _GUICtrlListBox_SetSel($hWnd, $iIndex = -1, $iSelect = -1)
- Local $i_Ret = 1
- If IsHWnd($hWnd) Then
- If $iIndex == -1 Then ; toggle all
- For $iIndex = 0 To _GUICtrlListBox_GetCount($hWnd) - 1
- $i_Ret = _GUICtrlListBox_GetSel($hWnd, $iIndex)
- If ($i_Ret == $LB_ERR) Then Return SetError($LB_ERR, $LB_ERR, False)
- If ($i_Ret > 0) Then ;If Selected Then
- $i_Ret = _SendMessage($hWnd, $LB_SETSEL, False, $iIndex) <> -1
- Else
- $i_Ret = _SendMessage($hWnd, $LB_SETSEL, True, $iIndex) <> -1
- EndIf
- If ($i_Ret == False) Then Return SetError($LB_ERR, $LB_ERR, False)
- Next
- ElseIf $iSelect == -1 Then ; toggle state of index
- If _GUICtrlListBox_GetSel($hWnd, $iIndex) Then ;If Selected Then
- Return _SendMessage($hWnd, $LB_SETSEL, False, $iIndex) <> -1
- Else
- Return _SendMessage($hWnd, $LB_SETSEL, True, $iIndex) <> -1
- EndIf
- Else ; set state according to flag
- Return _SendMessage($hWnd, $LB_SETSEL, $iSelect, $iIndex) <> -1
- EndIf
- Else
- If $iIndex == -1 Then ; toggle all
- For $iIndex = 0 To _GUICtrlListBox_GetCount($hWnd) - 1
- $i_Ret = _GUICtrlListBox_GetSel($hWnd, $iIndex)
- If ($i_Ret == $LB_ERR) Then Return SetError($LB_ERR, $LB_ERR, False)
- If ($i_Ret > 0) Then ;If Selected Then
- $i_Ret = GUICtrlSendMsg($hWnd, $LB_SETSEL, False, $iIndex) <> -1
- Else
- $i_Ret = GUICtrlSendMsg($hWnd, $LB_SETSEL, True, $iIndex) <> -1
- EndIf
- If ($i_Ret == 0) Then Return SetError($LB_ERR, $LB_ERR, False)
- Next
- ElseIf $iSelect == -1 Then ; toggle state of index
- If _GUICtrlListBox_GetSel($hWnd, $iIndex) Then ;If Selected Then
- Return GUICtrlSendMsg($hWnd, $LB_SETSEL, False, $iIndex) <> -1
- Else
- Return GUICtrlSendMsg($hWnd, $LB_SETSEL, True, $iIndex) <> -1
- EndIf
- Else ; set state according to flag
- Return GUICtrlSendMsg($hWnd, $LB_SETSEL, $iSelect, $iIndex) <> -1
- EndIf
- EndIf
- Return $i_Ret <> 0
- EndFunc ;==>_GUICtrlListBox_SetSel
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: Paul Campbell (PaulIA)
- ; Modified.......: Gary Frost (gafrost)
- ; ===============================================================================================================================
- Func _GUICtrlListBox_SetTabStops($hWnd, $aTabStops)
- Local $iCount = $aTabStops[0]
- Local $tTabStops = DllStructCreate("int[" & $iCount & "]")
- For $iI = 1 To $iCount
- DllStructSetData($tTabStops, 1, $aTabStops[$iI], $iI)
- Next
- If IsHWnd($hWnd) Then
- Return _SendMessage($hWnd, $LB_SETTABSTOPS, $iCount, $tTabStops, 0, "wparam", "struct*") = 0
- Else
- Return GUICtrlSendMsg($hWnd, $LB_SETTABSTOPS, $iCount, DllStructGetPtr($tTabStops)) = 0
- EndIf
- EndFunc ;==>_GUICtrlListBox_SetTabStops
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: CyberSlug
- ; Modified.......: Gary Frost (gafrost)
- ; ===============================================================================================================================
- Func _GUICtrlListBox_SetTopIndex($hWnd, $iIndex)
- If IsHWnd($hWnd) Then
- Return _SendMessage($hWnd, $LB_SETTOPINDEX, $iIndex) <> -1
- Else
- Return GUICtrlSendMsg($hWnd, $LB_SETTOPINDEX, $iIndex, 0) <> -1
- EndIf
- EndFunc ;==>_GUICtrlListBox_SetTopIndex
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: Gary Frost (gafrost), CyberSlug
- ; Modified.......:
- ; ===============================================================================================================================
- Func _GUICtrlListBox_Sort($hWnd)
- Local $sBak = _GUICtrlListBox_GetText($hWnd, 0)
- If ($sBak == -1) Then Return SetError($LB_ERR, $LB_ERR, False)
- If (_GUICtrlListBox_DeleteString($hWnd, 0) == -1) Then Return SetError($LB_ERR, $LB_ERR, False)
- Return _GUICtrlListBox_AddString($hWnd, $sBak) <> -1
- EndFunc ;==>_GUICtrlListBox_Sort
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: Gary Frost (gafrost), Cyberslug
- ; Modified.......:
- ; ===============================================================================================================================
- Func _GUICtrlListBox_SwapString($hWnd, $iIndexA, $iIndexB)
- Local $sItemA = _GUICtrlListBox_GetText($hWnd, $iIndexA)
- Local $sItemB = _GUICtrlListBox_GetText($hWnd, $iIndexB)
- If (_GUICtrlListBox_DeleteString($hWnd, $iIndexA) == -1) Then Return SetError($LB_ERR, $LB_ERR, False)
- If (_GUICtrlListBox_InsertString($hWnd, $sItemB, $iIndexA) == -1) Then Return SetError($LB_ERR, $LB_ERR, False)
- If (_GUICtrlListBox_DeleteString($hWnd, $iIndexB) == -1) Then Return SetError($LB_ERR, $LB_ERR, False)
- If (_GUICtrlListBox_InsertString($hWnd, $sItemA, $iIndexB) == -1) Then Return SetError($LB_ERR, $LB_ERR, False)
- Return True
- EndFunc ;==>_GUICtrlListBox_SwapString
- ; #FUNCTION# ====================================================================================================================
- ; Author ........: Paul Campbell (PaulIA)
- ; Modified.......: Gary Frost (gafrost)
- ; ===============================================================================================================================
- Func _GUICtrlListBox_UpdateHScroll($hWnd)
- Local $hDC, $hFont, $tSize, $sText
- Local $iMax = 0
- If IsHWnd($hWnd) Then
- $hFont = _SendMessage($hWnd, $__LISTBOXCONSTANT_WM_GETFONT)
- $hDC = _WinAPI_GetDC($hWnd)
- _WinAPI_SelectObject($hDC, $hFont)
- For $iI = 0 To _GUICtrlListBox_GetCount($hWnd) - 1
- $sText = _GUICtrlListBox_GetText($hWnd, $iI)
- $tSize = _WinAPI_GetTextExtentPoint32($hDC, $sText & "W")
- If DllStructGetData($tSize, "X") > $iMax Then
- $iMax = DllStructGetData($tSize, "X")
- EndIf
- Next
- _GUICtrlListBox_SetHorizontalExtent($hWnd, $iMax)
- _WinAPI_SelectObject($hDC, $hFont)
- _WinAPI_ReleaseDC($hWnd, $hDC)
- Else
- $hFont = GUICtrlSendMsg($hWnd, $__LISTBOXCONSTANT_WM_GETFONT, 0, 0)
- Local $hWnd_t = GUICtrlGetHandle($hWnd)
- $hDC = _WinAPI_GetDC($hWnd_t)
- _WinAPI_SelectObject($hDC, $hFont)
- For $iI = 0 To _GUICtrlListBox_GetCount($hWnd) - 1
- $sText = _GUICtrlListBox_GetText($hWnd, $iI)
- $tSize = _WinAPI_GetTextExtentPoint32($hDC, $sText & "W")
- If DllStructGetData($tSize, "X") > $iMax Then
- $iMax = DllStructGetData($tSize, "X")
- EndIf
- Next
- _GUICtrlListBox_SetHorizontalExtent($hWnd, $iMax)
- _WinAPI_SelectObject($hDC, $hFont)
- _WinAPI_ReleaseDC($hWnd_t, $hDC)
- EndIf
- EndFunc ;==>_GUICtrlListBox_UpdateHScroll
|