Ver Mensaje Individual
  #5  
Antiguo 01-04-2009
Avatar de cHackAll
[cHackAll] cHackAll is offline
Baneado?
 
Registrado: oct 2006
Posts: 2.159
Reputación: 20
cHackAll Va por buen camino
Aunque funciona, "buscar" una ventana no significa encontrar la que tu has creado;

Código Delphi [-]
function EnumThreadWndProc(hWnd, lParam: Cardinal): LongBool; stdcall;
begin
 Result := not SetWindowPos(hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE or SWP_NOSIZE);
end;
 
var si: TStartupInfo = (cb: SizeOf(si));
 
procedure TForm1.Button1Click(Sender: TObject);
var pi: TProcessInformation;
begin
 CreateProcess(nil, 'calc', nil, nil, False, 0, nil, nil, si, pi);
 WaitForInputIdle(pi.hProcess, INFINITE);
 EnumThreadWindows(pi.dwThreadId, @EnumThreadWndProc, 0);
end;
__________________
RTFM > STFW > Foro > Truco > Post > cHackAll > KeBugCheckEx
Responder Con Cita