Archive: MUI_PAGE_DIRECTORY, dynamicaly update the 'Destination Folder' text box


MUI_PAGE_DIRECTORY, dynamicaly update the 'Destination Folder' text box
Is there a way to update the value of the 'Destination Folder' in the MUI_PAGE_DIRECTORY dialog when using MUI_PAGE_CUSTOMFUNCTION_LEAVE to validate $INSTDIR

If the folder exists I want to change it to a suggested name, doing a StrCpy $INSTIDR "blaaaa" in the validate function did not work.

Any ideas?

<snip>
; Directory page
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE dir_leave
!insertmacro MUI_PAGE_DIRECTORY

Function dir_leave
IfFileExists "$INSTDIR\*.*" folderExists
goto done

folderexists:
StrCpy $INSTDIR "$INSTDIR\[suggested_name]"
abort
done:
Functionend


Use SendMessage with ${WM_SETTEXT}. Use Resource Hacker to determine the control ID in modern.exe.

Stu


thanks for the info Afrow,
didn't know if there was a MUI macro... guess not :-)

for any one else interested there are numerous examples of SendMessage all over the web... but here is the code I ended using...

FindWindow $R0 "#32770" "" $HWNDPARENT
GetDlgItem $R1 $R0 1019
SendMessage $R1 ${WM_SETTEXT} 0 "STR:$INSTDIR\[blaaaaa]"