Uniquely select and double click an item in the List View
-
Hi, I am new to Windows programming. I am trying to uniquely select and double click an item in the list view (SysListView32) in third party software. This task is somewhat similar to MyProgram trying to double click an item in a ControlPanel-like list view. To accomplish this I am sending a LVM_FINDITEM message to get the item index of the item to be double clicked.
LVFINDINFO lvfi; ZeroMemory(&lvfi, sizeof(LVFINDINFO)); lvfi.flags = LVFI_STRING; lvfi.psz = (LPCTSTR)"Item Name"; int itemIndex = ::SendMessage( aControlHWnd, LVM_FINDITEM, (WPARAM)(int)(iStart), (LPARAM)(const LVFINDINFO *)(&lvfi));
This send message is causing a runtime error. After going through some forums and message boards I found that this is due to one of the message parameter which is a pointer to a structure, as you cannot pass a pointer-to-memory to another process. :sigh: Now I would like to know how to custom marshal this message to the other process? :confused: OR Any alternative solution to uniquely select and double click an item in the list view. Any idea or solution to this problem is greatly appreciated. Thanks in advance. -
Hi, I am new to Windows programming. I am trying to uniquely select and double click an item in the list view (SysListView32) in third party software. This task is somewhat similar to MyProgram trying to double click an item in a ControlPanel-like list view. To accomplish this I am sending a LVM_FINDITEM message to get the item index of the item to be double clicked.
LVFINDINFO lvfi; ZeroMemory(&lvfi, sizeof(LVFINDINFO)); lvfi.flags = LVFI_STRING; lvfi.psz = (LPCTSTR)"Item Name"; int itemIndex = ::SendMessage( aControlHWnd, LVM_FINDITEM, (WPARAM)(int)(iStart), (LPARAM)(const LVFINDINFO *)(&lvfi));
This send message is causing a runtime error. After going through some forums and message boards I found that this is due to one of the message parameter which is a pointer to a structure, as you cannot pass a pointer-to-memory to another process. :sigh: Now I would like to know how to custom marshal this message to the other process? :confused: OR Any alternative solution to uniquely select and double click an item in the list view. Any idea or solution to this problem is greatly appreciated. Thanks in advance. -
scody wrote:
uniquely select and double click an item in the list view.
So you need to get the list view item when the user double clicks, right?
No, I need to double click a list view item. Sorry, if it is confusing.. For example, if I want to double click an item named "Item Name", I should be able to click it irrespective of wherever it is positioned in the list, so I called it uniquely(that’s an exaggeration!) select.
-
No, I need to double click a list view item. Sorry, if it is confusing.. For example, if I want to double click an item named "Item Name", I should be able to click it irrespective of wherever it is positioned in the list, so I called it uniquely(that’s an exaggeration!) select.
-
scody wrote:
I need to double click a list view item.
Have you added the double clicked event on the listview? After a list view item being double clicked, what will the program do next?
I dont have access to the code of the third party software where I am double clicking the item. I just want to invoke the item to perform some task, as if some user is double clicking the item. To cut short I am trying to test the GUI of the third party software.
-
I dont have access to the code of the third party software where I am double clicking the item. I just want to invoke the item to perform some task, as if some user is double clicking the item. To cut short I am trying to test the GUI of the third party software.
-
I dont have access to the code of the third party software where I am double clicking the item. I just want to invoke the item to perform some task, as if some user is double clicking the item. To cut short I am trying to test the GUI of the third party software.
-
And this is possible without any elevated user rights? :wtf::omg: Sorry I must leave, the "Security Breach"-Alarm jut got off.
Let's think the unthinkable, let's do the undoable, let's prepare to grapple with the ineffable itself, and see if we may not eff it after all.
Douglas Adams, "Dirk Gently's Holistic Detective Agency"