-
January 2nd, 2013, 09:29 AM
#1
How to click an item in listview(Win32/C++)
Dear Experts,
I am developing an automation tool(C++) for which I need to write program to Click,Doubleclick on the Listview item by using the Handle of the listview control and index of the item. (Win32/C++).Kindly help.
Last edited by haroonrulz; January 2nd, 2013 at 10:04 AM.
-
January 2nd, 2013, 09:37 AM
#2
Re: How to click an item in listview(Win32/C++)
As you know clicking an item in Listbox is very easy
Really? As long as click is a general user input action in Windows, if you know how to click listbox, you know how to click anything else.
Best regards,
Igor
-
January 2nd, 2013, 10:03 AM
#3
Re: How to click an item in listview(Win32/C++)
Sorry Igor, I have edited my question,kindly help.
-
January 2nd, 2013, 01:23 PM
#4
Re: How to click an item in listview(Win32/C++)
Sorry pal, but I have no answers to your assignment. Clicking itself is the easiest part here. The most tricky thing is determining item rectangle in the listview window. There's no straightforward Win API to find that out, as far as I know. So good luck in your research.
Best regards,
Igor
-
January 7th, 2013, 11:05 AM
#5
Re: How to click an item in listview(Win32/C++)
Look at LVM_GETITEMRECT message. This returns a RECT structure containing the bounding rectangle for the specified index of the listview item. Note that using SendInput as suggested by Igor requires absolute coordinates for the mouse position for the MOUSEINPUT structure to position the mouse before issuing a click. You'll have to convert the info in the RECT structure into absolute x, y co-ordinates before using SendInput. Good luck!
-
January 7th, 2013, 12:25 PM
#6
Re: How to click an item in listview(Win32/C++)
The item may not be visible, you may need to use message ListView_EnsureVisible
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|