-
Argh! Flickering!!!
Hi,
I've been having trouble recently with a window of mine. It's got a toolbar, status window and an MDI client window on it. The problem is, the flickering on it is driving me mad!!! :mad:
Oh, is there no relief from this pain of semi-visible windows?!? :(
No MFC please, I'm British...
-
>>No MFC please, I'm British...
LOL! Hadn't realized the brits had MFC allergies.
-
Don't know if this will help but try returning TRUE from WM_ERASEBKGND handler to prevent windows from drawing the background.
-
Yeah, I had tried that, but it made no difference.
Looking at WinZip, that does flicker slightly when resized, but with my window it's ridiculous (the toolbar button images phase in and out of reality, the status window disappears and then reappears...) :eek:
-
What styles are you using to create the toolbar? the MDI client? and the main window? I had this problem a while ago and got rid of it by changing some of the styles around. I cant remembe the exact solution b/c its been 2 1/2 years since then and I lost the project when my old hard drive permenently crashed. Ill look and post it if I can find it again, but my suggestion is for you to add some moer WS_xxx and WS_EX_xxx to your main window.
-
My toolbar has the styles WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS, the MDI client has the styles WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN and the main window has the styles WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN.
Any ideas?
-
I just looked at MSVC when it is resized (Bit silly for me not to do that in the first place but that just shows the zig-zag way I take in solving problems :p), and while the menu toolbar at the top does flicker a little bit, the other toolbars in particular are flicker-free. Is there a special way toolbars should be handled in WM_SIZE messages (apart from sending the TB_AUTOSIZE message)?
I also read somewhere that dynamically-generated toolbars (like mine) are more prone to flickering than those from resources. Is this true? :confused: