Link to home
Start Free TrialLog in
Avatar of headley
headley

asked on

Limit to Number of Dialog Controls

I seem to be unable to insert more that 255 controls in a dialog template.  Does anyone know a way around this?
Thanks in advance
Garrett
ASKER CERTIFIED SOLUTION
Avatar of mikeblas
mikeblas

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of migel
migel

Hi!

ekiM>>
1) Windows 9x can't handle that many controls, period. Even if you get it running, it'll reduce the available resources for _all_ apps. When the user fires up another app (especially a bigger one), things will fall over.
<<
You aren`t right
in MSDN:

Windows 95 and later: The system can support a maximum of 255 controls per dialog box template. To place more than 255 controls in a dialog box, create the controls in the WM_INITDIALOG message handler rather than placing them in the template.

Windows 95 can manipulate much more child controls per window then 255 .
255 controls just dialog template limitation (although in DLGTEMPLATE there is WORD for controls count-why MS limit it? may be Win16 rudiment?)
There are many parts of Win9x that are still sixteen bit implementations. The limit remains largely because of backward compatibility issues for that code.

If you get a dialog created in Win9x with that many controls, you should consider yourself lucky. But your design is still very poor and your users are suffering.

Windows NT and Windows 2000 have a different codebase for USER, so these limits don't exist there.

..B ekiM
Avatar of headley

ASKER

This is actually kind of a unique application... The CPU running this program won't be running any other application EVER!  So I am content with dealing with the long update times to the screen.  I did already consider creating the controls dynamically, but I will probably just split the screen into 5 control bars which have 80 controls each (the 5 parts of the screen look identical, so I can use a single class).  Thanks for the help... I had never run into that problem before.... and it seems to have the same difficulty with Windows NT as well.

Thanks
Garrett