AnyKey
Sophomore Member
Posts: 248
OS: Windows 10 Pro 22H2
Theme: XP Classic Theme
CPU: AMD Ryzen 7 3700X
RAM: 16 GB 1333 MHz DDR4
GPU: Nvidia Geforce RTX 2070 Super
|
Post by AnyKey on Mar 20, 2024 2:33:23 GMT -8
This mod overrides title bar and borders of Open/Save dialogs of Chrome (or anything like it) with theme (I don't usually use Chrome though).
|
|
⠀
Freshman Member
Posts: 79
OS: Windows 10 Enterprise LTSC 2019
|
Post by ⠀ on Mar 20, 2024 2:40:39 GMT -8
ok wheres the mod code
|
|
AnyKey
Sophomore Member
Posts: 248
OS: Windows 10 Pro 22H2
Theme: XP Classic Theme
CPU: AMD Ryzen 7 3700X
RAM: 16 GB 1333 MHz DDR4
GPU: Nvidia Geforce RTX 2070 Super
|
Post by AnyKey on Mar 20, 2024 2:47:40 GMT -8
You'll find it in Windhawk repository. It is called Fix browsers for Windows Classic theme.
|
|
|
Post by OrthodoxWin32 on Mar 20, 2024 3:55:13 GMT -8
AnyKey This is a mod that disables the theme except in DWM. Using the basic theme alongside it should solve the issue. ⠀ Here is the code : BOOL Wh_ModInit() { Wh_Log(L"Init"); SetThemeAppProperties(0); return TRUE; } [Off topic] This same mod can be used to create classic themes with another style of title bar/window frame (for example, we can imagine a classic style with transparency). There is also this mod, which does not disable the theme in the window frame and scrollbar : BOOL Wh_ModInit() { Wh_Log(L"Init"); SetThemeAppProperties(STAP_ALLOW_NONCLIENT); return TRUE; }
Its use could be to create a basic theme with most of the controls in a classic theme (like a style close to Windows 3.x). Unfortunately this mod crashes explorer, the only way to use it is to exclude explorer.
|
|
⠀
Freshman Member
Posts: 79
OS: Windows 10 Enterprise LTSC 2019
|
Post by ⠀ on Mar 20, 2024 3:56:30 GMT -8
You'll find it in Windhawk repository. It is called Fix browsers for Windows Classic theme. alr
|
|
|
Post by anixx on Mar 20, 2024 8:01:27 GMT -8
It overrides the titlebadr for the whole browser's process. It is a very simple mod, nor differentiadting things much.
There is no known way to override window frame per window.
|
|
|
Post by ephemeralViolette on Mar 20, 2024 12:40:36 GMT -8
It overrides the titlebadr for the whole browser's process. It is a very simple mod, nor differentiadting things much. There is no known way to override window frame per window.
Given a window (hWnd):
DWMNCRENDERINGPOLICY newRenderingPolicy = DWMNCRP_DISABLED; HRESULT hr = DwmSetWindowAttribute(hWnd, DWMWA_NCRENDERING_POLICY, &newRenderingPolicy, sizeof(newRenderingPolicy)); will disable DWM frames (this is basically how basic framers work).
HRGN hrgn = CreateRectRgn(0, 0, 10000, 10000); SetWindowRgn(hWnd, hrgn, TRUE); is a hack to enable only classic theme frames on only one window. UxTheme installs a hook for SetWindowRgn and makes it disable the themed non-client area for compatibility with older software. It's also possible to override WM_NCPAINT handler for custom window frames entirely, and it is also possible to load themes per-application with some effort (StartIsBack).
Note that the second approach isn't at all necessary here, since you're using the classic theme in the first place. The issue here would likely be fixed with the first code segment, since DWM frames are what's really being displayed here.
|
|
|
Post by anixx on Mar 20, 2024 12:56:34 GMT -8
Thanks. It would be interesting to see which kinds of windows it affects and what is the result.
P.S. I tried the both methods, they do not affect anything under classic theme: the window frames are classic but glitched.
|
|
AnyKey
Sophomore Member
Posts: 248
OS: Windows 10 Pro 22H2
Theme: XP Classic Theme
CPU: AMD Ryzen 7 3700X
RAM: 16 GB 1333 MHz DDR4
GPU: Nvidia Geforce RTX 2070 Super
|
Post by AnyKey on Mar 20, 2024 22:05:59 GMT -8
AnyKey This is a mod that disables the theme except in DWM. Using the basic theme alongside it should solve the issue. Thanks. But it would be great if it could be fixed by modifying the code since using BasicThemer is kinda redundant.
|
|