Skip to content

Commit

Permalink
Easy move small main window when tab on titlebar (#2489)
Browse files Browse the repository at this point in the history
  • Loading branch information
lededev authored Oct 23, 2024
1 parent ba98393 commit 7c7e651
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Src/TitleBarHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,11 @@ LRESULT CTitleBarHelper::OnNcHitTest(CPoint pt)
if (rc.right - borderWidth <= pt.x)
return HTRIGHT;
if (pt.x < rc.left + leftMargin)
{
if (pt.x > rc.left + leftMargin * 2 / 3)
return HTCAPTION;
return HTSYSMENU;
}
for (int i = 0; i < 3; i++)
{
static const int htbuttons[]{ HTMINBUTTON, HTMAXBUTTON, HTCLOSE };
Expand Down

0 comments on commit 7c7e651

Please sign in to comment.