Skip to content
⌘ NSIS Forum Archive

InstallOptionsEx & Colours

8 posts

asm#

InstallOptionsEx & Colours

I'm creating a new installer based on this:



I am following the UltraModernUI docs for custom pages, but I end up with a grey background on my labels and an incorrect colour for the text. The background colour for the page as a whole is correct.

- I am using:

!define UMUI_USE_INSTALLOPTIONSEX
!define UMUI_SKIN SoftBrown
!define UMUI_NO_BUTTONIMAGE
!define UMUI_XPSTYLE on
- I init from my INI using
MUI_INSTALLOPTIONS_EXTRACT_AS
- My INI is simple with Text and Label fields
- I am using
MUI_INSTALLOPTIONS_DISPLAY
If I understand the docs, using MUI_INSTALLOPTIONS_DISPLAY should set all the colours correctly.



(In fact when I zoom in like that it looks like it might be using the right colour for the text and then overwriting it?)

What am I missing?

Thank you!

- Andy
Anders#
Originally Posted by asm View Post

(In fact when I zoom in like that it looks like it might be using the right colour for the text and then overwriting it?)
That is probably just anti-aliasing/cleartype.
asm#
I haven't yet. According to the "Using InstallOptions or InstallOptionsEx for custom pages" section of the UltraModernUI read me:

You can call InstallOptions in the function defined with the Page or UninstPage command using the MUI_INSTALLOPTIONS_DISPLAY macro. This macro skin automatically your custom pages. It can also automatically convert, on the fly, your custom InstallOptions INI into an InstallOptionsEx INI.
(Although I don't really understand what it means by converting the INI.)

Otherwise I have to do a whole bunch of stuff manually:

Contrary to the MUI_INSTALLOPTIONS_DISPLAY macro, These one can't skin automatically your pages and you need to apply manually the text color and background color to all fields:

I was hoping I was just doing something wrong and wouldn't have to resort to all that...
Anders#
InstallOptionsEx is a 3rd-party plug-in and I'm guessing UMUI uses it. I have never used InstallOptionsEx nor UMUI so I don't really know.

You could automate the calls to SetCtlColors. The .ini knows how many controls there are and which type of control it is so it should be easy to create a loop that changes only the labels.
nickdollahz#
Something I can contribute to finally!

Can you post an example?
It appears to work for me. Although it has been a bit since I used IOEx and UMUI.

I have attached a minimal example that I tested and it seems to be working.
asm#
Thanks Nick - your example does in fact work for me.

I will try to ferret out the difference between yours and mine, but that helps!
asm#
Bingo!

The difference was my INI had a UTF-8 BOM. Once I removed that, it works properly. 😕

Thanks again Nick!