The "resources" heap is only used to store the structure(s) that describe the
bitmap: the BITMAP structure in the Windows header files. That structure
contains a pointer to the actual bits, which live elsewhere.
Every window/subwindow/control, every brush, every pen, every DC, every bitmap,
every font, and every handle are stored in this heap. If you count up the
number of controls in the typical fancy gui-fied window today, you can
understand why resource limits became a concern in Windows.
ยทยทยท
On Mon, 13 Jan 2003 12:58:11 -0800, "Kevin Altis" <altis@semi-retired.com> wrote:
Aha. Here it is:
AroundCNY: Local with a broadband twist!
I can hear Bill now: "who'd ever need more than 64K of resources?"
Excellent. But that 64K does not include the size of the wxMemoryDC, it must
be certain aspects associated with it such as the pen and brush. If it
included the wxMemoryDC you wouldn't be able to create a wxMemoryDC of even
100x220x24 bits.64 * 1024 (bytes) / 3 (bytes per pixel) / 100 (pixels horizontal)
is just over 218; assuming my calculations are correct. So it is something
else about the wxMemoryDC use of "resources" and we would need to know what,
how much, how to check whether the resource was actually freed, even at
program exit where you might assume it was and it might not be.
--
- Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.