|
Boost : |
From: David Abrahams (dave_at_[hidden])
Date: 2004-09-22 05:36:46
Matt S Trentini <matt_trentini_at_[hidden]> writes:
> John Torjo wrote:
>
>> Could you elaborate a bit? What do you think is the window handle
>> limit under win32?
>
> 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 [1] 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.
Yes, IIRC, that's why a spreadsheet implemented with a Window per cell
will have a very small maximum size, and why ultimately, any robust
window framework under Win32 has to have an abstraction layer that
makes the issue of whether or not there's a real "windows window"
running the show in any given pane disappear.
I personally wouldn't be interested in any Win32 GUI framework that
couldn't do that, and once you've done it, you're well along the way
to a portable framework so you may as well design the abstraction
to be independent of the Win32 API altogether.
-- Dave Abrahams Boost Consulting http://www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk