mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-13 10:19:16 +02:00
win32: Move WndText, WndClassName to win32proc to use for debugging in more units
git-svn-id: trunk@24959 -
This commit is contained in:
parent
bc2f3b23e6
commit
6469d26fdd
@ -51,22 +51,6 @@ begin
|
|||||||
Assert(False, 'Trace:PropEnumProc - Exit');
|
Assert(False, 'Trace:PropEnumProc - Exit');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function WndClassName(Wnd: HWND): String; inline;
|
|
||||||
var
|
|
||||||
winClassName: array[0..19] of char;
|
|
||||||
begin
|
|
||||||
GetClassName(Wnd, @winClassName, 20);
|
|
||||||
Result := winClassName;
|
|
||||||
end;
|
|
||||||
|
|
||||||
function WndText(Wnd: HWND): String; inline;
|
|
||||||
var
|
|
||||||
winText: array[0..255] of char;
|
|
||||||
begin
|
|
||||||
GetWindowText(Wnd, @winText, 256);
|
|
||||||
Result := winText;
|
|
||||||
end;
|
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
Function: CallDefaultWindowProc
|
Function: CallDefaultWindowProc
|
||||||
Params: Window - The window that receives a message
|
Params: Window - The window that receives a message
|
||||||
|
@ -134,6 +134,9 @@ procedure BlendRect(ADC: HDC; const ARect: TRect; Color: ColorRef);
|
|||||||
function GetLastErrorText(AErrorCode: Cardinal): String;
|
function GetLastErrorText(AErrorCode: Cardinal): String;
|
||||||
function BitmapToRegion(hBmp: HBITMAP; cTransparentColor: COLORREF = 0; cTolerance: COLORREF = $101010): HRGN;
|
function BitmapToRegion(hBmp: HBITMAP; cTransparentColor: COLORREF = 0; cTolerance: COLORREF = $101010): HRGN;
|
||||||
|
|
||||||
|
function WndClassName(Wnd: HWND): String; inline;
|
||||||
|
function WndText(Wnd: HWND): String; inline;
|
||||||
|
|
||||||
{ String functions that may be moved to the RTL in the future }
|
{ String functions that may be moved to the RTL in the future }
|
||||||
function WideStrLCopy(dest, source: PWideChar; maxlen: SizeInt): PWideChar;
|
function WideStrLCopy(dest, source: PWideChar; maxlen: SizeInt): PWideChar;
|
||||||
procedure UpdateWindowsVersion;
|
procedure UpdateWindowsVersion;
|
||||||
@ -286,6 +289,7 @@ begin
|
|||||||
// edit control messages start (todo: add more if needed)
|
// edit control messages start (todo: add more if needed)
|
||||||
$00B0: Result := 'EM_GETSEL';
|
$00B0: Result := 'EM_GETSEL';
|
||||||
$00B1: Result := 'EM_SETSEL';
|
$00B1: Result := 'EM_SETSEL';
|
||||||
|
$00B7: Result := 'EM_SCROLLCARET';
|
||||||
$00C5: Result := 'EM_LIMITTEXT';
|
$00C5: Result := 'EM_LIMITTEXT';
|
||||||
$00CC: Result := 'EM_SETPASSWORDCHAR';
|
$00CC: Result := 'EM_SETPASSWORDCHAR';
|
||||||
$00CF: Result := 'EM_SETREADONLY';
|
$00CF: Result := 'EM_SETREADONLY';
|
||||||
@ -443,6 +447,7 @@ begin
|
|||||||
$0312: Result := 'WM_HOTKEY';
|
$0312: Result := 'WM_HOTKEY';
|
||||||
$0317: Result := 'WM_PRINT';
|
$0317: Result := 'WM_PRINT';
|
||||||
$0318: Result := 'WM_PRINTCLIENT';
|
$0318: Result := 'WM_PRINTCLIENT';
|
||||||
|
$031F: Result := 'WM_DWMNCRENDERINGCHANGED';
|
||||||
$0358: Result := 'WM_HANDHELDFIRST';
|
$0358: Result := 'WM_HANDHELDFIRST';
|
||||||
$035F: Result := 'WM_HANDHELDLAST';
|
$035F: Result := 'WM_HANDHELDLAST';
|
||||||
$0380: Result := 'WM_PENWINFIRST';
|
$0380: Result := 'WM_PENWINFIRST';
|
||||||
@ -1776,6 +1781,22 @@ begin
|
|||||||
Result := Dest;
|
Result := Dest;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function WndClassName(Wnd: HWND): String; inline;
|
||||||
|
var
|
||||||
|
winClassName: array[0..19] of char;
|
||||||
|
begin
|
||||||
|
GetClassName(Wnd, @winClassName, 20);
|
||||||
|
Result := winClassName;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function WndText(Wnd: HWND): String; inline;
|
||||||
|
var
|
||||||
|
winText: array[0..255] of char;
|
||||||
|
begin
|
||||||
|
GetWindowText(Wnd, @winText, 256);
|
||||||
|
Result := winText;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure UpdateWindowsVersion;
|
procedure UpdateWindowsVersion;
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user