Ver Mensaje Individual
  #10  
Antiguo 11-01-2017
Avatar de escafandra
[escafandra] escafandra is offline
Miembro Premium
 
Registrado: nov 2007
Posts: 2.195
Reputación: 20
escafandra Tiene un aura espectacularescafandra Tiene un aura espectacular
Código Delphi [-]
function GetWindowText: WideString;
var
  TextLength: Integer;
  Text: PWideChar;
  Wnd: HWND;
begin
  Wnd:= GetActiveWindow;
  TextLength:= SendMessageW(Wnd, WM_GETTEXTLENGTH, 0, 0);
  if TextLength <> 0 then
  begin
    GetMem(Text, TextLength * 2 + 2);
    SendMessageW(Wnd, WM_GETTEXT, WPARAM(TextLength*2 + 2), LPARAM(Text));
    Result := Text;
    FreeMem(Text);
  end;
end;


Saludos.
Responder Con Cita