On Fri, 01 May 2009 22:15:16 +0200, you wrote:
Rein Klazes wijn@online.nl writes:
What is already in the tests:
- 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.
- 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?
No, what you'd need is a test that shows that calling a function that doesn't create a scrollbar (alloc=FALSE) suddenly starts to create one if WS_[HV]SCROLL is set. To test this meaningfully you'd need to set the style by hand, not at window creation.
Indeed you were right. Setting the WS_[HV]SCROLL with a SetWindowLong does not create the scrollbar info, which proves unambiguously that my idea was false.
I guess to fix the windows style test failures some SetScrollSomething will have to be done in the CreateWindow functions. I'll postpone that for another patch and send now the patch which only fixes the separate scollinfo structures, which is enough for the bugzilla bug.
Rein.