hi,

i'm geting de bits of to bitmaps into a buffer in order to compare
then.

the first time i call GetDIBits, it works ok, and returns the number
of scanlines an correct data in the buffer.

the second time, it returns 0 and does nothing in the baffer.

if i change the order of the calls, the second still fails.

i know that then bitmaps must not be selected on any DC, and i'm
carefully with that.

¿¿any reason why GetDIBits returns 0??

Thank you.

by MJM.

Re: GetDIBits is returning 0 by aa

aa
Thu Jul 21 14:19:46 CDT 2005

"MJM" <jesusmori@hotmail.com> wrote in message
news:fdf240e6.0507210915.7b9c84a1@posting.google.com...
> hi,
>
> i'm geting de bits of to bitmaps into a buffer in order to compare
> then.
>
> the first time i call GetDIBits, it works ok, and returns the number
> of scanlines an correct data in the buffer.
>
> the second time, it returns 0 and does nothing in the baffer.
>
> if i change the order of the calls, the second still fails.
>
> i know that then bitmaps must not be selected on any DC, and i'm
> carefully with that.
>
> ¿¿any reason why GetDIBits returns 0??
>

Are you re-initializng the BITMAPINFOHEADER pointed to by the lvpBits
pointer before the second call?