Question

I have a problem with the way my scrollbars are drawn. Because of external limitations (my application being a plugin running in an external window that insists on painting over any regular child window), I have to use SCROLLBAR-class windows (as opposed to using WS_CHILD | WS_VSCROLL)

For almost every message received, the scrollbar is shown animating smoothly and consistently. However, when I receive the SB_LINEDOWN message(i.e. when I click on the bottom/right arrow), the scroll bar flickers horribly (Low-framerate example). Again, all other messages work perfectly.

I have tested removing the scrollbar position update (Still broken) and removing the actual scrolling code (Still broken). I am already double-buffering the area to prevent an even worse flickering..

What might cause this and how could I fix it?

Was it helpful?

Solution

In addition to what Goz mentioned, which I bet you're already doing, it may be worth experimenting with combinations of WS_CLIPCHILDREN and WS_CLIPSIBLINGS on the scrollbar window itself and its container or any overlapping windows.

OTHER TIPS

Try intercepting and ignoring the WM_ERASEBKGND this has helped me a lot with flicker in controls. Dunno if its your problem though :(

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top