Iczer

_GUICtrlListView_GetHotItem() from x64 script to work with 32bit ListView

3 posts in this topic

I need x64 script to work with ListView control in 32-bit program. I managed adapt some of GUICtrlListView UDF functions, but cannot get to work "_GUICtrlListView_GetHotItem()"... so I need tips to make it usable

in the same time functions

_GUICtrlListView_GetColumnWidth
_GUICtrlListView_SetColumnWidth
_GUICtrlListView_ApproximateViewHeight
_GUICtrlListView_GetTopIndex
_GUICtrlListView_GetSelectionMark

work without fail but have same basic structure:

Func _GUICtrlListView_GetColumnWidth($hWnd, $iCol)
    If IsHWnd($hWnd) Then
        Return _SendMessage($hWnd, $LVM_GETCOLUMNWIDTH, $iCol)
    Else
        Return GUICtrlSendMsg($hWnd, $LVM_GETCOLUMNWIDTH, $iCol, 0)
    EndIf
EndFunc   ;==>_GUICtrlListView_GetColumnWidth



Func _GUICtrlListView_GetHotItem($hWnd)
    If IsHWnd($hWnd) Then
        Return _SendMessage($hWnd, $LVM_GETHOTITEM)
    Else
        Return GUICtrlSendMsg($hWnd, $LVM_GETHOTITEM, 0, 0)
    EndIf
EndFunc   ;==>_GUICtrlListView_GetHotItem

 

Share this post


Link to post
Share on other sites



Hello you must  get the lower 32 bits value of your x64 value.

 

Basically you can do this.

 

Local $iHotItem = BitShift(_GUICtrlListView_GetHotItem(($hListView)), 32)

If $iHotItem > -1 Then
    ConsoleWrite($iHotItem & @CRLF)
EndIf

 

Saludos

 

1 person likes this

Share this post


Link to post
Share on other sites

Thanks !

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