Hello everyone,
today I would like to show you how far I have come with the implementation of DarkMode for AutoIT GUIs.
Source: https://github.com/ysc3839/win32-darkmode
About Win32 Darkmode:
Since about 2020 there is a "hidden" / "undocumented" API for Win32 DarkMode.
There is also already a program that has implemented this quite well.
(Notepad++)
Difficulties
Unfortunately, the Windows devs are either too lazy or have been stupid with the implementation.
So we have to apply all kinds of fixes (as we are already used to) to get the GUIs to actually run completely.
Also there are some difficulties as all existing code that could be used is written in c++.
I understand that, but only rudimentarily.
So if there is someone here who can / would like to help me translate / implement some existing solutions.
There are for example:
The 'FixDarkScrollBar()' function which I would like to implement, but where I just can't get any further. Also with ChatGPT the code is difficult to 'override' and it doesn't work at all. GPT tells me that the implementation in AutoIT is quite impossible. And the full IatHook.h (https://github.com/ysc3839/win32-darkmode/blob/master/win32-darkmode/IatHook.h)
Edit: Sloved witth v0.0.3
Todos / Challenges:
* Redrawing of the Menu to Black
* Getting the other controls into the right Theme for DarkMode
* Setting Text Theme Colder of e.g. Checkboxes, ListViewHeader or Group Text
* Getting Darkmode for Date
Let me know what you think and where you might have suggestions for improvement or ideas.
(Especially if you can help translate c++ into autoit :3)
Kind Regards
NoNameCode
GUIDarkMode_V0.03 - OpenNcThemeData Hook.zip
Changelog V.03
* Added HookOpenNcThemeData.dll => Coded by NoNameCode in C++ if someone want the Source pls DM
* Added HookOpenNcThemeData_Debug.dll => Same as HookOpenNcThemeData.dll but Creates a OpenNcThemeData.txt with the opened Classes and if the Class got Replaced by Hook
* Changed Darkmode_GUISample.au3
> More Data for GUICtrlCreateList and GUICtrlCreateEdit + #include <String.au3>
> Added Routine to get AutoIt Install Path by Reg; or if not by @AutoItExe for PIC (logo4.gif) or AVI (SampleAVI.avi)
* Changed GUIDarkMode.au3
> Added DllOpen for HookOpenNcThemeData.dll and Added OnAutoItExitRegister for DllClose function
> Changed _GUICtrlSetDarkTheme -> Cleand Up Switch by CTRL Class bec. moste of them are not needed anymore through ScrollbarFix via HookOpenNcThemeData.dll
Old Stuff: