Witam
Mam taki problemik i nie wiem jak sie do niego zabrac zabrakło mi pomysłów.
Pobieram sobie uchyty okien z innej aplikacji z formy która wyskakuje i jedno z okien typu CHILD jest listboxem i teraz nie wiem jak pobrać wartości elementów z tego listboxa. texty z okien których pobrałem uchwyty pobieram tak jak było na forum
chwyt_temp:=getwindow(uchwyt_temp,gw_child);
a potem
next_uchwyt:=getnextwindow(uchwyt_temp,GW_HWNDNEXT);
tyle ze to nie działa przy pobieraniu textu z listboxa
a potem
text:=NT_InternalGetWindowText(next_uchwyt);
Czy ktoś wie jak trzeba by to zrobić ?
pozdrawiam
Seba
//-------------------------------------------------------------------
function NT_InternalGetWindowText(Wnd: HWND): string;
type
TInternalGetWindowText = function(Wnd: HWND; lpString: PWideChar;
nMaxCount: Integer): Integer;
stdcall;
var
hUserDll: THandle;
InternalGetWindowText: TInternalGetWindowText;
lpString: array[0..MAX_PATH] of WideChar;
oemStr: PChar;
begin
Result := '';
hUserDll := GetModuleHandle('user32.dll');
if (hUserDll > 0) then
begin @InternalGetWindowText := GetProcAddress(hUserDll, 'InternalGetWindowText');
if Assigned(InternalGetWindowText) then
begin
InternalGetWindowText(Wnd, lpString, SizeOf(lpString));
Result := string(lpString);
end;
end;
end;