tags:

views:

302

answers:

1

Thank you guys so much for your help, this has been bothering me for a couple days.

I am using Windows Vista, and writing my program in C++, using straight Windows API(no MFC).

When I resize my window, the menu items flicker. My window class DOES NOT use CS_HREDRAW or CS_VREDRAW. I use double buffering for the CLIENT AREA, so the client area does not flicker, only the menu on the non-client area.

Now I can get this to go away by handling WM_NCPAINT myself, but I really do not want to handle all of the drawing of the non-client area. I also handle WM_ERASEBKGND, but that only helps for the CLIENT AREA also. I am really at a loss as to how to fix this. I have searched google extensively, and have read and tried everything

http://catch22.net/tuts/flicker

has suggested. Thanks again you guys. I hope you can help me understand why my menu items are flickering(although not the menu bar, nor the borders, nor the window title bar).

+2  A: 

I'm glad to say I fixed the problem! I simply pass WS_EX_COMPOSITED to the creation of the window with the menu bar, using CreateWindowEx()! Works great, and also takes care of the flickering of the child windows. Thought I'd share that with you guys, just in case you ever experience the same annoying flickering.

Chris