Archive: Newbie question about GetDlgItem


Newbie question about GetDlgItem
Hi. I have done my very best to find an answer to this question via other means so apologies if it's been answered before and I missed it!

I am looking at creating an installation with a modified version of MUI. Being completely new to this scripting language I am trying to work out how the MUI scripts work. So far they all make sense, with the exception of GetDlgItem. I understand what it does, what I can't find out is how to get the item id's. For example, in the Welcome Dialog script, there is this...

GetDlgItem $MUI_TEMP1 $HWNDPARENT 1028
ShowWindow $MUI_TEMP1 ${SW_HIDE}

GetDlgItem $MUI_TEMP1 $HWNDPARENT 1256
ShowWindow $MUI_TEMP1 ${SW_HIDE}

I understand that this is looking up a control and hiding it - but where do those numbers come from? Is there a list of what they are or are they worked out somehow? If I make a custom dialog, how do I know what the numbers are for the controls on my custom dialog? (I have read that in NSIS 2.11 I can use ReadINIStr to get the HWND of a control, but I'd like to know how it was done before 2.11 so that I can understand it).

This looks like a nice piece of kit for creating setups - I like the IDE, I like the compiler, I like the InstallOptions dialog editor and I'd really like to get to grips with it and start using it. So any help with this 'hump' in my learning would be appreciated. Thanks!


those numbers are defined in the resource file of the exe's used to hold the dialog resources. you can use resource hacker on them to see what is used on each page or winspy++ as an example of a program which will allow you to get the number (in hexadecimal) of the control you can highlight with it

-daz


Excellent. Just the answer I needed. Guess it shows I'm not an SDK developer ;)

Thank you very much!