Old 23rd March 2011, 16:16   #1
Junior Member
Join Date: Oct 2007
Posts: 5
Custom License Page - big license file


I am new in NSIS.

I have to add a "Save License File" button on (a custom) license page.

My problem is that if the license.txt is bigger than 1024 B, the file is displayed trimmed.

PHP Code:
        FileOpen $"$INSTDIR/License.txt" 
         StrCpy $file 
"" initialize
FileRead $$
              IfErrors done 
              StrCpy $file 
Goto loop 

FileClose $
!insertmacro CHANGETEXTFIELD "${DIALOG1}" "${CMD_FIELD_2}$file 
PHP Code:
  Push $R0 
holds value
SendMessage $R0 ${WM_SETTEXT"STR:${VALUE}"
Pop $R0
I've tried to add a custom button on the a default License page. But if I add a custom button over the existing controls, the "old" controls disappears.

PHP Code:
!insertmacro MUI_PAGE_LICENSE "License.txt" 
PHP Code:
Function lic_pre
!insertmacro MUI_HEADER_TEXT "Title" "Subtitle"  
nsDialogs::Create 1018 
${NSD_CreateCheckbox6090506"Show button below"
Pop $hwnd
${NSD_OnClick$hwnd EnDisableButton
${NSD_CreateButton25255050"Hello World"
Pop $button
        ShowWindow $button 
${SW_HIDE# start out hidden
Can you please give me a hint ...?
I must Add a new button...
Attached Files
File Type: zip ___Test.zip (2.8 KB, 118 views)
HandShake is offline   Reply With Quote
Old 24th March 2011, 08:05   #2
Anders's Avatar
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,153
Search the forum for EM_STREAMIN or something like that and you should find a thread about reading large license files

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump