Max controls per dialog AND do large numbers of controls impact overall system
Posted on 2007-08-05
Today I doscovered, the hard way, that VC++ has a hard limitation of 255 controls per dialog. Actually, I think this is the editor as opposed to the language or the OS. Reviewing the topic here, I discovered a lot of opinions, and counter opinions about effects on system performance, use of resources, programming style, etc.
My dialog has, you guessed it, 255 controls on it, and a need for a few more. I realize that this dialog begs for a grid control, and, it will get one eventually. For now though, absent some overriding consideration, I'll stick to dialogs and normal controls.
Fully 150 of the controls are CText, 7 are CComboBoxes, a few are Group Boxes, there are a few buttons, and about 80 CEdits. By the way, I can easily remove about 10-20 controls that aren't absolutely necessary, and complete the project.
My questions are:
1. Am I creating overall system performance issues.
2. If I am, is there a way to place text on a dialog without using a control.
I know that I can create CText, or for that matter, any other control on the fly, but I am only interested in this if it somehow helps with system performance.