hide path selection in custom page
Hello,

I am using a custom page with two path selection sections.
On some occasions, one of the selections shall be hidden.
I tried different ways which resulted in different problems:

1. First try:
!insertmacro INSTALLOPTIONS_INITDIALOG "${THE_PAGE}"
FindWindow $1 "#32770" "" $HWNDPARENT
GetDlgItem $2 $1 1207
ShowWindow $2 ${SW_HIDE}
!insertmacro INSTALLOPTIONS_SHOW

This worked only if the page is entered with "Next", but does not work if going back to that page with "Back". On back, the parent windows id is found, but the item id is not (=0).

2. Second try:
!insertmacro INSTALLOPTIONS_INITDIALOG "${THE_PAGE}"
!insertmacro INSTALLOPTIONS_READ $2 "${THE_PAGE}" "Field 4" "HWND"
ShowWindow $2 ${SW_HIDE}
!insertmacro INSTALLOPTIONS_SHOW

This works both on "Next" and "Back", but how do I get the ID of the browse button next to the path entry field?


Anyone has a solution?