On Fri, 01 May 2009 13:13:05 +0200, you wrote: >Rein Klazes <[email protected]> writes: > >> - if (!infoPtr && alloc) >> + if (!infoPtr && ( alloc || (wndPtr->dwStyle & (WS_VSCROLL | >> WS_HSCROLL)))) >> { > >This bit doesn't look right, and defeats the purpose of the alloc >flag. It would need some more test cases.
The alloc flag is not only set by SCROLL_DrawScrollBar, which may be what you are thinking of here. What is already in the tests: 1) You need the alloc flag for instance when SetScrollInfo or SetScrollRange is called on a window without the WS_[HV]SCROLL styles. I can add a test that shows that the window styles remain unchanged when eg. SetScrollInfo creates the scrollinfo. 2) You need the style test when testing GetScrollInfo and GetScrollRange on windows with WS_[HV]SCROLL styles. Now the alloc flag may not be specified correctly in the other cases Additional tests to see whether the alloc flag is correctly passed for [GS}etScrollBarInfo and EnableScrollBar can be added. Would such tests address your concerns? Rein.
