It's a little tricky.
local srcedibbmap : BITMAPINFOHEADER
SetObject esi
invoke BeginPaint, [esi].hWnd, addr PS
mov hDC, eax
;counter_begin 1000, HIGH_PRIORITY_CLASS
invoke CreateCompatibleDC, hDC
mov memdc, eax
invoke GetClientRect, [esi].hWnd, addr [esi].total
invoke CreateCompatibleBitmap, hDC, [esi].total.right, [esi].total.bottom
mov hbm , eax
invoke SelectObject, memdc, eax
mov hOld,eax
;paint into memoryDC
invoke SelectObject, memdc, [esi].BLUE_BRUSH
invoke PatBlt, memdc, 0, 0,[esi].total.right, [esi].total.bottom,PATCOPY
invoke SelectObject, memdc, [esi].hFntGUI
;mov hFontOld , eax
mov srcedibbmap.biSize , sizeof BITMAPINFOHEADER
m2m srcedibbmap.biWidth , [esi].total.right
fSlv srcedibbmap.biHeight = -1*[esi].total.bottom
mov srcedibbmap.biPlanes , 1
mov srcedibbmap.biBitCount , 32
mov srcedibbmap.biCompression , BI_RGB
mov eax , [esi].total.right
shl eax , 2
mov ecx , [esi].total.bottom
mul ecx
invoke GlobalAlloc, GMEM_FIXED+GMEM_ZEROINIT, eax
mov [esi].array3D, eax
DbgApiError
invoke GetDIBits, memdc, hbm, 0, [esi].total.bottom, [esi].array3D, addr srcedibbmap, DIB_RGB_COLORS