by Antonio Linares » Tue Oct 12, 2021 5:40 am
#define SRCCOPY 13369376
local hDC := oDlg:GetDC()
local hDCMem := CreateComtatibleDC( hDC )
local hBitmap := CreateCompatibleBitmap( hDCMem, nWidth, nHeigth )
local hPrev := SelectObject( hDCMem, hBitmap )
local hBmp, hDib
now you paint your 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()