Menu repaint problems

I’m writing an MFC SDI app that uses OpenGL, and sometimes I get refresh/repaint problems where portions
of pulldown menus or popup menus remain visible in the viewport where OpenGL is drawn. All of my
windows are created with the WS_CLIPSIBLINGS | WS_CLIPCHILDREN, and I use OpenGL double-buffering.


return CView::PreCreateWindow(cs);

CMyView::OnEraseBkgnd(CDC* pDC) {

return TRUE;

CMyView::OnDraw(CDC* pDC) {


I’m not looking for anyone to find my specific problem, but just hoping to find common reasons
why this would happen.

Argh, more menu problems!

In Windows XP, context menus can have drop shadows. But, apparently when I open up a context menu in a
OpenGL viewport, the shadow magically disappears after a brief moment.

I suppose there is no fix for this either? I added CS_OWNDC to the window style, but it didn’t do a thing.

Does DirectX have menu problems?

Sounds like windows shenanigans. You might want to fiddle with creating your own window class to be sure of the class styles you’re getting. Not sure but maybe watch out for e.g. CS_DROPSHADOW or CS_SAVEBITS. I seem to recall having some luck with something like that during a tooltip ordeal, but it’s been a while.

No problems on Vista…

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.