Fix issue 414 for WinXP in classic theme: unable to resize window from bottom/right edges

On WinXP classic theme we receive a WM_NCHITTEST messages for the
scrollbars, and as they overlap the resize borders (see WM_NCCALCSIZE
handler) we have to return a proper value as if they really were the
borders of the window.

Note: Scrollbars are still visible in classic theme, that is just ugly,
but at least the user can resize the window from bottom and right edges.
This commit is contained in:
David Capello 2014-07-06 20:37:13 -03:00
parent d3aa22ac12
commit b1d27d66e2

View File

@ -323,11 +323,13 @@ static LRESULT CALLBACK wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lpara
LRESULT result = ::CallWindowProc(base_wndproc, hwnd, msg, wparam, lparam);
// We ignore scrollbars so if the mouse is above them, we return
// as it's in the client area. (Remember that we have scroll
// bars are enabled and visible to receive trackpad messages
// only.)
if (result == HTHSCROLL || result == HTVSCROLL)
result = HTCLIENT;
// as it's in the window resize area. (Remember that we have
// scroll bars are enabled and visible to receive trackpad
// messages only.)
if (result == HTHSCROLL)
result = HTBOTTOM;
else if (result == HTVSCROLL)
result = HTRIGHT;
return result;
}