Scroll bar flicker

I have a problem with how my scrollbars are drawn. Due to external constraints (my application is a plugin running in an external window that insists on painting on 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 scroll bar is displayed smoothly and sequentially. However, when I receive a message SB_LINEDOWN(i.e. when I press the arrow down / right), the scroll bar flickers terribly ( Example with a low frame rate ). Again, all other messages work fine.

I tested removing the scroll bar position update (still broken) and removing the actual scroll code (Still broken). I have already buffered the area twice to prevent even worse flickering.

What can cause this and how can I fix it?

+3
source share
2 answers

In addition to what Goz said, and I'm sure you already do this, it might be worth experimenting with the combinations WS_CLIPCHILDREN and WS_CLIPSIBLINGS in the scroll bar itself and its container or any overlapping windows.

+2
source

Try to intercept and ignore WM_ERASEBKGND, it really helped me with flickering in the controls. I do not know if your problem is: (

0

Source: https://habr.com/ru/post/1714436/


All Articles