Using Accent Color in Win32 apps like QT Installer

52 views
Skip to first unread message

Bruno Lopes

unread,
Oct 28, 2024, 11:05:20 AM10/28/24
to innosetup
A bug in QT Installer seems to indicate that is possible to use accent colors in Win32 apps:

Combo box:

Captura de tela 2024-10-26 093115.png

Progress bar:

Captura de tela 2024-10-26 093122.png

---

How can we do that in Inno?

Gavin Lambert

unread,
Oct 29, 2024, 12:57:50 AM10/29/24
to innosetup
On Tuesday, October 29, 2024 at 4:05:20 AM UTC+13 Bruno Lopes wrote:
A bug in QT Installer seems to indicate that is possible to use accent colors in Win32 apps:

The only documented way to get the accent color is to use WinRT APIs:

This requires either writing a C++/WinRT DLL or adding some nuget packages to allow calling from a C# DLL.  Calling either of these from Inno script should be possible, though may be a hassle if you end up needing to embed multiple DLL files to do it.

There are also some undocumented approaches that just read the registry directly, but this is of course much more fragile.

Bruno Lopes

unread,
Oct 29, 2024, 3:32:27 PM10/29/24
to innosetup

Em terça-feira, 29 de outubro de 2024 às 01:57:50 UTC-3, Gavin Lambert escreveu:
On Tuesday, October 29, 2024 at 4:05:20 AM UTC+13 Bruno Lopes wrote:
A bug in QT Installer seems to indicate that is possible to use accent colors in Win32 apps:

[...] may be a hassle if you end up needing to embed multiple DLL files to do it.


Thanks! But after compiling this example (windows runtime message handler - Microsoft Q&A ) with `/VERBOSE /VERBOSE:LIB` and running `objdump -x` in the binary I have no ideia what DLL "have" this WinRT method or this is being statically linked. 

Gavin Lambert

unread,
Oct 29, 2024, 7:07:39 PM10/29/24
to innosetup
On Wednesday, October 30, 2024 at 8:32:27 AM UTC+13 Bruno Lopes wrote:
Thanks! But after compiling this example (windows runtime message handler - Microsoft Q&A ) with `/VERBOSE /VERBOSE:LIB` and running `objdump -x` in the binary I have no ideia what DLL "have" this WinRT method or this is being statically linked. 

Most of it's included with the OS and you shouldn't need to distribute anything, at least for a C++ DLL with static runtime.  Just be careful if you want your code to work on Win7 or older. 
Reply all
Reply to author
Forward
0 new messages