
13.07.2012, 12:25
|
Прохожий
|
|
Регистрация: 13.07.2012
Сообщения: 6
Репутация: 10
|
|
Цитата:
Сообщение от Pyro
этой функцией можно
Код:
var
FoundCount: Integer;
FindNum: integer;
FindWho: string;
FoundHandle111: Cardinal; //0-last
function EnumFor(ParentHandle: Cardinal; TargetClass: string; index_from_1: Byte=0): Cardinal;
function Enumka(h: hWnd; p: Pointer): BOOL; stdcall;
begin
result := true;
if FindNum <> 0 then
begin
if GetClass(h) = FindWho then
inc(FoundCount);
if FoundCount = FindNum then
begin
FoundHandle111 := h;
result := false;
end
end else
if GetClass(h) = FindWho then
FoundHandle111 := h
end;
begin
FindWho := TargetClass;
FindNum := index_from_1;
FoundCount := 0;
FoundHandle := INVALID_HANDLE_VALUE;
EnumChildWindows(ParentHandle, @Enumka, 0);
result := FoundHandle111;
end;
|
А ЧТО ОНА ДЕЛАЕТ?))
|