Question : MoveWindow causes Flicker

Hello to all,

I am using a CMiniFrameWnd derived object that has a CCheckListBox inside of it, and I'm using a timer to animate the MiniFrameWnd. Similar to the way Windows2K handles the popup menus.
My problem is that I make several calls to MoveWindow(..., TRUE) in order to do the animation of the window. I get quite a bit of flickering while the frame is being basically resized. I have tried overriding OnEraseBkgrnd() and returning FALSE. But nothing seems to eliminate the flicker. I hope this makes some sense to people.

Thanks
newton1

Answer : MoveWindow causes Flicker

The CMiniFrameWnd derived window always have another child window(classname is AfxControlBar42d), and your controls is the child windows of this window, So, I think you can try to find it and use SetClassLong(hwnd, GCL_HBRBACKGROUND, long GetStockObject( NULL_BRUSH )));
or subclass it, and overload the WM_ERASEBKGND message handler, or remove the WS_CLIPCHILDREN style of this window.
Random Solutions  
 
programming4us programming4us