Software-OK
≡... News | ... Home | ... FAQ | Impressum | Contact | Listed at | Thank you |

  
HOME ► Faq ► FAQ - Windows-CPP-und-C ► ««« »»»

Dark theme in Win32 applications with menu and title bar!


It is not that easy to activate and use Dark Theme in Win32 applications with menu and title bar for Windows 11 & 10!



Here I have found two open source projects that explain it. Essentially, they are also some of the theme functions that were available in Windows 7 and Vista. What is added is the query for the Aero theme and activation in the menus! 

1.) ... Dark Theme in Win32 desktop programs!
2.) ... What else should I consider and what should I do?
3.) ... Why is this the case under Windows 11 and 10?



1.) Dark Theme in Win32 Desktop Programs!

For the menu: 
https://github.com/adzm/win32-custom-menubar-aero-theme/blob/main/UAHMenuBar.cpp

For the window and title page: 
https://github.com/ysc3839/win32-darkmode/blob/master/win32-darkmode/win32-darkmode.cpp

Here is some more nice information:
https://github.com/ysc3839/ClashXW/blob/main/DarkMode.hpp

This can even be implemented on older compilers, even on VS6 C++   

Here is an example: ( ... see image 1 ) 

Project: ►►►  Auto-Login-OK!


(Image-1) Dark Theme in Win32 applications with menu and title bar!
Dark theme in Win32 applications with menu and title bar!


-
▲ Back to the top ▲


2.) What else needs to be considered and what needs to be done?

The standard buttons can be handled/solved using the C++ theme examples linked above . However, if necessary, you have to make various adjustments to "SysTabControl32", Group-Box and your own controls so that they are displayed in the dark theme!
 

If you do this with the "correct" colors of the dark mode, then you get pretty close to the colors of the dark Windows Explorer.

https://social.msdn.microsoft.com/Forums/en-US/16b70775-d87e-42d3-aa8f-41d7d6888c66/how-to-get-colors-of-default-app-mode-quotdarkquot-in-my-win32-app?forum=windowsgeneraldevelopmentissues

This is a nice demo code to list everything, but what constitutes a real list box, combo box, ... or other things is not documented.
 
Many programs define this themselves and only work with the public theme API, such as in Chrome, Firefox and Edge, etc. You could also implement the dark mode for Windows 7 yourself and make it switchable on and off via program options. That's all interesting, but it inevitably looks different when you compare it with the system's standard dark theme.


3.) Why is this the case under Windows 11 and 10?

Dark themes have been forgotten to be transferred to Win32, why is the question!

Since Windows 95, it has been possible to set the colors of all elements. Even in Windows XP with a little effort! All programs could read and use these settings.
 
The separation of Win32 and UWP came with Windows 8 and the two displays are different! Now there are only two basic designs in Windows 11 and 10, namely light and dark. 

Don't forget that you can make good money with such changes!

►►  http://www.opengate.at/blog/2021/08/dark-mode-win32/
 
With the Windows 11 / 10 contrast design, the Win32 applications will be able to cope, but there are also some bugs in the system. And the operating system itself makes errors in the display!  


(Image-2) Dark Theme in Win32 applications with menu and title bar!
Dark theme in Win32 applications with menu and title bar!



WM_CTLCOLORMSGBOX, WM_CTLCOLOREDIT, WM_CTLCOLORLISTBOX, WM_CTLCOLORBTN, WM_CTLCOLORDLG, WM_CTLCOLORSCROLLBAR, WM_CTLCOLORSTATIC
 
msctls_statusbar32, rebarwindow32, toolbarwindow32



-
▲ Back to the top ▲








FAQ 34: Updated on: 4 September 2024 10:57 Windows
Windows-CPP-und-C

Differences between GetWindowsDirectory and GetSystemDirectory?


The difference between GetWindowsDirectory and GetSystemDirectory is quickly explained and understood The GetSystemDirectory  and  GetWindowsDirectory  are
Windows-CPP-und-C

What is Perlin Noise?


At some point while programming you are confronted with the term Perlin or Noise or Perlin-Noise and ask yourself what kind of function it is and what is
Windows-CPP-und-C

Visual Studio 2022 takes forever and is slow, why?


It is difficult to work with Visual Studio 2022 on old hardware, it takes a long time and is very slow, thats why you need the latest hardware Ideally
Windows-CPP-und-C

Use WebView2?


Is a new control and is a browser control in Microsoft called WebView2, successor to CHtmlView or IWebBrowser Contents: 1. The new Microsoft browser
Windows-CPP-und-C

Is a number a prime number in C++?


The function IsPrime returns true if the given number is a prime number; otherwise, it returns false 1. Prime Number Detection in C++: 2. Explanation of
Windows-CPP-und-C

Using arrays and strings in C programs!


This C program explains and demonstrates some important concepts related to the use of arrays and strings. Lets walk through the different aspects of this
Windows-CPP-und-C

Find and replace words in clean C program?


Searching and replacing words or substrings in text is not necessarily simple or difficult in C 1. Search and Replace in a C Program: 2. Tips for Searching

»»

  My question is not there in the FAQ
Asked questions on this answer:
Keywords: cpp, windows, dark, theme, win32, applications, with, menu, title, that, easy, activate, here, have, found, open, source, projects, Questions, Answers, Software




  

  + Freeware
  + Order on the PC
  + File management
  + Automation
  + Office Tools
  + PC testing tools
  + Decoration and fun
  + Desktop-Clocks
  + Security

  + SoftwareOK Pages
  + Micro Staff
  + Freeware-1
  + Freeware-2
  + Freeware-3
  + FAQ
  + Downloads

  + Top
  + Desktop-OK
  + The Quad Explorer
  + Don't Sleep
  + Win-Scan-2-PDF
  + Quick-Text-Past
  + Print Folder Tree
  + Find Same Images
  + Experience-Index-OK
  + Font-View-OK


  + Freeware
  + DesktopNoteOK
  + ShortDoorNote
  + AutoHideDesktopIcons
  + BlankAndSecure
  + AlwaysMouseWheel
  + NewFileTime
  + DesktopClock3D
  + PointerStick
  + DesktopImages3D
  + PAD-s


Home | Thanks | Contact | Link me | FAQ | Settings | Windows 10 | English-AV | Impressum | Translate | PayPal | PAD-s

 © 2025 by Nenad Hrg softwareok.de • softwareok.com • softwareok.com • softwareok.eu


► How can I change the language in the mouse pointer stick? ◄
► Create a password reset disk for Windows 8.1 and Win 10 4 PW restore? ◄
► Can I still create files on Windows 11 that are not compressible? ◄
► Portable rules from 2018, Windows 10, 8.1, 7! ◄


This website does not store personal data. However, third-party providers are used to display ads,
which are managed by Google and comply with the IAB Transparency and Consent Framework (IAB-TCF).
The CMP ID is 300 and can be individually customized at the bottom of the page.
more Infos & Privacy Policy

....