ZmAn3
5th December 2004 06:38 UTC
misc questions
I need some help with the following please
im using the new version of nsis and MUI
1) I added a bmp control with reshacker but can not get the script to set the image on it, the closest ie came is from a example in the archives all that it seems to do thou is resize the control to the images size but does not show the image.
2)Is there anyway to change the color of the buttons, via SetCtlColors or custom buttons or bmps on them or anything?? and how do I turn off xp style on them?
3)how can i enable and change the text on the desc control the way the installer does when you move over a section ,I want to do it when the page loads so you dont see it as disabled text.
4) is there any way to change the color of the thin line you see between the header area and the rest of the page ,its also on the bottom of the welcome page. is this possible with setctlcolors or making the dialogs flat or somthing ?
5)any way to change the scroll bar colors?
please give examples if possible as i may be retarded :igor:
TIA
:)
ZmAn3
5th December 2004 09:55 UTC
desc
ok as far as the desc label control i figured out this from searching the forums and it works until the user moves the cursor on the installer form then it goes back to the disabled version.
GetDlgItem $DLGITEM $HWND 1043 ; desc label control /////
EnableWindow $DLGITEM $HWND
so if anyone knows a way to keep that from happening please let me know.
also if you use
SendMessage $DLGITEM ${WM_SETTEXT} 0 "STR:Position your butt."
to set the text on the label then it gets changed back to the default text when the cursor gets moved which is annoying
Thanks again.
Afrow UK
5th December 2004 12:12 UTC
Make sure you extract the bitmap onto the user's hard drive first.
You should be able to colour all dialogue items with SetCtlColors. If you want to do so, you'll have to remove 'XPStyle On' from your script.
As for the description text, open up Contrib\Modern UI\System.nsh, scroll to "!macro MUI_DESCRIPTION_BEGIN" and comment out "EnableWindow $MUI_TEMP1 0" (line 225).
You might as well also comment out "EnableWindow $MUI_TEMP1 1" also (below).
-Stu
ZmAn3
6th December 2004 04:37 UTC
ok so the changing the desc label works great thanks
btw is there a way to use a custom system.nsh that i can place in the folder with my script instead of the contrib one? I tried !include "system.nsh" in my script but that doesnt work doesnt give a error either thou :/
as far as turning off the xp style I dont have a xpstyle on in my script i tried adding xpstyle off and that didnt do anything buttons and stuff still have xp style.
as far as the custom bmp i have no clue how to extract that to the drive then load it back into the control on the form :/ is there a example some where ?
Thanks again. nice avatar btw
ok turned off xp style in the system.nsh file and in my script i have
GetDlgItem $DLGITEM $HWNDPARENT 2
SetCtlColors $DLGITEM 000000 000000
SendMessage $DLGITEM ${WM_SETTEXT} 0 "STR:P"
however its not changing the buttons color
Afrow UK
6th December 2004 12:20 UTC
Yes you can. Use:
!include "${NSISDIR}\PathToMy\System.nsh"
If a relative path is used, then NSIS will use Include's from the 'Include' folder.
For Branding images, here's an example:
ChangeUI all "${NSISDIR}\Contrib\UIs\modern.exe"
ChangeUI IDD_INST "${NSISDIR}\Contrib\UIs\modern_headerbmp.exe"
AddBrandingImage left 150 0
In .onInit:
InitPluginsDir
ReserveFile "/oname=$PLUGINSDIR\branding.bmp" "branding.bmp"
Then in a Function/Section:
SetBrandingImage "$PLUGINSDIR\branding.bmp"
Make sure you put the code to modify the parent window dialogue items in .onGUIInit. The System plugin already uses .onGUIInit so you'll need to specify:
!define MUI_CUSTOMFUNCTION_GUIINIT myGUIInit
-Stu