Drawing to a Memory Bitmap for Faster Performance (130805)
The information in this article applies to:
- Microsoft Windows Software Development Kit (SDK) 3.1
- Microsoft Win32 Application Programming Interface (API), when used with:
- Microsoft Windows NT Server 3.5
- Microsoft Windows NT Workstation 3.5
- Microsoft Windows 2000 Advanced Server
- Microsoft Windows 2000 Server
- Microsoft Windows 2000 Professional
This article was previously published under Q130805 SUMMARY
An application whose client area is a complex image can realize a
performance benefit from drawing to a memory bitmap. The complex, time
consuming drawing code need only be performed once - to initialize the
offscreen bitmap. During the handling of the WM_PAINT message, the only
work that needs to be done is a simple BitBlt from the memory bitmap to the
screen.
Sample code demonstrating this technique is available in the Microsoft
Dowload Center. The MemDC sample code draws a complex pattern on its
client area. A menu option toggle allows the user to see the speed
difference between using and not using the offscreen bitmap.
Modification Type: | Minor | Last Reviewed: | 3/7/2005 |
---|
Keywords: | kbdownload kbfile kbgraphic kbinfo KB130805 kbAudDeveloper |
---|
|