ListiView Item - Highlighted vs Unhighlighted

  • Thread starter Thread starter A_PK
  • Start date Start date
A

A_PK

Basically what I want to do is same wtih pocket pc...Inside ListiView, when
I click the white pot on listview, then highlighted item will become
unhighlight...
but when click the on highlighted item or any item, then will fire the
event.

Just wonder how to detect if my click is click on the white spot or not ?
pls let me know how to detect if my click is in the white spot or not ?
 
Wed, 18 May 2005 09:29:53 +0800, A_PK:
Basically what I want to do is same wtih pocket pc...Inside ListiView, when
I click the white pot on listview, then highlighted item will become
unhighlight...
but when click the on highlighted item or any item, then will fire the
event.

Just wonder how to detect if my click is click on the white spot or not ?
pls let me know how to detect if my click is in the white spot or not ?

There should be an equivalent to the way I used to do it in delphi:
capture a tap on the screen (WM_LBUTTONDOWN), find out where it is on
the listview (ScreenToClient) and finally determine which item is at
this coordinate (LVM_GETITEMPOSITION). If the return value is false,
there is no item at this point. Otherwise you can now get the
respective item via LVM_FINDITEM with LVFI_NEARESTXY as parameter.

PS: note to self
hey, that was easy; I've never done this yet since I started eVC++
 
if using Treeview, i know how to getnodeat....based on mouse cursor
location, using x and y.....

but under listiview....I have problem finding the exact position. Could
someone guide me...thanks you
 
Back
Top