Archive: GetDlgItem ID of the "Next" button?


GetDlgItem ID of the "Next" button?
What's the GetDlgItem ID of the "Next" button on a custom page? Googling around (Eg http://forums.winamp.com/showthread.php?postid=1702648) suggests that it's "1". Reading the source suggests that it's "1001", but in both cases this code sets "$1" to "0" after the GetDlgItem call...


${if} "$SAPageIsVisible" == "0"
!insertmacro MUI_INSTALLOPTIONS_WRITE "software_audit.ini" \
"Settings" "NextButtonText" "$0"
${else}
GetDlgItem $1 "$DialogHandle" 1001
SendMessage $1 ${WM_SETTEXT} 0 "STR:$0"
${endif}


Any ideas?
Angus

Sorry to answer self, but I continued browsing and discovered that the main dialog has a different window ID to the custom page. This works:


GetDlgItem $1 "$HWNDPARENT" 1


Angus