Archive: GetDlgItem - item_id


GetDlgItem - item_id
  How do I find out all the item_id in the dialog I am looking at.

What I am trying to do is find the Close button on the last screen I have open and Enable/Disable the button.


The ID is 1.


$hwnd is the custom dialog window

InstallOptions::dialog "$TEMP\Final.ini"
Pop $hwnd


GetDlgItem $1 $hwnd 1 ; ... Close button
EnableWindow $1 $0

But for some reason EnableWindow $1 $0 is not working $0 is set to either 0 or 1

Any ideas?


The control in located on $HWNDPARENT.


GetDlgItem $1 $HWNDPARENT $0
EnableWindow $1 $0

The Close button is still enabled.

Where is the documentation detailing item_id in the GetDlgItem?


Where is the item_id in your last code? There isn't a 1 anywhere.


Getting really confused:

This disables the Close button:

GetDlgItem $1 $HWNDPARENT 1
EnableWindow $1 1

And this should enable it, but it does not :-(
GetDlgItem $1 $HWNDPARENT 1
EnableWindow $1 0

What am I doing wrong?


You did the inverse, to enable:


GetDlgItem $1 $HWNDPARENT 1 

EnableWindow$1 1
>
To disable:


GetDlgItem $1 $HWNDPARENT 1 

EnableWindow$1 0
>

Sorry yes got it the wrong way around.

But even so, if I disable the Close button and then try and enable it via the user clicking a button on the form, it does not get enabled.

I know the code is running, but it just is not working.


http://forums.winamp.com/showthread....hreadid=177208