General discussion

Locked

Bitmap Failure

By sanjeev_guptaji ·
Why & in what situations do CreateCompatibleBitmap() failed to create a compatible bitmap in VC++.

This conversation is currently closed to new comments.

8 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Bitmap Failure

by root In reply to Bitmap Failure

Check the desktop color depth.

Collapse -

Bitmap Failure

by sanjeev_guptaji In reply to Bitmap Failure

The question was auto-closed by TechRepublic

Collapse -

Bitmap Failure

by sl33te In reply to Bitmap Failure

it seems i can help you here sanjeev, but only one thing: before i can help you i just know these questions:

what version of VC++?
do you get any error messages?
how are you trying to create it?

answer these and i'll get back to you.

sl33te
d_korth@hotmail.com

Collapse -

Bitmap Failure

by sanjeev_guptaji In reply to Bitmap Failure

The question was auto-closed by TechRepublic

Collapse -

Bitmap Failure

by sanjeev_guptaji In reply to Bitmap Failure

There is no error message,
just it redraw the bitmap on the previous size.

I am creating the bitmap using CreateCompatibleBitmap(), i.e.,
first creating the memory device context, and then getting into a bitmap of the required size and then select that bitmap into the device context, i.e., using the following functions,

HDC memDC = CreateCompatibleDC ( hDC );
HBITMAP memBM =
CreateCompatibleBitmap( hDC );
SelectObject ( memDC, memBM );

Also, after creating this bitmap, using some scroll, pan & zoom calculation logic, I get the new bitmap size

then I recreate the bitmap using the above functions and it works fine for some time but at a certain size it fails to create the required size and the bitmap gets deteriorated.

Collapse -

Bitmap Failure

by James_Randy In reply to Bitmap Failure

Man, oh man. You sure got me.

Collapse -

Bitmap Failure

by sanjeev_guptaji In reply to Bitmap Failure

The question was auto-closed by TechRepublic

Collapse -

Bitmap Failure

by sanjeev_guptaji In reply to Bitmap Failure

This question was auto closed due to inactivity

Back to Web Development Forum
8 total posts (Page 1 of 1)  

Software Forums