According to the docs/INSTALL.txt file, Lazarus requires FPC (Free Pascal) version 3.2.0 (or newer). FPC 3.2.0 has been released in 2020-06-16.
lcl/interfaces/win32/win32callback.inc has the following lines:
1/2{$IF NOT DECLARED(WM_DPICHANGED)} // WM_DPICHANGED was added in FPC 3.1.1
const
WM_DPICHANGED = $02E0;
{$ENDIF}
WM_DPICHANGED has been added to rtl/win/wininc/messages.inc at Dec 01, 2016 by commit aef26e86: * Fix bug #31040
2/2// FlashWindowEx is not (yet) in FPC
type
FLASHWINFO = record
cbSize: UINT;
hwnd: HWND;
dwFlags: DWORD;
uCount: UINT;
dwTimeout: DWORD;
end;
PFLASHWINFO = ^FLASHWINFO;
function FlashWindowEx(pfwi:PFLASHWINFO):WINBOOL; stdcall; external 'user32' name 'FlashWindowEx';
On Feb 09, 2019, FlashWindowEx has been added to rtl/win/wininc/struct.inc and rtl/win/wininc/func.inc by commit 3a6d0d9d: * flashwindowex, mantis #35048, patch by 440bx
The following patch removes the declarations from LCL. I had no problems crosscompiling from Linux to Windows. I don't have Windows, so this time you have to test it, too. Rebuilding Lazarus clean in Windows might be enough.
diff --git a/lcl/interfaces/win32/win32callback.inc b/lcl/interfaces/win32/win32callback.inc
index f582cfba22..85f2873057 100644
--- a/lcl/interfaces/win32/win32callback.inc
+++ b/lcl/interfaces/win32/win32callback.inc
@@ -890,19 +890,6 @@ begin
end;
end;
-// FlashWindowEx is not (yet) in FPC
-type
- FLASHWINFO = record
- cbSize: UINT;
- hwnd: HWND;
- dwFlags: DWORD;
- uCount: UINT;
- dwTimeout: DWORD;
- end;
- PFLASHWINFO = ^FLASHWINFO;
-
-function FlashWindowEx(pfwi:PFLASHWINFO):WINBOOL; stdcall; external 'user32' name 'FlashWindowEx';
-
procedure TWindowProcHelper.HandleSetCursor;
var
lControl: TControl;
@@ -2023,10 +2010,6 @@ var
ACtl: TWinControl;
LMouseEvent: TTRACKMOUSEEVENT;
MaximizedActiveChild: WINBOOL;
-{$IF NOT DECLARED(WM_DPICHANGED)} // WM_DPICHANGED was added in FPC 3.1.1
-const
- WM_DPICHANGED = $02E0;
-{$ENDIF}
begin
try
LMessage := Default(TLMessage);