WEBINAR: On-demand webcast
How to Boost Database Development Productivity on Linux, Docker, and Kubernetes with Microsoft SQL Server 2017 REGISTER >
Microsoft, in all their wisdom didn't give us VB developers an easy way to determine where in the listview the mouse was clicked. If you want to place a combo/textbox over a listitem / subitem, it can prove tricky to find out what item was clicked - this code will show you just how to do that.
The code uses the LVHITTESTINFO structure ported from the commctl.h C header file and the LVHT_ constants. The structure will let you know where in the listview the mouse was clicked, including :
- An Items Icon (including SubItem Icons)
- On Text
- On a State Icon
- Nowhere !