Catalog · How the catalog works
LazWin32CustomAppStyle
Simple StyleManager for Win32/64 created with Lazarus
- ★ 9 on GitHub
Anyone may press Interesting, signed in or not. It helps others find this project.
README
SGJ LazWin32CustomAppStyle
What's this?
Simple Style manager for Win32/64 apps created on Lazarus.
How it works?
It's replace original window theme. It's replace original window theme. Controls Parts and States is painted by custom theming.
It's usefull for create custom Dark Mode or another theme for app.
Requirements
- Lazarus IDE (Tested on v4.4 with FPC 3.2.2)
- DDetours
- BGRABitmap
- Segoe MDL2 Assets icons (on Windows 10/11 it's installed by default)
Compatibility
- Windows 11
- Windows 10
- Windows 8.x
- Windows 7
- Windows Vista
- Windows XP / Server 2003
[!WARNING] It works now, but there is no guarantee it will work in the future.
How to use?
Add DDetours and this src for unit path. Open Your project *.LPR file. Add to uses SGJ.Win32Styles, and your custom theme(example: sgj.win32styles.themes.dark).
Add after Application.Initialize; and before Application.CreateForm(...) :
SGJ.Win32Styles.Themes.Dark.CS_SetCustomColors;
SGJ.Win32Styles.InstallCustomStyle;Change theme at runtime
SGJ.Win32Styles.Themes.Dark.CS_SetCustomColors; // example theme
PostMessage(self.Handle, WM_CS_THEMECHANGE, 0, 0); // form handle, WM_CS_THEMECHANGE is declared in SGJ.Win32StylesLoad default OS Theme
SGJ.Win32Styles.Themes.CS_Enable:=false;
PostMessage(self.Handle, WM_CS_THEMECHANGE, 0, 0);Donate
If you appreciate this project, you can support my work:

