Memory DC's

Started by
19 comments, last by shalom 22 years, 8 months ago
Saving and restoring the BITMAP alone is not sufficient in all cases. You need to restore PEN, BRUSH, PALETTE, FONT, and REGION. If you know you are only calling SelectObject() on the BITMAP, then what you have is fine. However, I really recommend making your class use "int SaveDC(HDC)" and "BOOL RestoreDC(HDC, int)" to make it generic.

This topic is closed to new replies.

Advertisement