Click here to Skip to main content
15,881,938 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Public Function WindowProc(ByVal hwnd As Long, ByVal uMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Dim Msg As CWPSTRUCT
Select Case uMsg

Case WM_NOTIFY
Dim y As NMLVDISPINFO
Dim item As LVITEM
CopyMemory y, ByVal lParam, Len(y)
Form1.List1.AddItem y.hdr.code & " " & y.item.lParam, 0
If Msg.????? = LVN_INSERTITEM Then
Debug.Print "test"
End If
End Select
WindowProc = CallWindowProc(lpPrevWndFunc, hwnd, uMsg, wParam, lParam)

End Function

How to do get the listView Event

What I have tried:

Public Function WindowProc(ByVal hwnd As Long, ByVal uMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Dim Msg As CWPSTRUCT
Select Case uMsg

Case WM_NOTIFY
Dim y As NMLVDISPINFO
Dim item As LVITEM
CopyMemory y, ByVal lParam, Len(y)
Form1.List1.AddItem y.hdr.code & " " & y.item.lParam, 0
If Msg.????? = LVN_INSERTITEM Then
Debug.Print "test"
End If
End Select
WindowProc = CallWindowProc(lpPrevWndFunc, hwnd, uMsg, wParam, lParam)

End Function

How to do get the listView Event
Posted
Comments
[no name] 2-Oct-21 21:46pm    
Which event? List1 appears to be your ListView; event handlers are added to that. Look at the code for List1.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900