O'Reilly logo

Software Engineering and Computer Games by Rudy Rucker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

25.5. A memory-based device context

In order to keep our rapidly animated Windows displays from flickering, we use the cMemoryDC objects as virtual windows, or memory bitmaps. It is not a standard MFC class like CPoint, nor is it a well-known kind of user-written class like cVector. cMemoryDC is a special memory device context class that the author implemented here in order to make Windows programming easier.

The cMemoryDC class is a child of the standard CDC class. This means that we can write to a cMemoryDC with the same graphics methods that the CDC class uses to put graphics into an onscreen window or onto a printer page. And because cMemoryDC is a kind of CDC, we can use the powerful CDC::BitBlt method to do extremely fast copying from ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required