comctl32/listview: update dwStyle before checking for scrollbar

Daniel Jelinski djelinski1 at gmail.com
Sun Sep 23 08:08:41 CDT 2012


2012/9/22 Daniel Jelinski <djelinski1 at gmail.com>:
> 2012/9/22 Nikolay Sivov <nsivov at codeweavers.com>:
>> And apparently we have code in WM_STYLECHANGED handler to deal with scroll
>> bars:
>>
>> ---
>>     if (((lpss->styleOld & WS_HSCROLL) != 0)&&
>>         ((lpss->styleNew & WS_HSCROLL) == 0))
>>        ShowScrollBar(infoPtr->hwndSelf, SB_HORZ, FALSE);
>>
>>     if (((lpss->styleOld & WS_VSCROLL) != 0)&&
>>         ((lpss->styleNew & WS_VSCROLL) == 0))
>>        ShowScrollBar(infoPtr->hwndSelf, SB_VERT, FALSE);
>> ---
>>
>> these lines were edited 10 years ago last time, sure it could be a noop
>> but that raises a question why it's here.
>
> Dead code. I meant to remove these in the next patch, since there are
> no bugs against scrollbars in listview. I guess user32 was way less
> capable back then.

Now that I think about it, it's not exactly dead code - it will be
executed when someone tries to hide scrollbars by setting window
style. Needs a more thorough review.

Regards,
Daniel



More information about the wine-devel mailing list