Here is the code I have written to do it, and it has a flaw - it seems only the first 1024 characters get sent to the text/edit control:
How do I read the entire contents of a text file and send that to a readonly scrollable textbox on a custom form?Function EULAPage
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "${MY_FORM}"
!insertmacro MUI_HEADER_TEXT "[Software] Optional Installation" "Installing this option provides ..."
# Alter the ini file before displaying
WriteINIStr $PLUGINSDIR\${MY_FORM} "Field 4" "Text" $PLUGINSDIR\${MY_IMAGE}
!insertmacro MUI_INSTALLOPTIONS_INITDIALOG "${MY_FORM}"
Loop:
IntOp $R1 $R1 + 1
${LineRead} "newEULA.txt" $R1 $0
StrCpy $1 "$1$0"
IfErrors Done Loop
Done:
!insertmacro MUI_INSTALLOPTIONS_READ $R0 "${MY_FORM}" "Field 6" "HWND"
SendMessage $R0 ${WM_SETTEXT} 0 "STR:$1"
!insertmacro MUI_INSTALLOPTIONS_SHOW
FunctionEnd