... bitmaps on hDCMem this way: hBmp = ReadBitmap( 0, "name.bmp" ) PalBmpDraw( hDCMem, nRow, nCol, hBmp ) Finally you save it and clean: DibWrite( cFileName, DibFromBitmap( hBitmap ) ) SelectObject( hDCMem, hPrev ) DeleteObject( hBitmap ) DeleteDC( hDCMem ) oDlg:ReleaseDC()