Вот мой код:
function GetNew(hw: HWND): BOOL; stdcall;
var s:Pchar;
begin
s:=GetMemory(200);
SendMessage(hw,WM_GetText,200,integer(s));
Form1.ListBox1.Items.Add(IntToStr(hw)+' - '+s);
FreeMemory(s);
EnumChildWindows(hw, @GetNew, 0);
end;
procedure TForm1.Button2Click(Sender: TObject);
var
s:Pchar;
p, Wnd, h:Hwnd;
buff: ARRAY [0..127] OF Char;
begin
ListBox1.Items.Clear;
p:=FindWindow(nil,'Single Code');
if p<>0 then
GetNew(p);
else
ShowMessage('Окно не найдено');
Но почемуто этот код не отображает все компоненты, как буд-то функции EnumChildWindows сказано найти только n-ое количество компонентов.
В чем может быть "ограничение"?
|