From 90ba8ceb07645632318cd11e9ba03d9603056fa1 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 12 Oct 2010 11:43:21 +0200 Subject: [PATCH] user32: Correctly handle mouse events on a size grip scrollbar. --- dlls/user32/scroll.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/dlls/user32/scroll.c b/dlls/user32/scroll.c index 7e02a42a187..fd73bf458ef 100644 --- a/dlls/user32/scroll.c +++ b/dlls/user32/scroll.c @@ -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 );