mirror of
https://github.com/reactos/reactos.git
synced 2024-08-30 23:28:58 +00:00
fixed hittest code to return HTBORDER if it's not a sizable window frame
svn path=/trunk/; revision=6738
This commit is contained in:
parent
967fd54cdd
commit
0758139146
|
@ -606,8 +606,13 @@ DefWndNCHitTest(HWND hWnd, POINT Point)
|
||||||
YSize = GetSystemMetrics(SM_CYSIZE) * GetSystemMetrics(SM_CYBORDER);
|
YSize = GetSystemMetrics(SM_CYSIZE) * GetSystemMetrics(SM_CYBORDER);
|
||||||
if (!PtInRect(&WindowRect, Point))
|
if (!PtInRect(&WindowRect, Point))
|
||||||
{
|
{
|
||||||
|
BOOL ThickFrame;
|
||||||
|
|
||||||
|
ThickFrame = (Style & WS_THICKFRAME);
|
||||||
if (Point.y < WindowRect.top)
|
if (Point.y < WindowRect.top)
|
||||||
{
|
{
|
||||||
|
if(!ThickFrame)
|
||||||
|
return HTBORDER;
|
||||||
if (Point.x < (WindowRect.left + XSize))
|
if (Point.x < (WindowRect.left + XSize))
|
||||||
return HTTOPLEFT;
|
return HTTOPLEFT;
|
||||||
if (Point.x >= (WindowRect.right - XSize))
|
if (Point.x >= (WindowRect.right - XSize))
|
||||||
|
@ -616,6 +621,8 @@ DefWndNCHitTest(HWND hWnd, POINT Point)
|
||||||
}
|
}
|
||||||
if (Point.y >= WindowRect.bottom)
|
if (Point.y >= WindowRect.bottom)
|
||||||
{
|
{
|
||||||
|
if(!ThickFrame)
|
||||||
|
return HTBORDER;
|
||||||
if (Point.x < (WindowRect.left + XSize))
|
if (Point.x < (WindowRect.left + XSize))
|
||||||
return HTBOTTOMLEFT;
|
return HTBOTTOMLEFT;
|
||||||
if (Point.x >= (WindowRect.right - XSize))
|
if (Point.x >= (WindowRect.right - XSize))
|
||||||
|
@ -624,6 +631,8 @@ DefWndNCHitTest(HWND hWnd, POINT Point)
|
||||||
}
|
}
|
||||||
if (Point.x < WindowRect.left)
|
if (Point.x < WindowRect.left)
|
||||||
{
|
{
|
||||||
|
if(!ThickFrame)
|
||||||
|
return HTBORDER;
|
||||||
if (Point.y < (WindowRect.top + YSize))
|
if (Point.y < (WindowRect.top + YSize))
|
||||||
return HTTOPLEFT;
|
return HTTOPLEFT;
|
||||||
if (Point.y >= (WindowRect.bottom - YSize))
|
if (Point.y >= (WindowRect.bottom - YSize))
|
||||||
|
@ -632,6 +641,8 @@ DefWndNCHitTest(HWND hWnd, POINT Point)
|
||||||
}
|
}
|
||||||
if (Point.x >= WindowRect.right)
|
if (Point.x >= WindowRect.right)
|
||||||
{
|
{
|
||||||
|
if(!ThickFrame)
|
||||||
|
return HTBORDER;
|
||||||
if (Point.y < (WindowRect.top + YSize))
|
if (Point.y < (WindowRect.top + YSize))
|
||||||
return HTTOPRIGHT;
|
return HTTOPRIGHT;
|
||||||
if (Point.y >= (WindowRect.bottom - YSize))
|
if (Point.y >= (WindowRect.bottom - YSize))
|
||||||
|
|
Loading…
Reference in a new issue