Archived

This topic is now archived and is closed to further replies.

Goku705

DirectDraw and MFC

Recommended Posts

I have my window derived from CFormView and I want to know how and/or when I should paint my surfaces to the screen. I am using a static control to house DirectDraw. The problem is, any way I''ve tried to blit my back buffer to the screen doesn''t work quite right. I figured that my OnPaint member procedure should be the right place to do it so I put it in there. The problem is that the procedure already calls CDialog::OnPaint () to redraw the controls in the form. That doesn''t bother me except that it also causes the static control to reinitialize itself to its default black, hence making my blits ineffective. If I remove the call to CDialog::OnPaint (), everything shows up right but my controls become invisible when I switch away and return to my application. What can I do to resolve this? Note: my program doesn''t use a frame loop, it only updates the screen as necessary, if that makes any difference. -Goku

Share this post


Link to post
Share on other sites