Jump to content

Processing $LVN_GETINFOTIP notification for ListView subitems


rasim
 Share

Recommended Posts

Hi!

I trying to processing the $LVN_GETINFOTIP notification for ListView subitems, but unsuccessful :)

#include <GuiConstants.au3>
#include <GuiListView.au3>

$hGui = GUICreate("Test GUI", 300, 200)

$hListView = _GUICtrlListView_Create($hGui, "Items|SubItems1|SubItems2", 10, 10, 280, 180, -1, $WS_EX_CLIENTEDGE)
_GUICtrlListView_SetExtendedListViewStyle($hListView, $LVS_EX_INFOTIP + $LVS_EX_FULLROWSELECT)

For $i = 0 To 9
    _GUICtrlListView_AddItem($hListView, "Long Long Item" & $i + 1)
    _GUICtrlListView_AddSubItem($hListView, $i, "Long Long SubItem" & $i + 1, 1)
Next

GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY")

GUISetState()

Do
Until GUIGetMsg() = -3

Func WM_NOTIFY($hWnd, $Msg, $wParam, $lParam)
    Local $tNMHDR, $hWndFrom, $iCode
    
    $tNMHDR = DllStructCreate($tagNMHDR, $lParam)
    $hWndFrom = DllStructGetData($tNMHDR, "hWndFrom")
    $iCode = DllStructGetData($tNMHDR, "Code")
    
    Switch $hWndFrom
        Case $hListView
            Switch $iCode
                Case $LVN_GETINFOTIP, $LVN_GETINFOTIPA, $LVN_GETINFOTIPW
                    ConsoleWrite("tooltip" & @LF)
            EndSwitch
    EndSwitch
    
    Return $GUI_RUNDEFMSG
EndFunc
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...