Jump to content
Sign in to follow this  
taz742

_GUICtrlListView_SetItemParam & _GUICtrlListView_GetItemParam [Problem ?]

Recommended Posts

taz742

I've a probleme with these 2 Listview functions:

_GUICtrlListView_GetItemParam() don't return the same value setting up by _GUICtrlListView_SetItemParam().

I use a big value "3333324632463332" in set param and get param return "514037732" so my question is:

Is there a limitation for $iParam in those functions?

PS: i'm using v3.2.10.0

#include <GuiConstantsEx.au3>
#include <GuiListView.au3>

Opt('MustDeclareVars', 1)

$Debug_LV = False ; Check ClassName being passed to ListView functions, set to True and use a handle to another control to see it work

Example_Internal() ;use autoit built-in listview
Example_External() ;use UDF built listview

Func Example_Internal()
    Local $hListView
    
    GUICreate("(Internal) ListView Set Item Param", 400, 300)
    $hListView = GUICtrlCreateListView("", 2, 2, 394, 268)
    GUISetState()

    ; Add columns
    _GUICtrlListView_AddColumn ($hListView, "Items", 100)

    ; Add items
    _GUICtrlListView_AddItem ($hListView, "Item 1")
    _GUICtrlListView_AddItem ($hListView, "Item 2")
    _GUICtrlListView_AddItem ($hListView, "Item 3")

    ; Set item 2 parameter
    _GUICtrlListView_SetItemParam ($hListView, 1, "3333324632463332")
    MsgBox (4160, "Information", "Item 2 Parameter: " & _GUICtrlListView_GetItemParam ($hListView, 1))

    ; Loop until user exits
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
    GUIDelete()
EndFunc   ;==>Example_Internal

Func Example_External()
    Local $GUI, $hListView
    
    $GUI = GUICreate("(External) ListView Set Item Param", 400, 300)
    $hListView = _GUICtrlListView_Create ($GUI, "", 2, 2, 394, 268)
    GUISetState()

    ; Add columns
    _GUICtrlListView_AddColumn ($hListView, "Items", 100)

    ; Add items
    _GUICtrlListView_AddItem ($hListView, "Item 1")
    _GUICtrlListView_AddItem ($hListView, "Item 2")
    _GUICtrlListView_AddItem ($hListView, "Item 3")

    ; Set item 2 parameter
    _GUICtrlListView_SetItemParam ($hListView, 1, "3333324632463332")
    MsgBox (4160, "Information", "Item 2 Parameter: " & _GUICtrlListView_GetItemParam ($hListView, 1))
    
    ; Loop until user exits
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
    GUIDelete()
EndFunc   ;==>Example_External
Edited by taz742

Share this post


Link to post
Share on other sites
Siao

It is defined as 32bit integer.


"be smart, drink your wine"

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.