
David Abrahams wrote:
Matt S Trentini <matt_trentini@yahoo.com.au> 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.
Why not just use an existing list control or grid? Best, John -- John Torjo -- john@torjo.com Contributing editor, C/C++ Users Journal -- "Win32 GUI Generics" -- generics & GUI do mix, after all -- http://www.torjo.com/win32gui/ -- v1.4 - save_dlg - true binding of your data to UI controls! + easily add validation rules (win32gui/examples/smart_dlg)