Windows Message
-
Also, hab mitlerweile alles mir bekannte abgegrast.
1. ?Lösung? gefunden, nicht draus schlau gewordenGibts eine Windowsmessage wenn ein neuer Prozess startet?
Und wenn, wie kann ich darauf reagieren?Danke
-
*push*
-
Servus,
keine Ahnung obs dafür eine WM gibt aber ich denke mal du wartest auf einen bestimmten Prozess. Vielleicht sollte man die Sache etwas anders angehen.
Bsp:
HANDLE snapshot; PROCESSENTRY32 proc; proc.dwSize = sizeof(PROCESSENTRY32); do { snapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); Process32First(snapshot, &proc); CString strProcess = proc.szExeFile; }while (TRUE == Process32Next(snapshot, &proc));
So kannst du die laufenden Prozesse feststellen. Vielleicht hilft dir das weiter...
*winke*
Hellsgore
-
Ja warte auf nen bestimmten prozess, bzw. auf ein bestimmtes fenster.
Hatte probiert (wie in meinem anderen thread) via schleife im thread ständig die fenster abzufrage. beim ersten klappt es, aber wenn das fenster direkt ein zweites mal kommt, gibt das probleme
werd mal deine lösung ausprobieren
-
ok, code war gut,muss aber so aussehen:
#include "Tlhelp32.h" HANDLE snapshot; PROCESSENTRY32 proc; proc.dwSize = sizeof(PROCESSENTRY32); snapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); do { Process32Next(snapshot, &proc); CString strProcess = proc.szExeFile; }while (TRUE == Process32Next(snapshot, &proc));
-
mhh ok, schön und gut. bloß wie kann ich mir jetzt den WindowText holen oder ähnliches??
Steh jetzt nen bissel aufm schlauch, bin noch etwas platt (da 2 tage krank gewesen)
thx