@@ -9886,6 +9886,9 @@ function TVTHeader.HandleMessage(var Message: TLMessage): Boolean;
9886
9886
with TLMLButtonDblClk(Message) do
9887
9887
P := Point(XPos, YPos);
9888
9888
9889
+ IsInHeader := InHeader(P);
9890
+ Result := IsInHeader;
9891
+
9889
9892
if (hoHeightDblClickResize in FOptions) and InHeaderSplitterArea(P) and (FDefaultHeight > 0) then
9890
9893
begin
9891
9894
if DoHeightDblClickResize(P, GetShiftState) and (FDefaultHeight > 0) then
@@ -9901,7 +9904,7 @@ function TVTHeader.HandleMessage(var Message: TLMessage): Boolean;
9901
9904
Message.Result := 0;
9902
9905
Result := True;
9903
9906
end
9904
- else if InHeader(P) and (Message.Msg <> LM_LBUTTONDBLCLK) then
9907
+ else if IsInHeader and (Message.Msg <> LM_LBUTTONDBLCLK) then
9905
9908
begin
9906
9909
case Message.Msg of
9907
9910
LM_MBUTTONDBLCLK:
@@ -9972,9 +9975,9 @@ function TVTHeader.HandleMessage(var Message: TLMessage): Boolean;
9972
9975
// Disabled columns do not start a drag operation because they can't be clicked.
9973
9976
Include(FStates, hsDragPending);
9974
9977
SetCapture(Treeview.Handle);
9975
- Result := True;
9976
9978
Message.Result := 0;
9977
9979
end;
9980
+ Result := True;
9978
9981
end;
9979
9982
9980
9983
// This is a good opportunity to notify the application.
@@ -23864,9 +23867,11 @@ procedure TBaseVirtualTree.WndProc(var Message: TLMessage);
23864
23867
//lclheader
23865
23868
//let the header handle the message here
23866
23869
//otherwise no header click event will be fired
23867
- FHeader.HandleMessage(Message);
23868
- ControlState := ControlState + [csLButtonDown];
23869
- Dispatch(Message); // overrides TControl's BeginDrag
23870
+ if not FHeader.HandleMessage(Message) then
23871
+ begin
23872
+ ControlState := ControlState + [csLButtonDown];
23873
+ Dispatch(Message); // overrides TControl's BeginDrag
23874
+ end;
23870
23875
end;
23871
23876
end;
23872
23877
end;
0 commit comments