Steps to reproduce:
- VCL PDFViewer demo.
- Hover over the Maximize button.
Expected results:
Windows 11 has a capability to snap layouts when you hover over the form's Maximize button
Snap Layouts popup appears
Current results:
TdxRibbonForm does not support snap layouts.
Please test the following code modification.
Replace the
TdxRibbonFormCaptionHelper.CalculateWindowCaptionHitTest
procedure's implementation in dxRibbonFormCaptionHelper.pas and use the Recompile option of our installer.procedure TdxRibbonFormCaptionHelper.CalculateWindowCaptionHitTest(var Message: TWMNCHitTest); var APoint: TPoint; begin if IsInCaptionArea(cxPoint(Message.XPos, Message.YPos)) then begin Message.Result := HTCAPTION; APoint := Control.ScreenToClient(cxPoint(Message.XPos, Message.YPos)); if cxRectPtIn(FBorderIconsArea, APoint) then begin StartMouseTimer; HotBorderIcon := GetBorderIconAtPoint(APoint); if HotBorderIcon <> tbiNone then begin if (HotBorderIcon = tbiMaximize) and IsWin11OrLater and (GetMouseKeys = 0) then Message.Result := HTMAXBUTTON else Message.Result := HTNOWHERE; Exit; end; end; if cxRectPtIn(FSysMenuBounds, APoint) then Message.Result := HTSYSMENU; HotBorderIcon := tbiNone; end; end;
Just stopping by to quickly say: Thank you!
(working with Delphi 12.1 + EAP 24.2.1)