PDA

View Full Version : GetDlgItem - item_id


b_avery@yahoo.c
24th April 2004, 08:00
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.

Joost Verburg
24th April 2004, 12:24
The ID is 1.

b_avery@yahoo.c
25th April 2004, 08:42
$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?

Joost Verburg
25th April 2004, 10:40
The control in located on $HWNDPARENT.

b_avery@yahoo.c
25th April 2004, 12:01
GetDlgItem $1 $HWNDPARENT $0
EnableWindow $1 $0

The Close button is still enabled.

Where is the documentation detailing item_id in the GetDlgItem?

Joost Verburg
25th April 2004, 12:14
Where is the item_id in your last code? There isn't a 1 anywhere.

b_avery@yahoo.c
25th April 2004, 14:06
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?

deguix
25th April 2004, 16:46
You did the inverse, to enable:

GetDlgItem $1 $HWNDPARENT 1
EnableWindow $1 1

To disable:

GetDlgItem $1 $HWNDPARENT 1
EnableWindow $1 0

b_avery@yahoo.c
25th April 2004, 18:17
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.

Joost Verburg
26th April 2004, 09:35
http://forums.winamp.com/showthread.php?s=&threadid=177208