mIRC Homepage

Named ID Tags for Dialogs (Woo!)

Posted By: benjy355

Named ID Tags for Dialogs (Woo!) - 23/11/05 02:53 AM

It would be nifty if you could set IDs for Dialogs like... say
dialog omfgl33tdiag {
title "bleh"
size -1 -1 -1 -1
option dbu
...
check "Use l33t in Text", leetchk, ...
...
}
anyone with me? =D
Posted By: RusselB

Re: Named ID Tags for Dialogs (Woo!) - 23/11/05 03:58 AM

I think so...if I'm following you then that would've made the making of a dialog that I'm still working on easier, because, I'd be able to use a name, rather than a number to be associated with the different edit boxes.

If this is what you mean, then I'm for it.
Posted By: benjy355

Re: Named ID Tags for Dialogs (Woo!) - 23/11/05 04:33 AM

yup, thats what i meant =D
Posted By: benjy355

Re: Named ID Tags for Dialogs (Woo!) - 23/11/05 04:43 AM

Opp and another idea for dialogs! a previewer =D
Instead of having to save everything and open it through a menu you can have an interactive preview! =D
that would be perfect for sizing and placing text and edit boxes ect.
Posted By: SladeKraven

Re: Named ID Tags for Dialogs (Woo!) - 23/11/05 04:43 AM

I've not checked through Khaled's mIRC todo list but in my opinion if it was a priority it would have been added when dialogs were first implemented.

-Andy
Posted By: benjy355

Re: Named ID Tags for Dialogs (Woo!) - 23/11/05 04:51 AM

ehehe, i can always dream wink
Posted By: RusselB

Re: Named ID Tags for Dialogs (Woo!) - 23/11/05 06:05 AM

Quote:
Opp and another idea for dialogs! a previewer =D
Instead of having to save everything and open it through a menu you can have an interactive preview! =D
that would be perfect for sizing and placing text and edit boxes ect.

For this, I personally use Dialog Studio
Posted By: ClickHeRe

Re: Named ID Tags for Dialogs (Woo!) - 23/11/05 04:18 PM

It's not there for the simple reason that it's not in the win32 API, controls have an HWND (Window Handle given by the system) and an optional ID which is a numerical value between 0 and 32767. It can't be named and API calls rely on the HWND, not on the ID. The ID only serves internal dialog purposes to retrace a control HWND based on the known ID (for puristes, the ID is in fact stored as the MENU handle in child controls because they don't have menus)

In all the case, Khaled would need to implement en axtra mapping layer between control name and ID which I think is unecessary. If you can't cope with arranging your IDs (manage some ranges if you need expandible space) so there is no conflict, then I gues you shouldn't create and manage dialogs.

I don't know what the limit is in mIRC for IDs as maximum value, but just so you know, mIRC dialog IDs start at 6000 and not at 1. You use 1 in the dialog table but it's really 6001. That would mean that the upper limit is 32767 - 6000 for the max ID that can be used in mIRC.
Posted By: RusselB

Re: Named ID Tags for Dialogs (Woo!) - 24/11/05 05:09 AM

For the amount of coding that I do that uses dialogs, using numbers isn't a problem, I just simply said that I would've found it easier to be able to use names.
Posted By: Darwin_Koala

Re: Named ID Tags for Dialogs (Woo!) - 24/11/05 06:12 AM

Can't you set variables to the numbers?

set %dialogCtrl.xxx 1
set %dialogCtrl.xxx 2
set %dialogCtrl.xxx 3

etc?
Posted By: RusselB

Re: Named ID Tags for Dialogs (Woo!) - 24/11/05 06:55 AM

Probably, if I didn't require the actual numbers so that Dialog Studio would work properly with my dialog. As I said earlier, I use that to help with the layout, since I can see the layout as it's being coded.
© 2019 mIRC Discussion Forums