.. Create a Color Bitmap

Category: Graphics - GDI

Date: 02-16-2022

Return to Index


To create a color bitmap, use the HDC that was used to create the memory device context,
as shown in the following code:
 
    HDC memDC = CreateCompatibleDC ( hDC );
    HBITMAP memBM = CreateCompatibleBitmap ( hDC, nWidth, nHeight );
    SelectObject ( memDC, memBM );
 
'gbs_00940
'Date: 03-10-2012


created by gbSnippets
http://www.garybeene.com/sw/gbsnippets.htm