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.


Thanks in advance.
Posted on 2004-06-19 08:15:21 by nameless_one
First get the Bitmap handle...

invoke GetCurrentObject, , OBJ_BITMAP
mov , eax

Then get the DIB_SECTION structure to obtain a pointer to the bits..


invoke GetObject, , SIZEOF DIBSECTION, offset dibs
mov eax,
mov , eax
Posted on 2004-06-19 08:54:19 by donkey
Wow... really... :eek:
Thanks once again... :)
Posted on 2004-06-19 09:07:00 by nameless_one
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


invoke GetDIBits,,, 0, _height, , addr bmi, DIB_RGB_COLORS

Posted on 2004-06-19 11:01:11 by nameless_one
It has always worked for me, perhaps you are using a DDB and not a DIB.
Posted on 2004-06-19 11:21:14 by donkey