Archive: InstallOptions and background image


InstallOptions and background image
  Hi All,

I'm using MUI and Install Options to create a custom pages in my installer.

I want a background image in all of the screens. I managed to add it using some example I found that overrides the GUIINIT and call some Win32 API functions to create a static control and set its image.

However, I don't know how to set the controls of the Install Options custom screens to be transparent.

I guess that I need to get the ID of the controls and then call SetCtlColors on them.

Any help is appreciated.

Thanks,
Shlomi.


Anyone?


OK, as no one answered I thought I should share what I found.

When using MUI you can just use the following macros to set transparency to custom installOptions controls:

!insertmacro MUI_HEADER_TEXT "TITLE" "SUBTITLE"

>!insertmacro MUI_INSTALLOPTIONS_INITDIALOG "custom.ini"

>Pop $HWND
SetCtlColors $HWND FFFFFF"TRANSPARENT" ; Set the window background to transparent
GetDlgItem $DLGITEM $HWND 1203;1200 + Field number (here 3)

!insertmacro MUI_INSTALLOPTIONS_SHOW
>
This should be called in the Create handler of the page, instead of the usual:


"TITLE" "SUBTITLE"

>!insertmacro MUI_INSTALLOPTIONS_DISPLAY "custom.ini"
I hope it helps someone.

Shlomi.

As a sidenote, I must say that it's unclear to me why using a background image in the installer is so hard to implement.

Most of my installation is currently working well with the background image however I have two problems that I didn't solve yet:

1. The Next and Back buttons don't get the transparent background as they are not owner-drawn. Should I solve it by editing the resources?
2. The label which presenets the current action in the install files page is transparent, but the text is overwritten and not cleared.

Did anyone on this forum manage to use a background image with no artifcats?

Thanks,
Shlomi.