From: Mathew Robertson (mathew.robertson_at_[hidden])
Date: 2004-09-22 02:52:20
> I think that perhaps Mathew is talking about the GDI object limit. At
> least under Windows 2000 and earlier versions (I'm not sure about XP)
> there is a firm limit of 16K handles that can be allocated system wide -
> regardless of your particular specs (ie adding memory does not help).
> When this limit is reached weird stuff  happens which can only be
> fixed by a reboot.
> Any object that allocates a handle under Windows (pens, brushes, dc's,
> etc) consume those resources and if you've got a graphically intense GUI
> using a greedy GUI library (ie one that holds it's handles for a long
> duration) that limit isn't too hard to break.
> If you open task manager and select to view the "GDI Objects" column you
> can see how many objects each process uses.
> If you, or anyone else, wants some more info or help please let me know
> because it was quite a difficult nut to crack!
> Googling for "gdi object limit", particularly in groups, will reveal a
> heap of stuff. However, I've found only a few official documents that
> describe the issue.
In practise the FOX GUI users group have found that the values are as low as a few thousand, or less if you are dealing with bitmaps. This may still sound like a lot, but if you are allocating a handle to every line on the display (plus any offscreen handles - eg caching a few hundred thumbnails), you can quickly run out.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk