mirror of
https://github.com/reactos/reactos.git
synced 2024-12-29 10:35:28 +00:00
DefWndHandleSetCursor() sets default cursor for maximized windows' borders
svn path=/trunk/; revision=7150
This commit is contained in:
parent
6c6cd533e1
commit
df068a3bdb
1 changed files with 23 additions and 5 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: defwnd.c,v 1.111 2003/12/19 23:20:05 weiden Exp $
|
/* $Id: defwnd.c,v 1.112 2003/12/20 22:33:45 weiden Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS user32.dll
|
* PROJECT: ReactOS user32.dll
|
||||||
|
@ -283,7 +283,7 @@ DefWndSetRedraw(HWND hWnd, WPARAM wParam)
|
||||||
|
|
||||||
|
|
||||||
LRESULT
|
LRESULT
|
||||||
DefWndHandleSetCursor(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
DefWndHandleSetCursor(HWND hWnd, WPARAM wParam, LPARAM lParam, ULONG Style)
|
||||||
{
|
{
|
||||||
/* Not for child windows. */
|
/* Not for child windows. */
|
||||||
if (hWnd != (HWND)wParam)
|
if (hWnd != (HWND)wParam)
|
||||||
|
@ -318,24 +318,40 @@ DefWndHandleSetCursor(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
case HTLEFT:
|
case HTLEFT:
|
||||||
case HTRIGHT:
|
case HTRIGHT:
|
||||||
{
|
{
|
||||||
|
if (Style & WS_MAXIMIZE)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
return((LRESULT)SetCursor(LoadCursorW(0, IDC_SIZEWE)));
|
return((LRESULT)SetCursor(LoadCursorW(0, IDC_SIZEWE)));
|
||||||
}
|
}
|
||||||
|
|
||||||
case HTTOP:
|
case HTTOP:
|
||||||
case HTBOTTOM:
|
case HTBOTTOM:
|
||||||
{
|
{
|
||||||
|
if (Style & WS_MAXIMIZE)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
return((LRESULT)SetCursor(LoadCursorW(0, IDC_SIZENS)));
|
return((LRESULT)SetCursor(LoadCursorW(0, IDC_SIZENS)));
|
||||||
}
|
}
|
||||||
|
|
||||||
case HTTOPLEFT:
|
case HTTOPLEFT:
|
||||||
case HTBOTTOMRIGHT:
|
case HTBOTTOMRIGHT:
|
||||||
{
|
{
|
||||||
|
if (Style & WS_MAXIMIZE)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
return((LRESULT)SetCursor(LoadCursorW(0, IDC_SIZENWSE)));
|
return((LRESULT)SetCursor(LoadCursorW(0, IDC_SIZENWSE)));
|
||||||
}
|
}
|
||||||
|
|
||||||
case HTBOTTOMLEFT:
|
case HTBOTTOMLEFT:
|
||||||
case HTTOPRIGHT:
|
case HTTOPRIGHT:
|
||||||
{
|
{
|
||||||
|
if (GetWindowLongW(hWnd, GWL_STYLE) & WS_MAXIMIZE)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
return((LRESULT)SetCursor(LoadCursorW(0, IDC_SIZENESW)));
|
return((LRESULT)SetCursor(LoadCursorW(0, IDC_SIZENESW)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -416,7 +432,7 @@ DefWndStartSizeMove(HWND hWnd, WPARAM wParam, POINT *capturePoint)
|
||||||
*capturePoint = pt;
|
*capturePoint = pt;
|
||||||
}
|
}
|
||||||
SetCursorPos( pt.x, pt.y );
|
SetCursorPos( pt.x, pt.y );
|
||||||
DefWndHandleSetCursor(hWnd, (WPARAM)hWnd, MAKELONG(hittest, WM_MOUSEMOVE));
|
DefWndHandleSetCursor(hWnd, (WPARAM)hWnd, MAKELONG(hittest, WM_MOUSEMOVE), Style);
|
||||||
return hittest;
|
return hittest;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1176,7 +1192,9 @@ User32DefWindowProc(HWND hWnd,
|
||||||
|
|
||||||
case WM_SETCURSOR:
|
case WM_SETCURSOR:
|
||||||
{
|
{
|
||||||
if (GetWindowLongW(hWnd, GWL_STYLE) & WS_CHILD)
|
ULONG Style = GetWindowLongW(hWnd, GWL_STYLE);
|
||||||
|
|
||||||
|
if (Style & WS_CHILD)
|
||||||
{
|
{
|
||||||
if (LOWORD(lParam) < HTLEFT || LOWORD(lParam) > HTBOTTOMRIGHT)
|
if (LOWORD(lParam) < HTLEFT || LOWORD(lParam) > HTBOTTOMRIGHT)
|
||||||
{
|
{
|
||||||
|
@ -1197,7 +1215,7 @@ User32DefWindowProc(HWND hWnd,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return (DefWndHandleSetCursor(hWnd, wParam, lParam));
|
return (DefWndHandleSetCursor(hWnd, wParam, lParam, Style));
|
||||||
}
|
}
|
||||||
|
|
||||||
case WM_SYSCOMMAND:
|
case WM_SYSCOMMAND:
|
||||||
|
|
Loading…
Reference in a new issue