user32: Correctly handle mouse events on a size grip scrollbar.

This commit is contained in:
Alexandre Julliard 2010-10-12 11:43:21 +02:00
parent 299f2b354e
commit 90ba8ceb07

View File

@ -1426,6 +1426,13 @@ LRESULT ScrollBarWndProc_common( HWND hwnd, UINT message, WPARAM wParam, LPARAM
case WM_LBUTTONDBLCLK: case WM_LBUTTONDBLCLK:
case WM_LBUTTONDOWN: case WM_LBUTTONDOWN:
if (GetWindowLongW( hwnd, GWL_STYLE ) & SBS_SIZEGRIP)
{
SendMessageW( GetParent(hwnd), WM_SYSCOMMAND,
SC_SIZE + ((GetWindowLongW( hwnd, GWL_EXSTYLE ) & WS_EX_LAYOUTRTL) ?
WMSZ_BOTTOMLEFT : WMSZ_BOTTOMRIGHT), lParam );
}
else
{ {
POINT pt; POINT pt;
pt.x = (short)LOWORD(lParam); pt.x = (short)LOWORD(lParam);
@ -1519,6 +1526,14 @@ LRESULT ScrollBarWndProc_common( HWND hwnd, UINT message, WPARAM wParam, LPARAM
} }
break; break;
case WM_SETCURSOR:
if (GetWindowLongW( hwnd, GWL_STYLE ) & SBS_SIZEGRIP)
{
ULONG_PTR cursor = (GetWindowLongW( hwnd, GWL_EXSTYLE ) & WS_EX_LAYOUTRTL) ? IDC_SIZENESW : IDC_SIZENWSE;
return (LRESULT)SetCursor( LoadCursorA( 0, (LPSTR)cursor ));
}
return DefWindowProcW( hwnd, message, wParam, lParam );
case SBM_SETPOS: case SBM_SETPOS:
return SetScrollPos( hwnd, SB_CTL, wParam, (BOOL)lParam ); return SetScrollPos( hwnd, SB_CTL, wParam, (BOOL)lParam );