Archive: Insllaoptions plugin - .ini file background


Insllaoptions plugin - .ini file background
Hello Friends,
I am new to this forum. I have a request it may be small to you all..(:-)

I am using Insllaoptions plugin in my Installer script and using a .ini file to accept some user inputs. I have added a skin with some color i.e. Blue and I would like to add the same color to the .ini file background. other wise the complete setup is in one color i.e. Blue and my Install Options page is coming in two colors i.e. ini file in Windows standard Gui color sourrounded with Blue color.

Please do the needful.


It is described in InstallOptions documentation under Fonds and Colors.
To change the parent dialog background use $HWNDPARENT e.g.
FindWindow $1 "#32770" "" $HWNDPARENT
SetCtlColors $1 '' '0x0000FF'


That will not work. You need to Pop $Var between INITDIALOG and SHOW to get the handle of the InstallOptions window:

!insertmacro MUI_INSTALLOPTIONS_INITDIALOG "ioFile.ini"
Pop $R0
SetCtlColors $R0 0x000000 0xFF0000
!insertmacro MUI_INSTALLOPTIONS_SHOW


Your code will get the handle for any other child windows however.

Stu

Strange... Both following functions do exactly the same job.
Am I missing something here?

InstallOptions::InitDialog /NOUNLOAD "$PLUGINSDIR\Custom.ini"
pop $0
SetCtlColors $0 '' '0x0000FF'
InstallOptions::show

InstallOptions::InitDialog /NOUNLOAD "$PLUGINSDIR\Custom.ini"
FindWindow $0 "#32770" "" $HWNDPARENT
SetCtlColors $0 '' '0x0000FF'
InstallOptions::show

Yes. You missing the case where the custom page is not the first page or that it comes right after another custom page. In some cases, the old dialog might still be active until InstallOptions::show is called and then FindWindow will get the old dialog.


That's true, I've made the test with the custom page being the 1st and only one.
Thanks boss :)


Thanks Friends..
I tried with these options..failed..Here with sending my exact problem with screen shot..plz verify and do the needful.


InstallOptions::dialog "$PLUGINSDIR\dbpaths.ini"
;;;;;;;;;;;;;ammu added --4m forum;;;;;;;;;;;;;;;;;;;;;;;;
FindWindow $0 "#32770" "" $HWNDPARENT
SetCtlColors $0 '' '0x0000FF'
InstallOptions::show
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Pop ${TEMP1}
StrCmp ${TEMP1} "success" 0 continue
continue: Pop ${TEMP1}
Return
FunctionEnd


Look at Red Wine's post again.

You need to put it between InitDialog and Show.

Stu


Here is my issue screen shot..
Here is my issue screen shot..


Did you not read our discussion?


InstallOptions::InitDialog /NOUNLOAD "$PLUGINSDIR\dbpaths.ini"
Pop $R0
SetCtlColors $R0 0x000000 0x0000FF
InstallOptions::Show


Stu

Stu - Did you not read our discussion?
Ameer - I am sorry friend.. I haven't seen your comment while attacthing the screen shot my browse got some problem and I failed to see your message.
I tried with your option.
Now I am able to get the color in ini dialog. I still have one problem for labels..I'll try.

Thanks for your help and sorry for not seeing reply properly

Ammu


Ah right :)
For the controls inside the dialog, you should set their backgrounds individually in the same place:


InstallOptions::InitDialog /NOUNLOAD "$PLUGINSDIR\dbpaths.ini"

Pop $R0
SetCtlColors $R0 0x000000 0x0000FF

ReadINIStr $R0 "$PLUGINSDIR\dbpaths.ini" "Field 1" "HWND"
SetCtlColors $R0 0x000000 0x0000FF

ReadINIStr $R0 "$PLUGINSDIR\dbpaths.ini" "Field 2" "HWND"
SetCtlColors $R0 0x000000 0x0000FF
# etc

InstallOptions::Show


Stu

WOW....Got it..

I got the color for all my fields. Thank you very much Stu.


Ok, I am very likely an idiot (people have suspected as much for a long time). :)

I, too, am playing with getting images and colors into the background of the various installer windows.

I am familiar with the basic NSIS instructions, but have studiously avoided things like functions. But, it appears that time has finally come. :)

In reviewing this thread and the "Bitmaps in the Background" thread, I've tried this code:


Function SetCustom

InstallOptions::initDialog /NOUNLOAD $PLUGINSDIR\testimgs.ini

Pop $R0
SetCtlColors $R0 0xFFFFF 0xFF0000

InstallOptions::Show


FunctionEnd


I've included the mui.nsh also (if that is important).

I successfully get the custom page (only field is to display a bitmap), but the colors are... well... the default. Which are lovely, in a generic way, but not what I'm after. (Which will hopefully end up with something like what the guy in that Bitmap thread had.)

Anyway, I've searched the forums, searched the internet, searched the documentation, but have not been able to piece it together. I'm trying to start simple, but even that is failing me. :)

Any help would be much appreciated.

T

The only thing wrong there is 0xFFFFF is missing an F (it's 0xRRGGBB). Not sure if that will fix it though.

Stu


*blush*

Thanks... math (hex or decimal) is not my forte. :)

Alas, you're right - it didn't fix my problem. Here's an interesting point, though: when I have alot of processes running, for a split second, the screen looks like it is black and red (such as one might expect with the FFFFFF/FF0000, but it is immediately replaced with the "regular" look.

(I also changed it so I re-initialize plugins directory within the custom page function. Figured it couldn't hurt anything, but it didn't help.)

Thanks muchly.

:thumbs:


Just checking you are calling the plugin like so:
Page Custom SetCustom

Stu


Sorta-

Page custom SetCustom "" ": Testing InstallOptions" ;Custom page. InstallOptions gets called in SetCustom.


I copied that from someplace, I think.

But, I think I'm going to tackle this from a different direction.

Even if I use a custom page, I'm limited to the same size of the basic window as MUI, right? (Ideally, I'd like to make the window size better, but even if that is possible, I don't think I'm ready for that yet.) ;)

Is it possible to use MUI to put a bitmap as the skin of the installer, and change the colors of the controls? I've looked at wansis, but it doesn't look like it actually can put a bitmap in the background as a skin; that it skins just the elements.