Hi.
I have a little problem:
how to get access to bitmap's bits and then process them: alpha blending, fadedown, etc,
if i only have a memory device context DC.
I fails if i'm using CreateDIBSection:
since ppvBits points to not initialized bitmap's bits.
:confused:
Thanks in advance.
I have a little problem:
how to get access to bitmap's bits and then process them: alpha blending, fadedown, etc,
if i only have a memory device context DC.
I fails if i'm using CreateDIBSection:
since ppvBits points to not initialized bitmap's bits.
:confused:
Thanks in advance.
First get the Bitmap handle...
invoke GetCurrentObject, , OBJ_BITMAP
mov , eax
Then get the DIB_SECTION structure to obtain a pointer to the bits..
dibs DIBSECTION <>
invoke GetObject, , SIZEOF DIBSECTION, offset dibs
mov eax,
mov , eax
invoke GetCurrentObject, , OBJ_BITMAP
mov , eax
Then get the DIB_SECTION structure to obtain a pointer to the bits..
dibs DIBSECTION <>
invoke GetObject, , SIZEOF DIBSECTION, offset dibs
mov eax,
mov , eax
Wow... really... :eek:
Thanks once again... :)
Thanks once again... :)
Hello again.
Hmm.. That code doesn't work. :notsure:
mov eax,
mov , eax
where eax == 0
But i've found another way:
invoke GetCurrentObject, , OBJ_BITMAP
mov , eax
invoke GlobalAlloc,GMEM_FIXED, SIZE
mov ,eax
; bmi BITMAPINFO <>
invoke GetDIBits,,, 0, _height, , addr bmi, DIB_RGB_COLORS
:rolleyes:
Hmm.. That code doesn't work. :notsure:
mov eax,
mov , eax
where eax == 0
But i've found another way:
invoke GetCurrentObject, , OBJ_BITMAP
mov , eax
invoke GlobalAlloc,GMEM_FIXED, SIZE
mov ,eax
; bmi BITMAPINFO <>
invoke GetDIBits,,, 0, _height, , addr bmi, DIB_RGB_COLORS
:rolleyes:
It has always worked for me, perhaps you are using a DDB and not a DIB.