Control Space -> Screen Space (listview)

  • Thread starter Thread starter Dan
  • Start date Start date
D

Dan

Hi. I want to be able to use the ListView::GetItemAt function from within
the ListView's DragDrop event callback. My problem is that GetItemAt
requires screen-space coordinates, and the DragEventArgs gives me the drop
coordinates in control relative space. Is there an easier way than
iterating up the parent hierarchy?

Cheers for any help,
Dan.
 
Dan said:
Hi. I want to be able to use the ListView::GetItemAt function from within
the ListView's DragDrop event callback. My problem is that GetItemAt
requires screen-space coordinates, and the DragEventArgs gives me the drop
coordinates in control relative space. Is there an easier way than
iterating up the parent hierarchy?

Sure, just use the list view's PointToScreen method.



Oliver Sturm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top