Recent

Author Topic: LCL versus FreePascal - TOwnerDrawState - TOwnerDrawStateType  (Read 1504 times)

PeterX

  • Sr. Member
  • ****
  • Posts: 404
LCL versus FreePascal - TOwnerDrawState - TOwnerDrawStateType
« on: August 06, 2021, 10:38:59 pm »
While replacing unit JwaWindows with the default Windows unit in an old project
I at first wasn't able to solve a conflict ..


In the release 2.0.12 Lazarus Version ..

redef.inc (FreePascal)  defines in Line 72
Code: Pascal  [Select][+][-]
  1. TOwnerDrawState = set of (
  2. ..
  3.  

instead LCLType.pp defines in Line 1142
Code: Pascal  [Select][+][-]
  1.   TOwnerDrawStateType = (
  2.   ...
  3.   TOwnerDrawState = set of TOwnerDrawStateType;
  4.  


I had to place unit LCLType behind unit Windows
to "overwrite" the type TOwnerDrawState with the one
that LCL uses in unit stdctrls.pp in line 262

Code: Pascal  [Select][+][-]
  1.   TDrawItemEvent = procedure(Control: TWinControl; Index: Integer;
  2.                              ARect: TRect; State: TOwnerDrawState) of object;
  3.  

TDrawItemEvent  does not use TOwnerDrawStateType.
This does not look good to me ..
Somebody knows if this is "fixed" in the next release ?
usually using latest Lazarus release version with Windows 10

 

TinyPortal © 2005-2018