WildByDesign Posted October 16, 2025 Author Posted October 16, 2025 4 hours ago, argumentum said: Hope this helps Absolutely. Thank you so much for confirming. argumentum 1
WildByDesign Posted October 20, 2025 Author Posted October 20, 2025 I just wanted to take a moment to thank everyone again who helped with this issue. I've completed the part of the project that relates to the menubar. I actually ended up coloring that line in such a way that it gives the GUI some depth and also made the statusbar sizing and style to match it. When I started learning AutoIt a little over a year ago, I never thought that such beautiful GUIs could be made. I was able to make that line semi-transparent along with the rest of the GUI so that it does the blur behind well and also the Windows 11 materials (Mica, Acrylic, etc.) Cheers everyone! 🍷 ioa747, UEZ and argumentum 3
argumentum Posted October 20, 2025 Posted October 20, 2025 It is a pleasure to see people getting the hang of it and realizing their visions 🍷 WildByDesign 1 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
bladem2003 Posted October 21, 2025 Posted October 21, 2025 (edited) wow... would you publish the source code??? Edited October 21, 2025 by bladem2003
WildByDesign Posted October 21, 2025 Author Posted October 21, 2025 11 minutes ago, bladem2003 said: would you publish the source code??? The latest source code is here (GitHub) and there is also a thread here (in AutoIt forums). The thread is undo the original title of DwmColorBlurMica and the source in that thread is a version behind at the moment. I have to update it soon. But the GitHub repo always has the latest. bladem2003 1
WildByDesign Posted January 2 Author Posted January 2 (edited) So I have discovered (by accident) what is probably a much more efficient way to color that white line that affects win32 menubars in dark mode. I realized that using _WinAPI_SetSysColors on COLOR_MENU was filling that exact white line. It's very interesting because in Win10/11, COLOR_MENU and many other elements are color by the msstyles theme engine and the vast majority of elements no longer work. It seems that the white line is part of the menu that gets missed by the theme, whether it's a bug or not. Even though SetSysColors is system-wide and affects all running programs during that session, using COLOR_MENU is not harmful since it doesn't actually color the menus or menubar in any way in Win10/11. Those are all enforced through the msstyles theme engine. In my opinion, this should be better and safer than painting over the non-client area which I have been doing for a while now. Painting over the non-client area works quite well, but it has cause some conflicts in specific scenarios for me. @UEZ This may be useful as an alternative for your _OverpaintWhiteLine() functionality in your SampleControls.au3 in Dark Mode script if you wish. It can cut out a lot of code and complexity while also completely eliminating any occasional flicker of that white line. Changes: ... ; on script startup Global $iColorNew = 0x202020 Global $iColorOld = _WinAPI_GetSysColor($COLOR_MENU) ; set COLOR_MENU system color _WinAPI_SetSysColors($COLOR_MENU, $iColorNew) ... ; on script exit (after GUIDelete) ; reset COLOR_MENU system color _WinAPI_SetSysColors($COLOR_MENU, $iColorOld) Full Example: expandcollapse popup#include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include <WinAPITheme.au3> #include "GUIDarkMode_v0.02mod.au3" #include "ModernMenuRaw.au3" Global $iColorNew = 0x202020 Global $iColorOld = _WinAPI_GetSysColor($COLOR_MENU) ; set COLOR_MENU system color _WinAPI_SetSysColors($COLOR_MENU, $iColorNew) DllCall("User32.dll", "bool", "SetProcessDpiAwarenessContext" , "HWND", "DPI_AWARENESS_CONTEXT" -4) _SetMenuBkColor(0x202020) _SetMenuIconBkColor(0x202020) _SetMenuIconBkGrdColor(0x202020) _SetMenuSelectBkColor(0x202020) _SetMenuSelectRectColor(0x202020) _SetMenuSelectTextColor(0xFFFFFF) _SetMenuTextColor(0xFFFFFF) Example() Func Example() $hGUI = GUICreate("My GUI", 300, 200) ;Local $idFileMenu = GUICtrlCreateMenu("&File") Local $idFileMenu = _GUICtrlCreateODTopMenu("&File", $hGUI) GUICtrlCreateMenuItem("&Open", $idFileMenu) GUICtrlCreateMenuItem("&Save", $idFileMenu) GUICtrlCreateMenuItem("", $idFileMenu) Local $idOptionsMenu = GUICtrlCreateMenu("O&ptions", $idFileMenu) GUICtrlCreateMenuItem("View", $idOptionsMenu) GUICtrlCreateMenuItem("", $idOptionsMenu) GUICtrlCreateMenuItem("Tools", $idOptionsMenu) GUICtrlCreateMenuItem("", $idFileMenu) Local $idExitItem = GUICtrlCreateMenuItem("&Exit", $idFileMenu) ;Local $idHelpMenu = GUICtrlCreateMenu("&?") Local $idHelpMenu = _GUICtrlCreateODTopMenu("&?", $hGUI) Local $idAboutItem = GUICtrlCreateMenuItem("&About", $idHelpMenu) Local $idEndBtn = GUICtrlCreateButton("End", 110, 140, 70, 20) GuiDarkmodeApply($hGUI) GUISetState(@SW_SHOW) Local $idMsg ; Loop until the user exits. While 1 $idMsg = GUIGetMsg() Switch $idMsg Case $idExitItem, $idEndBtn, $GUI_EVENT_CLOSE ExitLoop Case $idAboutItem MsgBox($MB_SYSTEMMODAL, "About...", "Colored menu sample") EndSwitch WEnd GUIDelete($hGUI) ; reset COLOR_MENU system color _WinAPI_SetSysColors($COLOR_MENU, $iColorOld) EndFunc ;==>Example Edited January 2 by WildByDesign
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now