- Minor correction to hit testing algorithm

svn path=/trunk/; revision=8091
This commit is contained in:
Filip Navara 2004-02-08 15:13:22 +00:00
parent 50b64b7cd1
commit a99ec32abd

View file

@ -667,7 +667,7 @@ DefWndNCHitTest(HWND hWnd, POINT Point)
return HTBORDER;
}
if (Style & WS_CAPTION)
if ((Style & WS_CAPTION) == WS_CAPTION)
{
if (ExStyle & WS_EX_TOOLWINDOW)
WindowRect.top += GetSystemMetrics(SM_CYSMCAPTION);
@ -697,7 +697,7 @@ DefWndNCHitTest(HWND hWnd, POINT Point)
return HTMAXBUTTON;
if (Style & WS_MINIMIZEBOX)
WindowRect.right -= GetSystemMetrics(SM_CXSIZE);
if (Point.x >= WindowRect.right)
if (Point.x >= WindowRect.right)
return HTMINBUTTON;
return HTCAPTION;
}