View Full Version : Windows Menu & OpenGL

02-13-2008, 11:16 AM
Hello All
I am using MFC with OpenGL to code multimedia application, I am using SDI architecture, and I found that when I open any menu item and select it, windows sometimes donít erase the menu area immediately, and it appears like a shadow over the OpenGL window, until I do any repaint action it disappears
It seems to me that it is windows issue, but I am not sure!
i had posted this issue in another forum, but i still couldn't able to solve it

02-13-2008, 11:41 AM
Your OpenGL window is responcible for repainting itself, the OS won't cache the image. Actually your window should receive a invalidating message in such case? Hovewer, I never worked with MFC and have no idea how it works...

02-13-2008, 11:55 AM
i can send you a screenshot, if you want to understand what i mean exactly

02-13-2008, 02:55 PM
my guess is that you use only a single thread.
if you do only use a single thread, most likely this kind of things might happened. what happened is before your program completely clear the menu, it already busy doing something else (maybe drawing your opengl things). you can prevent this by using multithreading.