I have a link in my NSIS installer page and I'm trying to change its style (color). The link is declared in my .ini page like this:
[Field 8]
Type=Link
Left=14
Top=18
Right=206
Bottom=28
Text=go to google...
State=https://google.com/
then in the .nsh file i change its style calling:
ReadIniStr $1 "${TEMP}\browse.ini" "Field 8" "HWND"
SendMessage $1 ${WM_SETFONT} $7 0
SetCtlColors $1 0x000000 transparent
It does change the link's style but when i hover it, it goes back to its old style and changes back on refresh (when i drag a window over or press a button that will refresh the field)
The default style looks like a button and i want it to look like an underlined label.
I've also tried to make it label and link it with Linker::link but changing the page skin with NSIS_SkinCrafter_Plugin::skin makes it disappear and i can't bring it back.
Can you please suggest a solution to my problem? I just want a blue underlined text that when hovered opens a webpage in the browser
Try Linker plugin it can change a label into a link.
FindWindow $0 "#32770" "" $HWNDPARENT
GetDlgItem $0 $0 1006
Linker::link /NOUNLOAD $0 "http://www.google.com/"
Related
Header text in license window is invisible. After I click I Agree button and Back button text appears.
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP "MY\IMAGE.bmp"
!define MUI_HEADERIMAGE_BITMAP_NOSTRETCH
I use WelcomeFinish.nsi
How can I solve this?
Had to use Resource Hacker to change the order of elements on exe template.
I'm using the MUI Page INSTFILES in my Installer and I want to change the length of the Progress bar and the Position of the "Show Details" Button in it.
Is this possible still using the MUI Page or do I have to make my own custom Page with nsDialogs?
You can use Resource Hacker to edit ${NSISDIR}\Contrib\UIs\modern.exe and then use this new UI resource:
!define MUI_UI myNewUI.exe
!include MUI2.nsh
...
The other alternative is to call SetWindowPos or MoveWindow with the system plugin at run-time but this is a bit harder to do...
I want to create a custom page in NSIS. In that page I need to create some buttons... Those buttons may be disable or enable mode based on a condition... Following is the code for create button
nsDialogs::Create 1018
Pop $0
${NSD_CreateButton} 275 1 20% 12u "Stop Service"
Pop $BUTTON
GetFunctionAddress $0 StopService
nsDialogs::OnClick $BUTTON $0
nsDialogs::Show
${NSD_CreateButton} option will create the button with enable mode... But I want o create with disable mode.. I have referred the links, but I could not able to find the solution... How can I achieve this on loading the page itself?
Just after the Pop $BUTTON, send a disabling message to the button:
EnableWindow $BUTTON 0
When I use the AfxMessageBox with MB_OK the messagebox is shown with 'ok' as button text and when i use the MB_YESNO it is shown with 'Oui' for Ok and 'Annuler' for No (I am running under French Windows).
I want to know if I could change the text button of my MessageBow without creating a custom one? or is it possible to hide the cancel button when i use the MB_YESNO?
I want to change the button text from next to install once the user accepts the license agreement. Clicking the radio button of accepting the license agreement should change the text of the button from next to install.
There are no hooks that will allow you to change the text based on a event on the license page but you could change the text when you first enter the page:
Page license "" licshow
LicenseForceSelection radiobuttons
Function licshow
GetDlgItem $0 $HWNDPARENT 1
SendMessage $0 ${WM_SETTEXT} 0 "STR:$(^InstallBtn)"
FunctionEnd
or you can use LicenseText "" "$(^InstallBtn)"
If for whatever reason you feel you have to do this you can try the button event plugin...