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
headleyAsked:
Who is Participating?
 
mikeblasConnect With a Mentor Commented:
You need to redesign your application.

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.

2) It provides a miserable user experience. Tabbing around and scrolling through so many controls is just miserable. What about users with poor eyesight, or those who uses screen readers?

Odds are the best way to solve your problem is to use a grid control--particularly, one that can have almost any control type in each column is very appropriate. See http://www.stingray.com/ for information on such a control.

Also, you might want to split your controls into many different dialogs, and then present a property sheet. Property sheets were invented exactly for this purpose.

..B ekiM
0
 
migelCommented:
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?)
0
 
mikeblasCommented:
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
0
 
headleyAuthor Commented:
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
0
All Courses

From novice to tech pro — start learning today.