From 49c936483a8b28dd0db95d0f34e407c4015a4df1 Mon Sep 17 00:00:00 2001 From: Joachim Marder Date: Mon, 8 Apr 2024 23:10:53 +0200 Subject: [PATCH] Fixed issue #1248, Fixed compiler warning. --- Source/VirtualTrees.pas | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Source/VirtualTrees.pas b/Source/VirtualTrees.pas index 1a0451ac..d6c802b4 100644 --- a/Source/VirtualTrees.pas +++ b/Source/VirtualTrees.pas @@ -2538,7 +2538,6 @@ TBaseVirtualTree = class(TCustomControl) procedure WMThemeChanged(var Message: TMessage); message WM_THEMECHANGED; procedure WMVScroll(var Message: TWMVScroll); message WM_VSCROLL; function GetRangeX: Cardinal; - function GetDoubleBuffered: Boolean; procedure SetDoubleBuffered(const Value: Boolean); function GetVclStyleEnabled: Boolean; inline; procedure SetOnPrepareButtonImages(const Value: TVTPrepareButtonImagesEvent); @@ -2721,6 +2720,7 @@ TBaseVirtualTree = class(TCustomControl) ImgCheckState: TCheckState = csUncheckedNormal; ImgEnabled: Boolean = True): Integer; virtual; function GetColumnClass: TVirtualTreeColumnClass; virtual; function GetDefaultHintKind: TVTHintKind; virtual; + function GetDoubleBuffered: Boolean; {$if CompilerVersion >= 36} override; {$ifend} function GetHeaderClass: TVTHeaderClass; virtual; function GetHintWindowClass: THintWindowClass; virtual; procedure GetImageIndex(var Info: TVTPaintInfo; Kind: TVTImageKind; InfoIndex: TVTImageInfoIndex); virtual; @@ -17823,6 +17823,12 @@ procedure TBaseVirtualTree.WMPrintClient(var Message: TWMPrintClient); Canvas: TCanvas; begin + if RTLVersion >= 36 then // see issue #1248, for newer Delphi versions use inherited version of WMPrintClient() + begin + inherited; + exit; + end; + // Draw only if the window is visible or visibility is not required. if ((Message.Flags and PRF_CHECKVISIBLE) = 0) or IsWindowVisible(Handle) then begin