> 255 controls in dialog? 
Author Message
 > 255 controls in dialog?

Yes, I know it seems bizarre, but..

I'm trying to create a dialog template, using VC++ 5.0, that has more than
255 controls. Specifically, it is a matrix of 16x17 radio buttons (sans
captions, of course) used to specify channel mappings in a MIDI application.
However, when I try to add controls beyond 255.. nothing happens. (Dragging
controls in results in nothing; attempting to paste in the 16th row of
buttons results in a cheery beep.)

Obviously I've hit a limit.. but what? Is this a fundamental limitation of
Windows, or a limitation of the VC++ resource editor?

BTW, before anybody flames me about my poor sense of UI design.. you should
see this - it looks good (at least as far as I've been able to build it).

TIA

--
Jim Johnson
Metaphoric Software
-------------------
Makers of Techno Toys
Software for Electronic Music
http://www.*-*-*.com/



Wed, 12 Jan 2000 03:00:00 GMT  
 > 255 controls in dialog?

Quote:

> Yes, I know it seems bizarre, but..

> I'm trying to create a dialog template, using VC++ 5.0, that has more than
> 255 controls. Specifically, it is a matrix of 16x17 radio buttons (sans
> captions, of course) used to specify channel mappings in a MIDI application.
> However, when I try to add controls beyond 255.. nothing happens. (Dragging
> controls in results in nothing; attempting to paste in the 16th row of
> buttons results in a cheery beep.)

> Obviously I've hit a limit.. but what? Is this a fundamental limitation of
> Windows, or a limitation of the VC++ resource editor?

> BTW, before anybody flames me about my poor sense of UI design.. you should
> see this - it looks good (at least as far as I've been able to build it).

> TIA

> --
> Jim Johnson
> Metaphoric Software
> -------------------
> Makers of Techno Toys
> Software for Electronic Music
> http://www.technotoys.com


I have run into this problem under VC++ 1.52, and the way I got around
it was to create the dialog controls from the code (OnInitDialog), not
in the App studio. I was creating a one page form with > 350 controls.
This approach works fine. HTH
Chris Hough


Sat, 15 Jan 2000 03:00:00 GMT  
 > 255 controls in dialog?

Its actually a limit in Windows.  This shouldn't happen on Windows NT.
but since the core of the GUI stuff is still 16bit on Windows 95 it is
still a limit.  

The problem is that the user heap is limited to 64K and controls take up
a lot of this heap.  Now you might be able to do what Chris suggested,
given that its just radio buttons but to be honest I'm surprised that
worked for him.

One solution would be to have multiple modeless dialogs up with the
controls you need.  When a change is made you can notify the main window
via a message and have it poll the dialogs for data.

--
Author for Visual C++ Devloper          http://www.pinpub.com/vcd/
---
Believe it or not...
                It's just me....
---



Sat, 15 Jan 2000 03:00:00 GMT  
 > 255 controls in dialog?

With that may controls on a dialog, you might want to consider writing a
special dialog that mimics those controls using a single Window Handle.
Although Windows 95 can allow far more windows than 3.1, and Windows NT has
not practical limit, it is not especially good coding practice to have that
many window handles assigned.



Mon, 17 Jan 2000 03:00:00 GMT  
 > 255 controls in dialog?

Quote:
>Obviously I've hit a limit.. but what? Is this a fundamental limitation of
>Windows, or a limitation of the VC++ resource editor?

Well best way to find out which of these it is, though I expect its a good
style flag in the editor :}, is just open the file as text rather than as
auto or resource, then you can cut and paste the relevant bits from the code
it did let you insert, and change manually.
I know from experience that the developer IDE tools do have limitations that
the compilers etc dont have.  Such as 64k (roughly) strings in a string
table, though you can open as text and add them without problem, I guess the
same is possible here..  In the strings case RC had no problems with the .rc
file, it was just that the editor would truncate it before attempting to
display it.

Arp



Sat, 22 Jan 2000 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. > 255 controls in dialog?

2. Is there way to call SNMP API with 255.255.255.255

3. Is there way to call SNMP API with 255.255.255.255

4. Is there way to call SNMP API with 255.255.255.255

5. cant add > 255 objects to dialog

6. Passing parameter with size >255 chars to sqlserver 6.5

7. Debuggins strings > 255 characters

8. List box items >255 pixels

9. Max 255 objects in a Dialog

10. Dialog problem with only 255 elements

11. data type to store numbers 0-255.

12. Simpleton: Can someone tell me the difference between char* and char x[255]

 

 
Powered by phpBB® Forum Software