mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 22:43:04 +00:00
For windows with WS_EX_DLGMODALFRAME sysmenu can be opened only by right mouse click
svn path=/trunk/; revision=24074
This commit is contained in:
parent
6f5c6f23d3
commit
17189649af
1 changed files with 7 additions and 3 deletions
|
@ -735,7 +735,7 @@ DefWndNCHitTest(HWND hWnd, POINT Point)
|
||||||
return HTBORDER;
|
return HTBORDER;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((Style & WS_CAPTION) == WS_CAPTION)
|
if (Style & WS_CAPTION)
|
||||||
{
|
{
|
||||||
if (ExStyle & WS_EX_TOOLWINDOW)
|
if (ExStyle & WS_EX_TOOLWINDOW)
|
||||||
WindowRect.top += GetSystemMetrics(SM_CYSMCAPTION);
|
WindowRect.top += GetSystemMetrics(SM_CYSMCAPTION);
|
||||||
|
@ -751,11 +751,15 @@ DefWndNCHitTest(HWND hWnd, POINT Point)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
WindowRect.left += GetSystemMetrics(SM_CXSIZE);
|
|
||||||
WindowRect.right -= GetSystemMetrics(SM_CXSIZE);
|
WindowRect.right -= GetSystemMetrics(SM_CXSIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// On windows with WS_EX_DLGMODALFRAME and
|
||||||
|
// WS_EX_TOOLWINDOW there is no system menu button.
|
||||||
|
if (!(ExStyle & WS_EX_DLGMODALFRAME) && !(ExStyle & WS_EX_TOOLWINDOW))
|
||||||
|
WindowRect.left += GetSystemMetrics(SM_CXSIZE);
|
||||||
}
|
}
|
||||||
if (Point.x <= WindowRect.left)
|
if (Point.x < WindowRect.left)
|
||||||
return HTSYSMENU;
|
return HTSYSMENU;
|
||||||
if (WindowRect.right <= Point.x)
|
if (WindowRect.right <= Point.x)
|
||||||
return HTCLOSE;
|
return HTCLOSE;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue