Forum > Win32/64

[SOLVED] Declarations clean up inside win32callback.inc

(1/1)

lagprogramming:
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

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---{$IF NOT DECLARED(WM_DPICHANGED)} // WM_DPICHANGED was added in FPC 3.1.1const  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

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---// FlashWindowEx is not (yet) in FPCtype  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.

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---diff --git a/lcl/interfaces/win32/win32callback.inc b/lcl/interfaces/win32/win32callback.incindex 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);

Bart:
Is FLASHWINFO  present in fpc 3.2.0 as well?

Bart

AlexTP:
Posted to https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/40433

AlexTP:

--- Quote from: Bart on August 07, 2023, 11:35:41 am ---Is FLASHWINFO  present in fpc 3.2.0 as well

--- End quote ---
Yes.
https://gitlab.com/freepascal.org/fpc/source/-/commit/3a6d0d9d41a22bb628379b2cf25ca1bd926c8b59

Navigation

[0] Message Index

Go to full version