The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: Petroizki on June 03, 2005, 07:38:15 AM

Title: Control limit on Windows 9x
Post by: Petroizki on June 03, 2005, 07:38:15 AM
Beatiful.

I'm few hours from my project deadline, and everything was fine, except when i started making final testing on Windows 98/ME i noticed that some of the controls had disappeared. Apparantly Windows 9x has a resource limit, one dialog can only have 256 controls defined in the resource file!?  :boohoo:

I guess i could create some of the controls on the fly, but that would just complicate things. I think i'll just delete some of the group boxes.

I hate resource files!
Title: Re: Control limit on Windows 9x
Post by: sluggy on June 03, 2005, 07:59:03 AM
Or more accurately, you can only have 255 controls on one *window* (no matter whether it is from a resource dialog or not). Try redesigning the look of it so that some of the controls are in a new window which is then placed on your main window (this is fundamentally how controls work anyway). Group boxes obviously don't count as new windows, or maybe the group box needs to be made the parent of some of the controls that are inside it.
Title: Re: Control limit on Windows 9x
Post by: Vortex on June 03, 2005, 08:15:39 AM
Hi Petroizki,

Have you the possibility to use binary resource templates?
Title: Re: Control limit on Windows 9x
Post by: hutch-- on June 03, 2005, 08:31:57 AM
I learnt that limit with a 256 checkbox table generator. Works fine on 2k but failed on 98se.
Title: Re: Control limit on Windows 9x
Post by: Petroizki on June 04, 2005, 07:56:43 AM
I just deleted some of the controls, and got the project to end. Today was my last day at work, so i hope the proggie works. I better change my phone number, just in case.  :toothy

Vortex,

Is there a limit on the controls if i would use the res2bin tool?
Title: Re: Control limit on Windows 9x
Post by: Vortex on June 04, 2005, 09:48:33 AM
Hi Petroizki,

I coded a dialog box example displaying 320 push buttons. This demo is based on binary resource data created with the res2bin tool.
It works fine on my Win Xp Home Sp2.

Kindly, could you try to run my demo on your machine?

[attachment deleted by admin]
Title: Re: Control limit on Windows 9x
Post by: sluggy on June 05, 2005, 06:53:49 AM
Quote from: Vortex on June 04, 2005, 09:48:33 AMI coded a dialog box example displaying 320 push buttons. This demo is based on binary resource data created with the res2bin tool.
It works fine on my Win Xp Home Sp2.
I think you missed the point: the problem was that Win95/98 cannot handle more than 255 controls per window, WinXP doesn't have that problem.
Title: Re: Control limit on Windows 9x
Post by: Vortex on June 05, 2005, 07:23:52 AM
Sluggy, I would like to learn if that limit is also valid for binary resource templates. This is why I asked from Petroizki to try my demo.
Title: Re: Control limit on Windows 9x
Post by: Petroizki on June 05, 2005, 10:09:23 AM
Nope, doesn't work on 98 SE..
Title: Re: Control limit on Windows 9x
Post by: pbrennick on June 05, 2005, 12:46:40 PM
It does not work correctly on Windows ME, either.  It only shows 64 of the buttons...

Paul
Title: Re: Control limit on Windows 9x
Post by: Vortex on June 05, 2005, 07:13:55 PM
Yes, Sluggy is right. No such a limitation in Xp.