DATA?
buffer db 100 dup(?)
___________________________________________

invoke GetObject,hBitmap,sizeof BITMAP,buffer

lea esi,buffer
xor eax,eax
lodsw
mov wide,eax
xor eax,eax


.IF wide == 0
invoke Beep,NULL,NULL
.ENDIF

invoke BitBlt,hdc,0,0,wide,30,cdc,0,0,SRCCOPY

I am trying to get the width of my bitamp from the BITMAP structure. I get nothing but zeros.Beep Beep Beep. The bitmap is loaded as a resource so according to win32 help only the width height and color format are returned.

What am i doing wrong. Its got to be something simple.

Pulling my hair out.
any help appreciated
Posted on 2001-08-14 13:30:15 by titan
should be more correct:



DATA?
buffer db 100 dup(?)
___________________________________________

invoke GetObject,hBitmap,sizeof buffer, offset buffer

lea esi,buffer
add esi,4
mov eax,dword ptr [esi]
mov wide, eax


.IF wide == 0
invoke Beep,NULL,NULL
.ENDIF

invoke BitBlt,hdc,0,0,wide,30,cdc,0,0,SRCCOPY



bye A
Posted on 2001-08-14 13:40:05 by Bit7
i forget, if u use masm you maybe should use 'addr' insade of 'offset' directive.
Posted on 2001-08-14 13:42:15 by Bit7