Skip to content

Commit

Permalink
Fixed issue JAM-Software#458: If the Virtual TreeView control is plac…
Browse files Browse the repository at this point in the history
…ed on a control that has the StyleEx flag WS_EX_COMPOSITED set, horizontal scrolloing does not update the header

# Conflicts:
#	Source/VirtualTrees.pas
  • Loading branch information
Joachim Marder authored and ValtsS committed Jan 24, 2019
1 parent 31a94c5 commit 23848d0
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions Source/VirtualTrees.pas
Original file line number Diff line number Diff line change
Expand Up @@ -18970,13 +18970,9 @@ procedure TBaseVirtualTree.WMNCPaint(var Message: TRealWMNCPaint);
DC := GetDCEx(Handle, Message.Rgn, Flags or DCX_INTERSECTRGN);

if DC <> 0 then
begin
if hoVisible in FHeader.FOptions then
begin
R := FHeaderRect;
FHeader.FColumns.PaintHeader(DC, R, -FEffectiveOffsetX);
end;
try
OriginalWMNCPaint(DC);
finally
ReleaseDC(Handle, DC);
end;
if tsUseThemes in FStates then
Expand All @@ -18986,7 +18982,8 @@ procedure TBaseVirtualTree.WMNCPaint(var Message: TRealWMNCPaint);
//----------------------------------------------------------------------------------------------------------------------

procedure TBaseVirtualTree.WMPaint(var Message: TWMPaint);

var
DC: HDC;
begin
if tsVCLDragging in FStates then
ImageList_DragShowNolock(False);
Expand All @@ -18999,6 +18996,17 @@ procedure TBaseVirtualTree.WMPaint(var Message: TWMPaint);

if tsVCLDragging in FStates then
ImageList_DragShowNolock(True);

if hoVisible in FHeader.FOptions then
begin
DC := GetDCEx(Handle, 0, DCX_CACHE or DCX_CLIPSIBLINGS or DCX_WINDOW or DCX_VALIDATE);
if DC <> 0 then
try
FHeader.FColumns.PaintHeader(DC, FHeaderRect, -FEffectiveOffsetX);
finally
ReleaseDC(Handle, DC);
end;
end;//if header visible
end;

//----------------------------------------------------------------------------------------------------------------------
Expand Down

0 comments on commit 23848d0

Please sign in to comment.