The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: rags on October 26, 2005, 04:25:50 PM

Title: In Memory Dialog Question
Post by: rags on October 26, 2005, 04:25:50 PM
When using the dialog macro, how do you know how much memory to allocate for the dialog?
Is there some kind of guideline to go by?
Does it depend on the amount of controls on the dialog?

Thanks,
Rags
Title: Re: In Memory Dialog Question
Post by: hutch-- on October 26, 2005, 10:56:49 PM
rags,

You get some idea by the amount of code in each macro call and naturally the more controls you use, the higher the memory usage is but it is still reasonably small amounts. Simple dialogs build with 1k no problems but with modern hardware and memory, allocating 64k is hardly a problem and you would strugle to put that many controls on a dialog.

In the later masm32 example code is a demo called "tables" that loop creats 256 check boxes as well as a few buttons and it safely uses 32k so its easy enough to tweak to fit.