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

Dark Star

Double buffering in windows

Recommended Posts

Dark Star    100
Can anyone tell me how to do double buffering in windows programming. I am using MFCs and using the Device contexts. I need to know if u need to create a secondary device context. If so I dont understand the parameters to create and initialise a DC. Second Do I have to send it as a parameter to pDC-CreateCompatibleDC(); I think I know where to go from there, using the pDC->BitBlt() function. Thanks. This is for a university animation project. Thanks DarkStar UK

Share this post

Link to post
Share on other sites
Punty50    122
This is addressed in Sams Teach yourself MFC Programming:

1.) Create two device contexts that are equivelent (both dc.CreateCompatibleDC() ), one a memory context
2.) Do all of your drawing algorithms on one of the DC''s (the memory one)
3.) Bitblt() from one to another.

I need to check, but I am sure there is some way of creating a compatible memory DC.


Share this post

Link to post
Share on other sites