How to programmatically click a checkbox inside SysListView32 in another app?

0 like 0 dislike
5 views
There is a legacy application, one of which looks like this:

ad909a6b2fa411c46ac7e4c77d092841.png


I need to programmatically remove a tick from checkbox's inside this list.

Handle the window handle of the list have already received, and what to do next? How to get to these checkbox's?


The program is written in Delphi.

// search for a window titled "Select Tools"
SelectToolsHandle:=GetWindowHandle('Select Tools');
if (SelectToolsHandle <> 0) then begin
// looking for list
SysListHandle:=FindWindowEx(SelectToolsHandle, 0, 'SysListView32', nil);
if (SysListHandle <> 0) then begin
showmessage(IntToStr(SysListHandle)); // handle the list returned
// What to do next?(
end;
end;
by | 5 views

3 Answers

0 like 0 dislike
Two options:
\r
1. Or to emulate keystrokes\\mouse that is bad.
\r
2. Or with the help of hooks loaded in the process address space and using LVM_SETITEMSTATE, which is good, but difficult.
by
0 like 0 dislike
I think this is what you're looking for:
by
0 like 0 dislike
Thank you all, a little bypassed the problem, I noticed that the tick is removed, if the selected item press the Spacebar. So got a text item from the list, helped the following article:
\rhttp://www.ddsoft.hoha.ru/notes/lvmgetitem/
And after that simply select the necessary item and emulated the press, helped with the following code:
\rhttp://www.delphisources.ru/forum/showthread.php?t=8592
by

Related questions

0 like 0 dislike
4 answers
0 like 0 dislike
1 answer
asked Apr 27, 2019 by Maxim_Evg3nievich
0 like 0 dislike
4 answers
0 like 0 dislike
2 answers
110,608 questions
257,186 answers
0 comments
1,120 users