BrandingText as URL
Is there a way to make the BrandingText a clickable link that will open up a website?
13 posts
Function .onGUIInit
FindWindow $0 "#32770" "" $HWNDPARENT
GetDlgItem $0 $HWNDPARENT 1028
EnableWindow $0 1
Linker::link /NOUNLOAD $0 "http://www.google.com/"
Functionend
Function .onGUIEnd
Linker::unload
FunctionEnd FindWindow $0 "#32770" "" $HWNDPARENT I looked at both implementations and it seems that AfrowUK's doesn't require these extra lines (of FindWindow, HWND, etc.). Originally posted by Afrow UKSo, the FindWindow/HWND is for getting the id of the static text itself? Not the wizard window?
Linker allows any static texts to be changed to a Url whereas mine is specifically for the branding static text.
FindWindow $0 "#32770" "" $HWNDPARENT
GetDlgItem $0 $0 1006 Now, what do the hardcoded "#32770" and "1006" mean? AFAIK, it is not a good practice to hardcode windows IDs because they are not guaranteed to retain their values on all systems. Are "#32770" and "1006" NSIS documented values that are guaranteed to always mean the same thing? If so, what do they mean?Originally posted by Afrow UKOK, this is clear.
The control id 1006 will never change because it is hard coded in the executable resource in the Contrib\UIs folder.
The window class #32770 is not unique in windows but because $HWNDPARENT is used with FindWindow, then #32770 becomes unique (it is a child window of $HWNDPARENT).
!insertmacro MUI_PAGE_WELCOME Also, in MUI2 I can't use .onGUIInit as described in the example. I tried using: !define MUI_CUSTOMFUNCTION_GUIINIT myGUIInit but it doesn't work. The script compiles successfully, but I get a warning:1 warning:Any idea what I am doing wrong?
install function "myGUIInit" not referenced - zeroing code (585-595) out
Originally posted by nsnbI just discovered what I was doing wrong:
Any idea what I am doing wrong?
!define MUI_CUSTOMFUNCTION_GUIINIT myGUIInit should come BEFORE !insertmacro MUI_PAGE_WELCOME not after.Originally posted by nsnbI fixed that, too - by switching to Stu's BrandingURL plugin, instead of using the Linker plugin. 🙂
Now I need to find out why the Branding text disappears if I click it (it works and it invokes the browser when clicked, but after closing the browser there is no refresh for that particular control).