Re: BUG in CreateCompatibleBitmap with VC++.NET/2003
From: Relvinian (smpres_at_hotmail.com)
Date: 12/04/04
- Next message: Timo Kunze: "Re: Question about BitBlt and masks and so on"
- Previous message: Jonathan Wood: "Problems Measuring Font Height"
- In reply to: ATS: "Re: BUG in CreateCompatibleBitmap with VC++.NET/2003"
- Next in thread: Feng Yuan [MSFT]: "Re: BUG in CreateCompatibleBitmap with VC++.NET/2003"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 04 Dec 2004 02:13:55 -0700
ATS wrote:
> Thanks for the reply, but you only addressed 1/2 of the issue. The issue was
> that either CreateCompatibleBitmap has a bug and/or the dozens of MSDN
> articles that have been stating for years since 1995 to use
> CreateCompaitbleBitmap for a "memory" bitmap are wrong. For example, that
> article titled "Flicker-Free Displays Using an Off-Screen DC" doesn't mention
> that, "oh, by the way, using CreateCompatibleBitmap with VC++ 2003 will only
> work about 5 times before blowing up with a lack or memory error".
>
> At any rate, I found a way to use CImage to do the equivalent of
> CreateCompatibleBitmap, but for best results, Microsoft should warn others
> and update the articles.
ATS,
You can create as many bitmaps as you want. What is the limits is the
amount of memory available for creating bitmaps. If you create LARGE
bitmaps, you won't be able to create very many, that is why it is
recommended to use DIBs instead because they come from virtual memory
and not physical memory.
In my own applications and testing, I have created over 300+ bitmaps
using CreateCompatibleBitmap and they were all created just fine.
Granted almost all of these bitmaps were in the range of around 32x32
pixels or smaller. Some larger but most small.
There isn't a bug with it or the documentation is flawed. It works as
designed and documented. Just need to know when to use the right API
call for the job.
Relvinian
- Next message: Timo Kunze: "Re: Question about BitBlt and masks and so on"
- Previous message: Jonathan Wood: "Problems Measuring Font Height"
- In reply to: ATS: "Re: BUG in CreateCompatibleBitmap with VC++.NET/2003"
- Next in thread: Feng Yuan [MSFT]: "Re: BUG in CreateCompatibleBitmap with VC++.NET/2003"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|