![]() |
Re: Titelleiste eines fremden fensters auslesen
so:
Delphi-Quellcode:
function EnumWinProc(Wnd: THandle; LParam: LongInt): Boolean; stdcall;
var WinCaption : string; Len: integer; begin Result := True; Len := GetWindowTextLength(Wnd); SetLength(WinCaption, Len); GetWindowText(Wnd, PChar(WinCaption), Len+1); if Trim(WinCaption) <> '' then Form1.Listbox1.Items.Add(Format('%.6x : %s', [Wnd, WinCaption])); end; procedure TForm1.Button1Click(Sender: TObject); begin EnumWindows(@EnumWinProc, 0); end; |
Re: Titelleiste eines fremden fensters auslesen
habs hinbekommen:
Delphi-Quellcode:
function EnumWinProc(Wnd: THandle; LParam: LongInt): Boolean; stdcall;
var WinCaption : string; Len: integer; Buf : string; begin Result := True; Len := GetWindowTextLength(Wnd); SetLength(WinCaption, Len); GetWindowText(Wnd, PChar(WinCaption), Len+1); if Trim(WinCaption) <> '' then begin SetLength(Buf,SendMessage(wnd,WM_GETTEXTLENGTH,0,0)+1); SendMessage(wnd,WM_GETTEXT,length(Buf),Integer(@buf[1])); form1.listbox1.items.add(buf); end; end; |
Alle Zeitangaben in WEZ +1. Es ist jetzt 15:29 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz