Two overlapping windows, one flickers, howto solve ?
-
I have two windows, let's call them Frame and List. They are both laid on a dialog, both are direct children of this dialog. List stands in the middle of the dialog, frame does too only that it's slightly larger than the list, just enough to add a frame around the list. The thing is, when resized (together ofcourse) the list flickers. Removing the list's
OnEraseBkgnd
eliminates the flicker, but also eliminates the list's background :-) Note that the frame only draws AROUND the list, i specifically don't draw anything where the list is positioned so that I won't cause flickering. I have an emptyOnEraseBkgnd
that returns TRUE. Can someone assist ? -
I have two windows, let's call them Frame and List. They are both laid on a dialog, both are direct children of this dialog. List stands in the middle of the dialog, frame does too only that it's slightly larger than the list, just enough to add a frame around the list. The thing is, when resized (together ofcourse) the list flickers. Removing the list's
OnEraseBkgnd
eliminates the flicker, but also eliminates the list's background :-) Note that the frame only draws AROUND the list, i specifically don't draw anything where the list is positioned so that I won't cause flickering. I have an emptyOnEraseBkgnd
that returns TRUE. Can someone assist ?ohadp wrote: I have an empty OnEraseBkgnd that returns TRUE. why don't you draw the background urself and return TRUE get the system color for window and draw away i can't even remember what my point is now, but anyway, i'm correct Barring unforeseen acts of God and Adminstrators, my server will be up tomorrow. I'm more worried about the Adminstrators.
-
ohadp wrote: I have an empty OnEraseBkgnd that returns TRUE. why don't you draw the background urself and return TRUE get the system color for window and draw away i can't even remember what my point is now, but anyway, i'm correct Barring unforeseen acts of God and Adminstrators, my server will be up tomorrow. I'm more worried about the Adminstrators.
The Frame doesn't need to erase it's background (because it omstly contains the list), so that's why it has an empty implementation of
OnEraseBkgnd
. The List on the other hand does need a background, and in the List'sOnEraseBkgnd
I do clean the background and return TRUE. My problem is that this causes the list to flicker. The List didn't flicker when there was no frame around/over it... My question is how to eliminate the flicker, or more importantly why did it start flickering now ? when I didn't have my Frame the List cleaned it's background and nothing flickered.... -
I have two windows, let's call them Frame and List. They are both laid on a dialog, both are direct children of this dialog. List stands in the middle of the dialog, frame does too only that it's slightly larger than the list, just enough to add a frame around the list. The thing is, when resized (together ofcourse) the list flickers. Removing the list's
OnEraseBkgnd
eliminates the flicker, but also eliminates the list's background :-) Note that the frame only draws AROUND the list, i specifically don't draw anything where the list is positioned so that I won't cause flickering. I have an emptyOnEraseBkgnd
that returns TRUE. Can someone assist ?Make sure all your windows (including the dialog itself) have the
WS_CLIPCHILDREN
style --Mike-- Personal stuff:: Ericahist | Homepage Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ ---- "That probably would've sounded more commanding if I wasn't wearing my yummy sushi pajamas." -- Buffy -
Make sure all your windows (including the dialog itself) have the
WS_CLIPCHILDREN
style --Mike-- Personal stuff:: Ericahist | Homepage Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ ---- "That probably would've sounded more commanding if I wasn't wearing my yummy sushi pajamas." -- BuffyI can't say I've made sure all the windows (including the dialog) have this style, but I have tried to give the Frame itself the WS_CLIPSIBLINGS style, and give the list the container of these two windows (the dialog), the WS_CLIPCHILDREN style, but not all of them together... Can you explain why this will work ? Will it provide the list with a different clipping-region when it gets to 'OnEraseBkgnd' ? thanks
-
Make sure all your windows (including the dialog itself) have the
WS_CLIPCHILDREN
style --Mike-- Personal stuff:: Ericahist | Homepage Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ ---- "That probably would've sounded more commanding if I wasn't wearing my yummy sushi pajamas." -- Buffy -
I have two windows, let's call them Frame and List. They are both laid on a dialog, both are direct children of this dialog. List stands in the middle of the dialog, frame does too only that it's slightly larger than the list, just enough to add a frame around the list. The thing is, when resized (together ofcourse) the list flickers. Removing the list's
OnEraseBkgnd
eliminates the flicker, but also eliminates the list's background :-) Note that the frame only draws AROUND the list, i specifically don't draw anything where the list is positioned so that I won't cause flickering. I have an emptyOnEraseBkgnd
that returns TRUE. Can someone assist ?