comctl32: Use GetWindowLong to check for scrollbar.

dwStyle is updated only in WM_STYLECHANGED, which is not sent
when displaying and hiding scrollbars.
This commit is contained in:
Daniel Jelinski 2012-09-21 21:58:43 +02:00 committed by Alexandre Julliard
parent 3dc0d93f4d
commit 0edb0233a4
1 changed files with 1 additions and 1 deletions

View File

@ -10878,7 +10878,7 @@ static void LISTVIEW_UpdateSize(LISTVIEW_INFO *infoPtr)
* The "2" is there to mimic the native control. I think it may be
* related to either padding or edges. (GLA 7/2002)
*/
if (!(infoPtr->dwStyle & WS_HSCROLL))
if (!(GetWindowLongW(infoPtr->hwndSelf, GWL_STYLE) & WS_HSCROLL))
infoPtr->rcList.bottom -= GetSystemMetrics(SM_CYHSCROLL);
infoPtr->rcList.bottom = max (infoPtr->rcList.bottom - 2, 0);
}