scody
November 14th, 2007, 11:05 PM
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( HWnd, 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.
Now I would like to know how to custom marshal this message to the other process?
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.
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( HWnd, 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.
Now I would like to know how to custom marshal this message to the other process?
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.