Skip to content
⌘ NSIS Forum Archive

[Help] Change Caption in runtime

5 posts

bluenet#

[Help] Change Caption in runtime

I want to store caption to a Var and change in runtime.
I try
SendMessage $HWNDPARENT ${WM_SETTEXT} 0 `STR:Title`
but not work. How can I make it work?🙄
kichik#
There is no need to use FindWindow. $HWNDPARENT is already the HWND of the main window.

Your SendMessage might not have worked because you've forgotten to include WinMessages.nsh.

But there is no need for SendMessage. You can simply use a variable in the caption and change that variable in .onInit before it's processed.