msstyleEditor
msstyleEditor copied to clipboard
Test feature changed my fonts
Hi again. I tried the Test feature, it changed fonts in window caption, desktop icons and some more. It changed the fonts from small Tahoma to large Segoe, and when I stopped testing, the fonts did not recover. After that I tried both AeroByDesign.msstyles and aero.msstyles and they all changed their styles but could not restore the changed fonts. After that I investigated what has changed in the registry and found out that the key HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics has some several values changed. After I restored the previous version of the node (luckily I have one, so I did not have to use a restore point) the fonts restored.
So if your app changes the registry node it should recover it as well. Also, it is not clear what the Test feature does - whether it applies all the styles in the open file or just the open node.
You are right, i could have described that feature more in-depth or at least named it better. I assumed users will just click it anyways and find out instead of looking for and reading documentation. Its on my todo list now.
Short description of what the "Test" feature does: It globally applies the currently open style (with all modifications, doesn't matter if you saved or not) by calling an undocumented windows function. Stopping the test or exiting the program will call the function again with the previous style (to rollback).
As far as i know, the customization dialog of windows calls this function as well, but since the function is undocumented i have no idea if I am calling it correctly and what its limitations are. In any case, the registry keys were changed by windows, not me.
More work is required to figure out if and how the theme switching process can be improved. To be on the safe side, you can always create a system restore point. And keep me updated on any observations you make!
Whatever your application does, it should be able to restore things back. When I turned on testing I had opened the msstyle I actually use for my Windows, but I got some title fonts that I never saw before, and when I apply the styles with the standard Windows tool it doesn't change title fonts at all.
As far as i know, the customization dialog of windows calls this function as well
I use Windows 8.1 and when I switch themes it never changes title fonts. Once I customized windows title font it never changes again, so I doubt that "customization dialog of windows calls this function".