Commit 90ba8ceb authored by Alexandre Julliard's avatar Alexandre Julliard

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

parent 299f2b35
......@@ -1426,6 +1426,13 @@ LRESULT ScrollBarWndProc_common( HWND hwnd, UINT message, WPARAM wParam, LPARAM
case WM_LBUTTONDBLCLK:
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;
pt.x = (short)LOWORD(lParam);
......@@ -1519,6 +1526,14 @@ LRESULT ScrollBarWndProc_common( HWND hwnd, UINT message, WPARAM wParam, LPARAM
}
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:
return SetScrollPos( hwnd, SB_CTL, wParam, (BOOL)lParam );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment