Skip to content

Commit

Permalink
Fixed issue #1248 by removing own WMPrintClient() method.
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimmarder committed Apr 7, 2024
1 parent 10f854d commit dd2088d
Showing 1 changed file with 0 additions and 33 deletions.
33 changes: 0 additions & 33 deletions Source/VirtualTrees.BaseTree.pas
Original file line number Diff line number Diff line change
Expand Up @@ -879,7 +879,6 @@ TBaseVirtualTree = class abstract(TVTBaseAncestor)
procedure WMPaint(var Message: TWMPaint); message WM_PAINT;
procedure WMPaste(var Message: TWMPaste); message WM_PASTE;
procedure WMPrint(var Message: TWMPrint); message WM_PRINT;
procedure WMPrintClient(var Message: TWMPrintClient); message WM_PRINTCLIENT;
procedure WMRButtonDblClk(var Message: TWMRButtonDblClk); message WM_RBUTTONDBLCLK;
procedure WMRButtonDown(var Message: TWMRButtonDown); message WM_RBUTTONDOWN;
procedure WMRButtonUp(var Message: TWMRButtonUp); message WM_RBUTTONUP;
Expand Down Expand Up @@ -7686,38 +7685,6 @@ procedure TBaseVirtualTree.WMPrint(var Message: TWMPrint);

//----------------------------------------------------------------------------------------------------------------------

procedure TBaseVirtualTree.WMPrintClient(var Message: TWMPrintClient);

var
Window: TRect;
Target: TPoint;
Canvas: TCanvas;

begin
// Draw only if the window is visible or visibility is not required.
if ((Message.Flags and PRF_CHECKVISIBLE) = 0) or IsWindowVisible(Handle) then
begin
// Determine area of the entire tree to be displayed in the control.
Window := ClientRect;
Target := Window.TopLeft;

// The Window rectangle is given in client coordinates. We have to convert it into
// a sliding window of the tree image.
OffsetRect(Window, FEffectiveOffsetX, -FOffsetY);

Canvas := TCanvas.Create;
try
Canvas.Handle := Message.DC;
PaintTree(Canvas, Window, Target, [poBackground, poDrawFocusRect, poDrawDropMark, poDrawSelection, poGridLines]);
finally
Canvas.Handle := 0;
Canvas.Free;
end;
end;
end;

//----------------------------------------------------------------------------------------------------------------------

procedure TBaseVirtualTree.WMRButtonDblClk(var Message: TWMRButtonDblClk);

var
Expand Down

0 comments on commit dd2088d

Please sign in to comment.