If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

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.

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.

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!

* The Perfect Platform for Game Developers: Android
Developing rich, high performance Android games from the ground up is a daunting task. Intel has provided Android developers with a number of tools that can be leveraged by Android game developers.

* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.