I've tried this code

CreateBMP PROC hWnd:HWND
LOCAL hDC:DWORD

invoke GetDC, hWnd
mov hDC,EAX
invoke CreateCompatibleDC,hDC
mov hLCDDC,EAX
invoke CreateDIBSection,hDC,\
ADDR BITBITMAPINFO,\
DIB_RGB_COLORS,\
ADDR lpLCDBmp,\
NULL,NULL
mov hLCDBitmap,EAX
ret
CreateBMP ENDP

Drawit PROC hWnd:HWND
LOCAL hDC:DWORD

invoke GetDC, hWnd
mov hDC,EAX

push EDI
CLD
MOV EDI,lpLCDBmp
mov EAX,1
mov ECX,6400
rep stosb
pop EDI

; Copy to my window

invoke SelectObject,hLCDDC,hLCDBitmap
invoke BitBlt,hDC,0,0,320,240,hLCDDC,0,0,SRCCOPY
ret
Drawit ENDP

But it doesn't seem to work .What is there wrong? Everything?

Thanks in advance
Posted on 2001-12-19 05:52:00 by Theopulus
try using the SetDIBitsToDevice function. if you need an example, just say so.
Posted on 2001-12-19 14:15:19 by Sloat