Perchik71 / Creation-Kit-Platform-Extended

A collection of modifications, enhancements, and reverse engineered resources for Creation Kit by Bethesda.
GNU General Public License v3.0
38 stars 4 forks source link

[Request] Window Style #43

Closed Wynadorn closed 1 month ago

Wynadorn commented 2 months ago

Say an old video today and what i noticed right away was him having the original window styles, It'd be amazing if there's a way to force the CK to use this style.

image

I've attempted to do this though the visual styles compatibility setting however with no result. (see link for info)

Maybe setting the dialog style though a P/Invoke could do the trick.

Perchik71 commented 2 months ago

The system must be configured classically, the display of unique classes that do not have an analogue may be different. eMxVpsS (1) Edit: A drawing from the author of dsp2003, sent to me

Wynadorn commented 1 month ago

I've done some testing, it can be done via SetWindowTheme in uxtheme.h

HRESULT SetWindowTheme(
  [in] HWND    hwnd,
  [in] LPCWSTR pszSubAppName,
  [in] LPCWSTR pszSubIdList
);

uxtheme::SetWindowTheme(hwnd, "", "");

Perchik71 commented 1 month ago

@Wynadorn yep, empty strings will make the classic style, nullptrs will return the default style. This is what it will look like, for implementation need to use hook of all windows as dark mode does. 2024-05-12_01-18-09

Can make a separate, incompatible mode, I don't know at all.. this purely for funs....

Perchik71 commented 1 month ago

Challenge... 2024-05-12_02-02-22

Wynadorn commented 1 month ago

Ah don't bother unless you want it for yourself, I've settled on running a script to patch the window styles

I do think it looks a lot better, no shadows overlapping

Perchik71 commented 1 month ago

The frame is too thick...

Wynadorn commented 1 month ago

Hmm, unsure what's causing that, it's either the theme metrics, those control the padding on title bars too

But it could also be the form border style

Wynadorn commented 1 month ago

Yeah looks like it's the active theme that's causing the border, https://learn.microsoft.com/en-us/windows/win32/controls/themesfileformat-overview

I think the active theme is somewhere in registry, but that value is system wide, it also controls, for example, the padding of the title bar text

I guess uxtheme.dll can be used to overwrite the active theme but I have nooooo idea how

Perchik71 commented 1 month ago

Preview bugs persist. So the window flicker, not the update in the preview will remain. It is fixed only in the dark theme.

Wynadorn commented 1 month ago

b480091 !! 😯 looking forward to try it out, only have a c# toolchain installed atm

Wynadorn commented 1 month ago

When setting the window colors via an external tool (I used Simple Classic Theme, which is buggy) you can see how these affect classic mode.

Here's an example with the high contrast theme: image

And here with classic: image

A bit of history: 😜 In the past Windows featured pretty extensive theming, which the creation kit still has support for. For example Microsoft sold Windows 95 Plus! which came with various themes, like the Inside Your Computer theme: image It included a screensaver, desktop icons, sounds, desktop background.

Here's what a theme config file looks like:

inside-your-computer.theme ``` ;Copyright © Microsoft Corp. 1995 [Theme] DisplayName=Inside your Computer [CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\DefaultIcon] DefaultValue=%ThemeDir%Inside your Computer My Computer.ico [CLSID\{208D2C60-3AEA-1069-A2D7-08002B30309D}\DefaultIcon] DefaultValue=%ThemeDir%Inside your Computer Network Neighborhood.ico [CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\DefaultIcon] full=%ThemeDir%Inside your Computer Recycle Full.ico,0 empty=%ThemeDir%Inside your Computer Recycle Empty.ico,0 [Control Panel\Colors] ActiveTitle=224 0 0 Background=0 0 0 Hilight=248 255 160 HilightText=0 0 0 TitleText=255 255 255 Window=255 255 255 WindowText=0 0 0 Scrollbar=216 224 216 InactiveTitle=96 168 128 Menu=168 200 168 WindowFrame=0 0 0 MenuText=0 0 0 ActiveBorder=168 200 168 InactiveBorder=168 200 168 AppWorkspace=80 143 108 ButtonFace=168 200 168 ButtonShadow=96 152 96 GrayText=96 152 96 ButtonText=0 0 0 InactiveTitleText=216 224 216 ButtonHilight=216 224 216 ButtonDkShadow=0 0 0 ButtonLight=168 200 168 InfoText=0 72 72 InfoWindow=255 239 210 [Control Panel\Cursors] Arrow=%ThemeDir%Inside your Computer arrow.cur Help=%ThemeDir%Inside your Computer help.cur AppStarting=%ThemeDir%Inside your Computer wait.ani Wait=%ThemeDir%Inside your Computer busy.ani NWPen=%ThemeDir%Inside your Computer pen.cur No=%ThemeDir%Inside your Computer no.cur SizeNS=%ThemeDir%Inside your Computer Size NS.cur SizeWE=%ThemeDir%Inside your Computer Size WE.cur Crosshair=%ThemeDir%Inside your Computer cross.cur IBeam=%ThemeDir%Inside your Computer beam.cur SizeNWSE=%ThemeDir%Inside your Computer Size NWSE.cur SizeNESW=%ThemeDir%Inside your Computer Size NESW.cur SizeAll=%ThemeDir%Inside your Computer move.cur UpArrow=%ThemeDir%Inside your Computer up.cur DefaultValue=Windows default [Control Panel\Desktop] Wallpaper=%ThemeDir%Inside your Computer wallpaper.jpg TileWallpaper=0 Pattern=(None) ScreenSaveActive=1 [Control Panel\Desktop\WindowMetrics] [AppEvents\Schemes\Apps\.Default\.Default\.Current] DefaultValue=%ThemeDir%Inside your Computer default sound.wav [AppEvents\Schemes\Apps\.Default\AppGPFault\.Current] DefaultValue=%ThemeDir%Inside your Computer program error.wav [AppEvents\Schemes\Apps\.Default\Maximize\.Current] DefaultValue=%ThemeDir%Inside your Computer maximize.wav [AppEvents\Schemes\Apps\.Default\MenuCommand\.Current] DefaultValue=%ThemeDir%Inside your Computer menu command.wav [AppEvents\Schemes\Apps\.Default\MenuPopup\.Current] DefaultValue=%ThemeDir%Inside your Computer menu popup.wav [AppEvents\Schemes\Apps\.Default\Minimize\.Current] DefaultValue=%ThemeDir%Inside your Computer minimize.wav [AppEvents\Schemes\Apps\.Default\Open\.Current] DefaultValue= [AppEvents\Schemes\Apps\.Default\Close\.Current] DefaultValue= [AppEvents\Schemes\Apps\.Default\RestoreDown\.Current] DefaultValue=%ThemeDir%Inside your Computer Restore Down.wav [AppEvents\Schemes\Apps\.Default\RestoreUp\.Current] DefaultValue=%ThemeDir%Inside your Computer Restore Up.wav [AppEvents\Schemes\Apps\.Default\RingIn\.Current] DefaultValue= [AppEvents\Schemes\Apps\.Default\Ringout\.Current] DefaultValue= [AppEvents\Schemes\Apps\.Default\SystemAsterisk\.Current] DefaultValue=%ThemeDir%Inside your Computer asterisk.wav [AppEvents\Schemes\Apps\.Default\SystemDefault\.Current] DefaultValue=%ThemeDir%Inside your Computer beep.wav [AppEvents\Schemes\Apps\.Default\SystemExclamation\.Current] DefaultValue=%ThemeDir%Inside your Computer exclamation.wav [AppEvents\Schemes\Apps\.Default\SystemExit\.Current] DefaultValue=%ThemeDir%Inside your Computer exit windows.wav [AppEvents\Schemes\Apps\.Default\SystemHand\.Current] DefaultValue=%ThemeDir%Inside your Computer critical stop.wav [AppEvents\Schemes\Apps\.Default\SystemQuestion\.Current] DefaultValue=%ThemeDir%Inside your Computer question.wav [AppEvents\Schemes\Apps\.Default\SystemStart\.Current] DefaultValue=%ThemeDir%Inside your Computer startup.wav [AppEvents\Schemes\Apps\Explorer\EmptyRecycleBin\.Current] DefaultValue=%ThemeDir%Inside your Computer empty recycle bin.wav [Metrics] IconMetrics=76 0 0 0 96 0 0 0 83 0 0 0 1 0 0 0 241 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 144 1 0 0 0 0 0 0 0 0 0 0 65 98 97 100 105 32 77 84 32 67 111 110 100 101 110 115 101 100 32 76 105 103 104 116 0 119 97 118 0 98 105 110 NonclientMetrics=84 1 0 0 1 0 0 0 16 0 0 0 16 0 0 0 20 0 0 0 20 0 0 0 240 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 188 2 0 0 0 0 0 0 0 0 0 0 65 98 97 100 105 32 77 84 32 67 111 110 100 101 110 115 101 100 32 76 105 103 104 116 0 112 82 129 124 76 11 193 17 0 0 0 17 0 0 0 243 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 188 2 0 0 0 0 0 0 0 0 0 0 65 98 97 100 105 32 77 84 32 67 111 110 100 101 110 115 101 100 32 76 105 103 104 116 0 112 82 129 124 76 11 193 19 0 0 0 19 0 0 0 241 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 144 1 0 0 0 0 0 0 0 0 0 0 65 98 97 100 105 32 77 84 32 67 111 110 100 101 110 115 101 100 32 76 105 103 104 116 0 112 82 129 124 76 11 193 241 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 144 1 0 0 0 0 0 0 0 0 0 0 65 98 97 100 105 32 77 84 32 67 111 110 100 101 110 115 101 100 32 76 105 103 104 116 0 112 82 129 124 76 11 193 244 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 144 1 0 0 0 0 0 0 0 0 0 0 65 98 97 100 105 32 77 84 32 67 111 110 100 101 110 115 101 100 32 76 105 103 104 116 0 112 82 129 124 76 11 193 [boot] SCRNSAVE.EXE=%WinDir%\System\Inside your Computer.SCR [MasterThemeSelector] MTSM=DABJDKT ThemeColorBPP=8 Stretch=1 ```

Most of these values are actually still used even in Windows 11 to this day.

Perchik71 commented 1 month ago

Now all applications have become web, not native. It doesn't make much sense anymore. Download the next release and take a look. I don't write in C#.

The system will do better than just uxtheme. :( Edit: Anyway, the second snapshot is better than mine.