Udo,
Without any knowledge I would think that the 3 words "in view coordinates"
make the difference, <=> "in the current view". And "The position of
list-
view items is specified in view coordinates, which are client coordinates
offset by the scroll position."
When I did draw the rectangle returned by LVM_GETITEMRECT and a cross where
LVM_GETITEMPOSITION pointed to both stayed rock-steady on their respective
items - regardless of a horizontal/vertical scroll.
Which is, I must say, something I expected (I didn't think that
non-releative to the client rectangle would be of much use for drawing
purposes).
The only problem is that neither indicates the actual top-left of its item
(a shown by the "selected item" rectangle as displayed by the
LVS_EX_BORDERSELECT setting). :-(
To me it looks like that I can only get that "selected item" top-left
location by taking the result of LVM_GETITEMPOSITION, apply the scrolled
origin from LVM_GETVIEWRECT, divide by the result of LVM_GETITEMSPACING,
floor the results and re-multiply by it again.
... which feels rather hackish to me.
I still have to test that though.
Its not the first time I try to do something seemingly very basic/simple,
only to find out no method for it is exposed (even though the "selected"
rectangle shows its already done internally) - but that the result I /can/
get (the top/left of the icon) is possible in two different ways. Go figure.
:-\
Regards,
Rudy Wieser