Alcatel
Freshman Member
Posts: 89
OS: Windows 10 Enterprise LTSC IoT 2021
Theme: Windows 7 Aero
CPU: i9-8950HK
RAM: 32GB DDR4
GPU: Nvidia Quadro P3200
|
Post by Alcatel on Dec 27, 2022 6:18:35 GMT -8
Idk if anyone is familiar with basicthemer2-detours by Splitwirez, but the source code wouldn't compile and then he removed the repository, but I had a downloaded and a compiled version, so I reuploaded it. It's very helpful to make apps that normally bug with basicthemer like mspaint work as well as having blue navigation bar in explorer. github.com/arukateru/basicthemer2-detours
|
|
|
Post by OrthodoxWin32 on Dec 28, 2022 3:28:02 GMT -8
Idk if anyone is familiar with basicthemer2-detours by Splitwirez, but the source code wouldn't compile and then he removed the repository, but I had a downloaded and a compiled version, so I reuploaded it. It's very helpful to make apps that normally bug with basicthemer like mspaint work as well as having blue navigation bar in explorer. github.com/arukateru/basicthemer2-detoursView AttachmentThank you very much Alcatel, this version of BasicThemer has enormous potential. I tested the executable, it fixes explorer address bar. However, this has no effect on most transparent titlebars. On some title bars, this has an effect, but not the expected effect (whether with the visual style activated or deactivated).
|
|
Alcatel
Freshman Member
Posts: 89
OS: Windows 10 Enterprise LTSC IoT 2021
Theme: Windows 7 Aero
CPU: i9-8950HK
RAM: 32GB DDR4
GPU: Nvidia Quadro P3200
|
Post by Alcatel on Jan 4, 2023 21:43:43 GMT -8
Idk if anyone is familiar with basicthemer2-detours by Splitwirez, but the source code wouldn't compile and then he removed the repository, but I had a downloaded and a compiled version, so I reuploaded it. It's very helpful to make apps that normally bug with basicthemer like mspaint work as well as having blue navigation bar in explorer. github.com/arukateru/basicthemer2-detoursView AttachmentThank you very much Alcatel, this version of BasicThemer has enormous potential. I tested the executable, it fixes explorer address bar. However, this has no effect on most transparent titlebars. On some title bars, this has an effect, but not the expected effect (whether with the visual style activated or deactivated). Yeah it doesn't work with many unfortunately. it at least works with mspaint, internet explorer, wordpad
|
|
|
Post by OrthodoxWin32 on Jan 5, 2023 15:51:20 GMT -8
Yeah it doesn't work with many unfortunately. it at least works with mspaint, internet explorer, wordpad The ideal would be to add the other programs, but it's already a big step forward (afterwards, I don't use IE and little mspaint, and I use Windows XP's WordPad). If we had to add something, it would be especially the assistant windows. In addition, this will correct the classic theme at the same time (the same problem arises). Nice improvement anyway, the explorer fix is awesome.
|
|
grand
New Member
Posts: 13
OS: Windows 10 Enterprise KN 2016 LTSB
Theme: Modern/Classic Hybrid (Aerolite + BasicTheme)
CPU: i7-3770 @ 4.55GHz
RAM: 16GB DDR3 2400MHz
GPU: GTX 1070Ti
|
Post by grand on Mar 6, 2023 8:17:22 GMT -8
Idk if anyone is familiar with basicthemer2-detours by Splitwirez, but the source code wouldn't compile and then he removed the repository, but I had a downloaded and a compiled version, so I reuploaded it. It's very helpful to make apps that normally bug with basicthemer like mspaint work as well as having blue navigation bar in explorer. github.com/arukateru/basicthemer2-detoursView AttachmentHello, can I experiment with this code? I wanna try and see if I can have it enable/disable the classic windows minimize/maximize animations, I think I already know what to do, and this tool looks like would be the best place to implement such feature...
|
|
Alcatel
Freshman Member
Posts: 89
OS: Windows 10 Enterprise LTSC IoT 2021
Theme: Windows 7 Aero
CPU: i9-8950HK
RAM: 32GB DDR4
GPU: Nvidia Quadro P3200
|
Post by Alcatel on Mar 6, 2023 21:16:28 GMT -8
Idk if anyone is familiar with basicthemer2-detours by Splitwirez, but the source code wouldn't compile and then he removed the repository, but I had a downloaded and a compiled version, so I reuploaded it. It's very helpful to make apps that normally bug with basicthemer like mspaint work as well as having blue navigation bar in explorer. github.com/arukateru/basicthemer2-detoursView AttachmentHello, can I experiment with this code? I wanna try and see if I can have it enable/disable the classic windows minimize/maximize animations, I think I already know what to do, and this tool looks like would be the best place to implement such feature... yea ofc you can
|
|
|
Post by Taniko Yamamoto on Mar 17, 2023 0:21:56 GMT -8
Idk if anyone is familiar with basicthemer2-detours by Splitwirez, but the source code wouldn't compile and then he removed the repository, but I had a downloaded and a compiled version, so I reuploaded it. It's very helpful to make apps that normally bug with basicthemer like mspaint work as well as having blue navigation bar in explorer. github.com/arukateru/basicthemer2-detoursView AttachmentHello, can I experiment with this code? I wanna try and see if I can have it enable/disable the classic windows minimize/maximize animations, I think I already know what to do, and this tool looks like would be the best place to implement such feature... Hello, I am also very interested in this, and I am curious if you could share your proposed method of getting the classic animation with DWM enabled. I looked at your posts on the topic and you seem knowledgeable.
From what I can tell, the animation is very low-level and is probably baked into user32, though the ReactOS source code certainly doesn't help me find much out about it. As you can observe when DWM composition is disabled, the animation takes rendering priority and other applications won't repaint at all for the duration of the (albeit very short) animation. You also cannot screenshot it with printscreen, doing so will show you the true frame where the application is already at that state instead of the animation. That's why I am under the assumption that it probably won't work well with DWM. The animation being so low-level does make sense though, as it dates back to Windows 95, which needed to pull it off very carefully for the hardware of the time without being choppy.
So my assumption is that it won't really work with DWM enabled. No idea how DWM works, other than that it's a "very fullscreen" DirectX application (if I had to guess, it is responsible for the lowest-level rendering when active). However, the classic animations are unlike classic/uxtheme window frames, as although those are parts of USER, they are still parts of the actual window that get rendered by GDI (specifically, this is called the non-client area, and includes window frames, menubars, scrollbars, etc.), and so DWM is by design compatible with them. In fact, all BasicThemer applications do is that they tell the DWM API that this application shouldn't use DWM to render the non-client area, which is an officially supported feature of DWM. (You might have also seen basic frames in MDI applications like WinRAR ). That's my, albeit somewhat poorly informed, reasoning for why it probably isn't possible.
I am curious to hear any possible solutions, other than making a custom program to emulate it lol
|
|
grand
New Member
Posts: 13
OS: Windows 10 Enterprise KN 2016 LTSB
Theme: Modern/Classic Hybrid (Aerolite + BasicTheme)
CPU: i7-3770 @ 4.55GHz
RAM: 16GB DDR3 2400MHz
GPU: GTX 1070Ti
|
Post by grand on Aug 5, 2023 16:45:44 GMT -8
Hello, can I experiment with this code? I wanna try and see if I can have it enable/disable the classic windows minimize/maximize animations, I think I already know what to do, and this tool looks like would be the best place to implement such feature... Hello, I am also very interested in this, and I am curious if you could share your proposed method of getting the classic animation with DWM enabled. I looked at your posts on the topic and you seem knowledgeable.
From what I can tell, the animation is very low-level and is probably baked into user32, though the ReactOS source code certainly doesn't help me find much out about it. As you can observe when DWM composition is disabled, the animation takes rendering priority and other applications won't repaint at all for the duration of the (albeit very short) animation. You also cannot screenshot it with printscreen, doing so will show you the true frame where the application is already at that state instead of the animation. That's why I am under the assumption that it probably won't work well with DWM. The animation being so low-level does make sense though, as it dates back to Windows 95, which needed to pull it off very carefully for the hardware of the time without being choppy.
So my assumption is that it won't really work with DWM enabled. No idea how DWM works, other than that it's a "very fullscreen" DirectX application (if I had to guess, it is responsible for the lowest-level rendering when active). However, the classic animations are unlike classic/uxtheme window frames, as although those are parts of USER, they are still parts of the actual window that get rendered by GDI (specifically, this is called the non-client area, and includes window frames, menubars, scrollbars, etc.), and so DWM is by design compatible with them. In fact, all BasicThemer applications do is that they tell the DWM API that this application shouldn't use DWM to render the non-client area, which is an officially supported feature of DWM. (You might have also seen basic frames in MDI applications like WinRAR ;)). That's my, albeit somewhat poorly informed, reasoning for why it probably isn't possible.
I am curious to hear any possible solutions, other than making a custom program to emulate it lol
What I was thinking, since we can tell windows to, whenever we want, either draw the basic or classic theme even if dwm is enabled, we can pretty much also tell it to toggle between composited/non-composited animations: It's probably handled by some variable somewhere just like the themes themselves. My plan was to find that variable and force it to always return false using BasicThemer as the base since it was already a solid dwm hook (or even break dwm in such a way it doesn't load the anims, ...or breaking the msstyles ''animations'' portion to where nothing is loaded - thus forcing dwm to fallback to the non-composited anim). Just like when you remove the dwm.exe on win8 and it resorts to doing the basic theme and said animations. Thing is, there's no msstyles editing tool out there that offers editing for the animations portion of the theme, so you need to hex-edit it. I have minimal knowledge on windows dwm coding, though I can tamper with it and do things (such as getting win7 dwm files to ''work'' on win8) I can't really code something from scratch and have it hook on dwm, that's why I tried using BT as a base... I did try some stuff with it, but it just resulted in either basic theme (as normal), classic theme, or a broken hybrid between the two. I actually managed to get old 3d min/max windows longhorn 5048/Vista/7 animations onto windows 8 (with a helluva lot of hex editing, test-signing, msstyles hex editing, vm destroying, hair pulling etc), but never the non-composited anims. Perhaps someone who's familiar with coding stuff for dwm could confirm the force-variable-to-return-false theory for toggling animations, seems like the most viable and less destructive/intrusive way of doing this lol Or like that one classic theme.bat someone made, I tried checking the code on that too but the part that actually enables the classic theme is...well...way above my knowledge xD perhaps it can be done through that same batch script too if the proper code is added. I'll keep on digging the available documentation and trying things. Emulating could be a way too but would still need to hook onto dwm, to tell it to wait until the anims are done playing, behavior would probably be a bit buggy too... Pardon me for any grammar errors or strokes, I'm tired af rn lmao
|
|
|
Post by ephemeralViolette on Aug 6, 2023 9:55:48 GMT -8
Hello, I am also very interested in this, and I am curious if you could share your proposed method of getting the classic animation with DWM enabled. I looked at your posts on the topic and you seem knowledgeable.
From what I can tell, the animation is very low-level and is probably baked into user32, though the ReactOS source code certainly doesn't help me find much out about it. As you can observe when DWM composition is disabled, the animation takes rendering priority and other applications won't repaint at all for the duration of the (albeit very short) animation. You also cannot screenshot it with printscreen, doing so will show you the true frame where the application is already at that state instead of the animation. That's why I am under the assumption that it probably won't work well with DWM. The animation being so low-level does make sense though, as it dates back to Windows 95, which needed to pull it off very carefully for the hardware of the time without being choppy.
So my assumption is that it won't really work with DWM enabled. No idea how DWM works, other than that it's a "very fullscreen" DirectX application (if I had to guess, it is responsible for the lowest-level rendering when active). However, the classic animations are unlike classic/uxtheme window frames, as although those are parts of USER, they are still parts of the actual window that get rendered by GDI (specifically, this is called the non-client area, and includes window frames, menubars, scrollbars, etc.), and so DWM is by design compatible with them. In fact, all BasicThemer applications do is that they tell the DWM API that this application shouldn't use DWM to render the non-client area, which is an officially supported feature of DWM. (You might have also seen basic frames in MDI applications like WinRAR ). That's my, albeit somewhat poorly informed, reasoning for why it probably isn't possible. I am curious to hear any possible solutions, other than making a custom program to emulate it lol
What I was thinking, since we can tell windows to, whenever we want, either draw the basic or classic theme even if dwm is enabled, we can pretty much also tell it to toggle between composited/non-composited animations: It's probably handled by some variable somewhere just like the themes themselves. My plan was to find that variable and force it to always return false using BasicThemer as the base since it was already a solid dwm hook (or even break dwm in such a way it doesn't load the anims, ...or breaking the msstyles ''animations'' portion to where nothing is loaded - thus forcing dwm to fallback to the non-composited anim). Just like when you remove the dwm.exe on win8 and it resorts to doing the basic theme and said animations. Thing is, there's no msstyles editing tool out there that offers editing for the animations portion of the theme, so you need to hex-edit it. I have minimal knowledge on windows dwm coding, though I can tamper with it and do things (such as getting win7 dwm files to ''work'' on win8) I can't really code something from scratch and have it hook on dwm, that's why I tried using BT as a base... I did try some stuff with it, but it just resulted in either basic theme (as normal), classic theme, or a broken hybrid between the two. I actually managed to get old 3d min/max windows longhorn 5048/Vista/7 animations onto windows 8 (with a helluva lot of hex editing, test-signing, msstyles hex editing, vm destroying, hair pulling etc), but never the non-composited anims. Perhaps someone who's familiar with coding stuff for dwm could confirm the force-variable-to-return-false theory for toggling animations, seems like the most viable and less destructive/intrusive way of doing this lol Or like that one classic theme.bat someone made, I tried checking the code on that too but the part that actually enables the classic theme is...well...way above my knowledge xD perhaps it can be done through that same batch script too if the proper code is added. I'll keep on digging the available documentation and trying things. Emulating could be a way too but would still need to hook onto dwm, to tell it to wait until the anims are done playing, behavior would probably be a bit buggy too... Pardon me for any grammar errors or strokes, I'm tired af rn lmao Disabling the DWM window frames is an officially-supported feature of DWM. You just have to set the DWMWA_NCRENDERING_POLICY attribute. There is actually no DWM hooking involved in most tools to enable basic or classic theme; basic themers are almost always observers that watch over the creation of windows and set their non-client rendering policy, and classic theme is usually enabled by closing the theme section (in fact, this must not affect DWM or it would crash; you can observe this if you start ClassicThemeTray and then close DWM - it never restarts). Even BasicThemer2-Detours only hooks dwmapi.dll for loaded applications and not DWM itself.
The reason there's no msstyles editing tool that allows you to edit the non-composited animations is because these aren't handled by msstyles at all. If you're astute, you may have even noticed that the animation doesn't even show the theme caption background image at all. It's actually just the classic theme caption, rendered by the aptly-named function DrawCaption in user32. Additionally, the ability to draw the very animation we discuss is also provided as a public API by the DrawAnimatedRects function in user32. (You are right that the DWM window animations are in the theme, though.)
Although these two functions are provided as public APIs, both the caption drawing and the animation functions are actually implemented in kernel-mode code in win32k.sys. The caption gets lucky, it gets drawn into a GDI device context exclusively since windows are fundamentally GDI contexts at the root for historical reasons. The animation isn't so lucky, however, because it wants to draw to the display as a GDI device context. This works alright when the Win32 subsystem is drawing the window manager, but not when DWM is drawing the window manager from fullscreen-DirectX-land and the display doesn't have a true GDI device context (GetDC(NULL) still works as a read-only proxy, but even this is provided by user32 and not GDI itself).
And so the animation is fucked. It cannot draw because the screen is controlled by something which is incompatible with the API it tries to draw to the screen with.
(Finally, I am interested in how you got Windows 7 DWM to "work" (as you put it) on 8.)
|
|
grand
New Member
Posts: 13
OS: Windows 10 Enterprise KN 2016 LTSB
Theme: Modern/Classic Hybrid (Aerolite + BasicTheme)
CPU: i7-3770 @ 4.55GHz
RAM: 16GB DDR3 2400MHz
GPU: GTX 1070Ti
|
Post by grand on Aug 6, 2023 21:28:57 GMT -8
What I was thinking, since we can tell windows to, whenever we want, either draw the basic or classic theme even if dwm is enabled, we can pretty much also tell it to toggle between composited/non-composited animations: It's probably handled by some variable somewhere just like the themes themselves. My plan was to find that variable and force it to always return false using BasicThemer as the base since it was already a solid dwm hook (or even break dwm in such a way it doesn't load the anims, ...or breaking the msstyles ''animations'' portion to where nothing is loaded - thus forcing dwm to fallback to the non-composited anim). Just like when you remove the dwm.exe on win8 and it resorts to doing the basic theme and said animations. Thing is, there's no msstyles editing tool out there that offers editing for the animations portion of the theme, so you need to hex-edit it. I have minimal knowledge on windows dwm coding, though I can tamper with it and do things (such as getting win7 dwm files to ''work'' on win8) I can't really code something from scratch and have it hook on dwm, that's why I tried using BT as a base... I did try some stuff with it, but it just resulted in either basic theme (as normal), classic theme, or a broken hybrid between the two. I actually managed to get old 3d min/max windows longhorn 5048/Vista/7 animations onto windows 8 (with a helluva lot of hex editing, test-signing, msstyles hex editing, vm destroying, hair pulling etc), but never the non-composited anims. Perhaps someone who's familiar with coding stuff for dwm could confirm the force-variable-to-return-false theory for toggling animations, seems like the most viable and less destructive/intrusive way of doing this lol Or like that one classic theme.bat someone made, I tried checking the code on that too but the part that actually enables the classic theme is...well...way above my knowledge xD perhaps it can be done through that same batch script too if the proper code is added. I'll keep on digging the available documentation and trying things. Emulating could be a way too but would still need to hook onto dwm, to tell it to wait until the anims are done playing, behavior would probably be a bit buggy too... Pardon me for any grammar errors or strokes, I'm tired af rn lmao Disabling the DWM window frames is an officially-supported feature of DWM. You just have to set the DWMWA_NCRENDERING_POLICY attribute. There is actually no DWM hooking involved in most tools to enable basic or classic theme; basic themers are almost always observers that watch over the creation of windows and set their non-client rendering policy, and classic theme is usually enabled by closing the theme section (in fact, this must not affect DWM or it would crash; you can observe this if you start ClassicThemeTray and then close DWM - it never restarts). Even BasicThemer2-Detours only hooks dwmapi.dll for loaded applications and not DWM itself.
The reason there's no msstyles editing tool that allows you to edit the non-composited animations is because these aren't handled by msstyles at all. If you're astute, you may have even noticed that the animation doesn't even show the theme caption background image at all. It's actually just the classic theme caption, rendered by the aptly-named function DrawCaption in user32. Additionally, the ability to draw the very animation we discuss is also provided as a public API by the DrawAnimatedRects function in user32. (You are right that the DWM window animations are in the theme, though.)
Although these two functions are provided as public APIs, both the caption drawing and the animation functions are actually implemented in kernel-mode code in win32k.sys. The caption gets lucky, it gets drawn into a GDI device context exclusively since windows are fundamentally GDI contexts at the root for historical reasons. The animation isn't so lucky, however, because it wants to draw to the display as a GDI device context. This works alright when the Win32 subsystem is drawing the window manager, but not when DWM is drawing the window manager from fullscreen-DirectX-land and the display doesn't have a true GDI device context (GetDC(NULL) still works as a read-only proxy, but even this is provided by user32 and not GDI itself).
And so the animation is fucked. It cannot draw because the screen is controlled by something which is incompatible with the API it tries to draw to the screen with.
(Finally, I am interested in how you got Windows 7 DWM to "work" (as you put it) on 8.)
Great explanation! Damn, I thought that was going to be as easy as breaking something... but I must say that little app does the job quite nicely, I wonder if it's possible to obtain the current gradient color and apply that to the emulated rectangle? Well, for the DWM thing I had SecureUXTheme installed (so it loads custom themes), and test signing (so windows wouldn't immediatelly black screen for loading the non-9200 dwm files). Basically I added every element from windows 8's aero.msstyles into 7's (they were basically the same file, except for different names for the same stuff and some metro stuff missing), moved dwmapi, dwmcore, dwmredir into 8's system32, patched and applied the msstyles through ThemeTool and to my surprise it managed to load, but not perfect: the animations weren't v-synced (they'd screen-tear often), they were off by 4 or 5px (minimizing a window would cause it to shift upwards by a bit, possibly by the same amount of pixels as border padding width), window frames were fully black and uncolorable (they were 7's glass texture, not 8's flat texture, coz of the msstyles in use), maximized window frames would have that mirroring-texture effect instead of full black (like a texture build up, for example dragging the mouse pointer above the caption bar would draw trails in it), none of the metro stuff worked. I remember also testing this with 6.4.9834 msstyles/dwmapi,core,redir but that didn't work as expecteed (just made the left/right window borders black and a dwm crash whenever a metro app started). The OS did survive a reboot, I didn't have a password set so it just went right through the black lockscreen of doom, otherwise it'd probably have become stuck at the password input. HxD was used to change some versions in 7's dll's to match versions/some function names in 8's, in an attempt of minimising the mismatching stuff. And all of this was also done with both vista's and LH's (although LH's actually broke the system after opening a second window - bsod followed by not booting anymore, and vista's caused weird sound stuttering fsr). I recently (couple of weeks ago) began trying something similar with windows 10 (build 10240), I noticed that build 9883's msstyles (and from any build onwards) are directly compatible with it (together with it's shellstyle.dll, and no patching or anything needed for it to run and apply) so maybe there's a chance they'd work better/easier than vista-7-8? I haven't messed with it for a while. Maybe with more digging and trial&error this could actually become something, pretty volatile but functional... Well, you think it's even worth it or is this as good as it's gonna get? Btw sorry if I mislead you/anyone else by saying I got 7's dwm to work on 8, should've mentioned how extremelly broken it was lol! (PS.: My grammar might be way off but again, it's 2:28a.m. and I'm zombie-tired xD my bad)
|
|