Forum: Win32/Win64 API (native code)
Delphi
by sakura,
24. Jun 2002
Okay, die letzte Möglichkeit war nicht perfekt. Diese Lösung ist wohl besser.
function NT_InternalGetWindowText(Wnd: HWND): String;
type
TInternalGetWindowText = function(Wnd: HWND;lpString: PWideChar;nMaxCount: Integer): Integer; stdcall;
var
hUserDll: THandle;
InternalGetWindowText: TInternalGetWindowText;
lpString: array of WideChar; //Buffer for window caption
oemStr :...
Forum: Win32/Win64 API (native code)
Delphi
by sakura,
24. Jun 2002
Folgende drei Zeilen müssen geändert werden.
lpString: array of WideChar; //Buffer for window caption
InternalGetWindowText(Wnd, @lpString, SizeOf(lpString));
Result := AnsiString(lpString);
Das wars.