public override bool DoesCurrentMouseDownEndAllTracking(Message m, Point pt)
{
// Convert point to the ribbon control coordinates
Point screenPt = PointToScreen(pt);
Point ribbonPt = _ribbon.PointToClient(screenPt);
// If the base class wants to end tracking and not inside the ribbon control
return base.DoesCurrentMouseDownEndAllTracking(m, pt) &&
!_ribbon.ClientRectangleWithoutComposition.Contains(ribbonPt) &&
_captionArea.DoesCurrentMouseDownEndAllTracking(screenPt);
}