Autor Beitrag
toni
Hält's aus hier
Beiträge: 4


D5 Prof
BeitragVerfasst: Do 07.07.05 13:51 
hallo,
ich möchte aufgrund meines fensterwindows oder handles meine processid bzw. processname ermitteln um entscheiden zu können ob window sauber geclosed werden kann.

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
var  
  NextHandle: Hwnd;  
  NextTitle: array[0..260] of char;  
begin  
  NextHandle := GetWindow(Application.Handle, GW_HWNDFIRST);  
  while NextHandle > 0 do  
  begin  
    GetWindowText(NextHandle, NextTitle, 255);  
    // ??????   if nexttitle = 'xy.exe' then
    // ??????      postmessage(nexthandle, WM_CLOSE, 0, 0); 
    NextHandle := GetWindow(NextHandle, GW_HWNDNEXT);  
  end;  
end;

kann jemand helfen???

Moderiert von user profile iconMotzi: Code- durch Delphi-Tags ersetzt.
uall@ogc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1826
Erhaltene Danke: 11

Win 2000 & VMware
Delphi 3 Prof, Delphi 7 Prof
BeitragVerfasst: Do 07.07.05 14:19 

_________________
wer andern eine grube gräbt hat ein grubengrabgerät
- oder einfach zu viel zeit