![]() |
Inhalte aus EnumWindow vergleichen!
Hi,
ich benutze folgenden Code um alle aktiven Programme zu listen...
Delphi-Quellcode:
Wie kann ich nun schauen ob die Einträge die hinzugefügt werden schon in der liste sind...
function EnumWindowsProc (Wnd: HWND; LParam: LPARAM): BOOL; stdcall;
var Bezeichnung : Array[0..200] of Char; begin if (IsWindowVisible(Wnd) or IsIconic(wnd)) and ((GetWindowLong(Wnd, GWL_HWNDPARENT) = 0) or (GetWindowLong(Wnd, GWL_HWNDPARENT) = GetDesktopWindow)) and (GetWindowLong(Wnd, GWL_EXSTYLE) and WS_EX_TOOLWINDOW = 0) then begin GetWindowText(Wnd, Bezeichnung, 256); Form1.listbox1.Items.Add(Bezeichnung); end; end; procedure TForm1.Timer1Timer(Sender: TObject); begin EnumWindows(@EnumWindowsProc, 1); end; So das nur die Programme hinzugefügt werden die noch nicht gelistet sind. |
Re: Inhalte aus EnumWindow vergleichen!
Delphi-Quellcode:
GetWindowText(Wnd, Bezeichnung, 256);
if Form1.ListBox1.Items.IndexOf( Bezeichnung) = -1 then Form1.listbox1.Items.Add(Bezeichnung); |
Alle Zeitangaben in WEZ +1. Es ist jetzt 05:17 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