News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Flicker problems

Started by zemtex, January 18, 2011, 07:52:45 PM

Previous topic - Next topic

zemtex

Hi.

I am using double buffering techniques and I am denying the system of processing WM_ERASEBKGND and erasing the background. The screen draws beautifully and doesnt flicker, but my button in the lower region of the window does flicker from time to time.

Is there a smart solution to this (other than removing the button) ?

The only solution I can see right now is to draw the button manually to avvoid it from updating every time "InvalidateRect" generates a WM_PAINT message.
I have been puzzling with lego bricks all my life. I know how to do this. When Peter, at age 6 is competing with me, I find it extremely neccessary to show him that I can puzzle bricks better than him, because he is so damn talented that all that is called rational has gone haywire.

qWord

specify the WS_CLIPCHILDREN-style for the parent window.

qWord
FPU in a trice: SmplMath
It's that simple!

zemtex

I set the WS_CLIPCHILDREN style on the same window that I am drawing to, the very window that also have that button which flickers. The button flicker have seem to stopped now.

Can you give a technical explanation of what is happening beneath the surface here?
I have been puzzling with lego bricks all my life. I know how to do this. When Peter, at age 6 is competing with me, I find it extremely neccessary to show him that I can puzzle bricks better than him, because he is so damn talented that all that is called rational has gone haywire.

qWord

without clipping the area of the child-window (button) gets overdrawn ->this force the control to be redrawn subsequently.
FPU in a trice: SmplMath
It's that simple!

zemtex

Good explanation. This is a good solution when having a few number of controls on the window.
I have been puzzling with lego bricks all my life. I know how to do this. When Peter, at age 6 is competing with me, I find it extremely neccessary to show him that I can puzzle bricks better than him, because he is so damn talented that all that is called rational has gone haywire.