Skip to main content
gamedev.net
🔒 Locked

Refresh/repaint problems

Started by rosewell Aug 27, 2008 at 4:38 PM 0 replies 350+ views
Original Post
rosewell
rosewell
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.

BOOL 
CMyView::PreCreateWindow(CREATESTRUCT& cs) {

 cs.style |= (WS_CLIPSIBLINGS | WS_CLIPCHILDREN);	

 return CView::PreCreateWindow(cs);
}

BOOL
CMyView::OnEraseBkgnd(CDC* pDC) {

 return TRUE;
}

void 
CMyView::OnDraw(CDC* pDC) {

 RenderGLScene();
}
I use almost the same code found in other OpenGL MFC tutorials on the web, so it's hard to tell why it's happening.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.