shouldnt you already know what it is? anyways.. wouldnt a better idea be something like.. giving NAMES to controlls... instead of those pesky numbers? it will save me doign my work around where i use an identifier and a hash table (with name -=> id information and grouping info.. for use when wanting groups of items to be hidden or shown and so on) none the less. *hands Khaled a pen* time to strat writing this code!
general reply: I like the idea but not alot. either number or text makes no difference since each controls id would still need to be unique. Remeber however using textual names for id's would require mIRC to store an array of strings and the associated id.
so if you have a dialog with 10 control each name is 10 chars the total memory used would be ((sizeof(char) * 100) + sizeof(UINT)). just a shade over 200 just for one dialog. this is of course _just_ for the id's nothing else. the actual controls colors etc.. will still be taking up space as well. i have seen some dialogs with more than 30 controls
now compound this even farther by adding mdx and your looking at a much larger size. Also take into account the array would have to be scanned for every access to the control. this means every /did or $did as well as when an on dialog event needs to be sent. Imagine the same 30 control dialog. Using mdx you could easily send a /did more than 50 times in the init alone. thats 50 scans of the id list as well as additional ones for events.
Most times the speed hit wont be so bad but there is a _great_ chance that it could happen more often than we like.
Perhaps placing limits such as max string count of 10 or soemthing. im sure youll end up seeing things like this if you dont