Skip to content
⌘ NSIS Forum Archive

Wm_settext

4 posts

thormak#

Wm_settext

I use custom page in ini file with this settings:
[Settings]
NumFields=1
BackEnabled=0

[Field 1]
Type=label
Text="test"
Left=0
Right=100
Top=0
Bottom=20

in nsi i want change text in label:

!insertmacro MUI_INSTALLOPTIONS_DISPLAY "ioA.ini"
FindWindow $0 "#32770" "" $HWNDPARENT
GetDlgItem $1 $0 1200
SendMessage $1 ${WM_SETTEXT} 1 "STR:blabla"

but this not work, text in label not changed.
Where is the bug?

Thanks for help.
Afrow UK#
See this code from Modern UI readme:

!insertmacro MUI_HEADER_TEXT "$(TEXT_IO_TITLE)" "$(TEXT_IO_SUBTITLE)"

!insertmacro MUI_INSTALLOPTIONS_INITDIALOG "ioFile.ini"
Pop $HWND ;HWND of dialog

GetDlgItem $DLGITEM $HWND 1200 ;1200 + Field number - 1

;$DLGITEM contains the HWND of the first field
CreateFont $FONT "Tahoma" 10 700
SendMessage $DLGITEM ${WM_SETFONT} $FONT 0

!insertmacro MUI_INSTALLOPTIONS_SHOW
Edit: Form a simpler solution, just use WriteINIStr to write a new value to the INI file before displaying the InstallOptions page.

-Stu
thormak#
But i want change this dynamically. I have function to search file on hdd, and i want display that directory where my function currently search file.
Afrow UK#
Ah I see. I don't think that's possible. You should go for using the Banner plugin, or you could try this plugin (Banner with progress bar):



-Stu