Cynosphere
Freshman Member
Posts: 46
OS: Windows 10 Home 22H2
Theme: Classic (Scheme: Amora Focus)
CPU: AMD Ryzen 7 3700X
RAM: 32 GB
GPU: AMD Radeon RX 7900 XT
|
Post by Cynosphere on Mar 11, 2023 14:16:02 GMT -8
// ==WindhawkMod== // @id classic-file-picker // @name Classic File Picker // @description Redirect the Windows Vista+ file picker to the Windows XP one // @version 0.1 // @author Cynosphere // @include * // @compilerOptions -lole32 -lcomdlg32 // ==/WindhawkMod==
// ==WindhawkModReadme== /* # Classic File Picker */ // ==/WindhawkModReadme==
template<class S> CLSID CreateGUID(const S& hexString) { CLSID clsid; CLSIDFromString(hexString, &clsid);
return clsid; }
const CLSID CLSID_FileOpenDialog = CreateGUID(L"{DC1C5A9C-E88A-4dde-A5A1-60F82A20AEF7}"); const CLSID CLSID_FileOpenDialogLegacy = CreateGUID(L"{725F645B-EAED-4fc5-B1C5-D9AD0ACCBA5E}"); const CLSID CLSID_FileSaveDialog = CreateGUID(L"{c0b4e2f3-ba21-4773-8dba-335ec946eb8b}"); const CLSID CLSID_FileSaveDialogLegacy = CreateGUID(L"{AF02484C-A0A9-4669-9051-058AB12B9195}");
using CoCreateInstance_t = decltype(&CoCreateInstance); CoCreateInstance_t CoCreateInstance_Original; HRESULT WINAPI CoCreateInstance_Hook(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID riid, LPVOID *ppv) { if (rclsid == CLSID_FileOpenDialog) { return CoCreateInstance_Original(CLSID_FileOpenDialogLegacy, pUnkOuter, dwClsContext, riid, ppv); } else if (rclsid == CLSID_FileSaveDialog) { return CoCreateInstance_Original(CLSID_FileSaveDialogLegacy, pUnkOuter, dwClsContext, riid, ppv); }
return CoCreateInstance_Original(rclsid, pUnkOuter, dwClsContext, riid, ppv); }
BOOL Wh_ModInit() { Wh_SetFunctionHook((void*)CoCreateInstance, (void*)CoCreateInstance_Hook, (void**)&CoCreateInstance_Original);
return TRUE; }
void Wh_ModUninit() {}
This does require classic theme though to work properly, Windows will upgrade to the normal dialog no matter what but this solves my gripe with the Windhawk classic theme method.
|
|
|
Post by The Jackal on Mar 11, 2023 15:17:46 GMT -8
// ==WindhawkMod== // @id classic-file-picker // @name Classic File Picker // @description Redirect the Windows Vista+ file picker to the Windows XP one // @version 0.1 // @author Cynosphere // @include * // @compilerOptions -lole32 -lcomdlg32 // ==/WindhawkMod==
// ==WindhawkModReadme== /* # Classic File Picker */ // ==/WindhawkModReadme==
template<class S> CLSID CreateGUID(const S& hexString) { CLSID clsid; CLSIDFromString(hexString, &clsid);
return clsid; }
const CLSID CLSID_FileOpenDialog = CreateGUID(L"{DC1C5A9C-E88A-4dde-A5A1-60F82A20AEF7}"); const CLSID CLSID_FileOpenDialogLegacy = CreateGUID(L"{725F645B-EAED-4fc5-B1C5-D9AD0ACCBA5E}"); const CLSID CLSID_FileSaveDialog = CreateGUID(L"{c0b4e2f3-ba21-4773-8dba-335ec946eb8b}"); const CLSID CLSID_FileSaveDialogLegacy = CreateGUID(L"{AF02484C-A0A9-4669-9051-058AB12B9195}");
using CoCreateInstance_t = decltype(&CoCreateInstance); CoCreateInstance_t CoCreateInstance_Original; HRESULT WINAPI CoCreateInstance_Hook(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID riid, LPVOID *ppv) { if (rclsid == CLSID_FileOpenDialog) { return CoCreateInstance_Original(CLSID_FileOpenDialogLegacy, pUnkOuter, dwClsContext, riid, ppv); } else if (rclsid == CLSID_FileSaveDialog) { return CoCreateInstance_Original(CLSID_FileSaveDialogLegacy, pUnkOuter, dwClsContext, riid, ppv); }
return CoCreateInstance_Original(rclsid, pUnkOuter, dwClsContext, riid, ppv); }
BOOL Wh_ModInit() { Wh_SetFunctionHook((void*)CoCreateInstance, (void*)CoCreateInstance_Hook, (void**)&CoCreateInstance_Original);
return TRUE; }
void Wh_ModUninit() {}
This does require classic theme though to work properly, Windows will upgrade to the normal dialog no matter what but this solves my gripe with the Windhawk classic theme method. Ah you've made me very happy. It works well, only issue I have it will not work unless I use Travis' classic theme script, which forces the title bar to not use the classic theme for me. I'm using 6sicsix's hybrid classic theme batch script, and even uninstalling 6sicsix's script, Travis's mod still produces the same results. Not sure if it's an issue with build 1607. Thank you so much for making this a reality. I've wanted this for ages, thank you!
|
|
Cynosphere
Freshman Member
Posts: 46
OS: Windows 10 Home 22H2
Theme: Classic (Scheme: Amora Focus)
CPU: AMD Ryzen 7 3700X
RAM: 32 GB
GPU: AMD Radeon RX 7900 XT
|
Post by Cynosphere on Mar 11, 2023 16:36:51 GMT -8
// ==WindhawkMod== // @id classic-file-picker // @name Classic File Picker // @description Redirect the Windows Vista+ file picker to the Windows XP one // @version 0.1 // @author Cynosphere // @include * // @compilerOptions -lole32 -lcomdlg32 // ==/WindhawkMod==
// ==WindhawkModReadme== /* # Classic File Picker */ // ==/WindhawkModReadme==
template<class S> CLSID CreateGUID(const S& hexString) { CLSID clsid; CLSIDFromString(hexString, &clsid);
return clsid; }
const CLSID CLSID_FileOpenDialog = CreateGUID(L"{DC1C5A9C-E88A-4dde-A5A1-60F82A20AEF7}"); const CLSID CLSID_FileOpenDialogLegacy = CreateGUID(L"{725F645B-EAED-4fc5-B1C5-D9AD0ACCBA5E}"); const CLSID CLSID_FileSaveDialog = CreateGUID(L"{c0b4e2f3-ba21-4773-8dba-335ec946eb8b}"); const CLSID CLSID_FileSaveDialogLegacy = CreateGUID(L"{AF02484C-A0A9-4669-9051-058AB12B9195}");
using CoCreateInstance_t = decltype(&CoCreateInstance); CoCreateInstance_t CoCreateInstance_Original; HRESULT WINAPI CoCreateInstance_Hook(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID riid, LPVOID *ppv) { if (rclsid == CLSID_FileOpenDialog) { return CoCreateInstance_Original(CLSID_FileOpenDialogLegacy, pUnkOuter, dwClsContext, riid, ppv); } else if (rclsid == CLSID_FileSaveDialog) { return CoCreateInstance_Original(CLSID_FileSaveDialogLegacy, pUnkOuter, dwClsContext, riid, ppv); }
return CoCreateInstance_Original(rclsid, pUnkOuter, dwClsContext, riid, ppv); }
BOOL Wh_ModInit() { Wh_SetFunctionHook((void*)CoCreateInstance, (void*)CoCreateInstance_Hook, (void**)&CoCreateInstance_Original);
return TRUE; }
void Wh_ModUninit() {}
This does require classic theme though to work properly, Windows will upgrade to the normal dialog no matter what but this solves my gripe with the Windhawk classic theme method. Ah you've made me very happy. It works well, only issue I have it will not work unless I use Travis' classic theme script, which forces the title bar to not use the classic theme for me. I'm using 6sicsix's hybrid classic theme batch script, and even uninstalling 6sicsix's script, Travis's mod still produces the same results. Not sure if it's an issue with build 1607. Thank you so much for making this a reality. I've wanted this for ages, thank you! I use BasicThemer2(-detours) to fix the titlebars
|
|
|
Post by The Jackal on Mar 11, 2023 17:14:21 GMT -8
Ah you've made me very happy. It works well, only issue I have it will not work unless I use Travis' classic theme script, which forces the title bar to not use the classic theme for me. I'm using 6sicsix's hybrid classic theme batch script, and even uninstalling 6sicsix's script, Travis's mod still produces the same results. Not sure if it's an issue with build 1607. Thank you so much for making this a reality. I've wanted this for ages, thank you! I use BasicThemer2(-detours) to fix the titlebars Yep, that did the trick. Thank you so much again.
|
|
Jevil7452
Regular Member
Posts: 434
OS: Windows 7 Enterprise (6.1.7601)
Theme: Windows Aero by Microsoft Corporation
CPU: Intel Core i7-3770k
RAM: 32GB (4x8GB DDR3)
GPU: NVIDIA GeForce GTX 980 Ti + Intel(R) HD Graphics 4000
Computer Make/Model: OEM0
|
Post by Jevil7452 on Mar 13, 2023 11:11:33 GMT -8
// ==WindhawkMod== // @id classic-file-picker // @name Classic File Picker // @description Redirect the Windows Vista+ file picker to the Windows XP one // @version 0.1 // @author Cynosphere // @include * // @compilerOptions -lole32 -lcomdlg32 // ==/WindhawkMod==
// ==WindhawkModReadme== /* # Classic File Picker */ // ==/WindhawkModReadme==
template<class S> CLSID CreateGUID(const S& hexString) { CLSID clsid; CLSIDFromString(hexString, &clsid);
return clsid; }
const CLSID CLSID_FileOpenDialog = CreateGUID(L"{DC1C5A9C-E88A-4dde-A5A1-60F82A20AEF7}"); const CLSID CLSID_FileOpenDialogLegacy = CreateGUID(L"{725F645B-EAED-4fc5-B1C5-D9AD0ACCBA5E}"); const CLSID CLSID_FileSaveDialog = CreateGUID(L"{c0b4e2f3-ba21-4773-8dba-335ec946eb8b}"); const CLSID CLSID_FileSaveDialogLegacy = CreateGUID(L"{AF02484C-A0A9-4669-9051-058AB12B9195}");
using CoCreateInstance_t = decltype(&CoCreateInstance); CoCreateInstance_t CoCreateInstance_Original; HRESULT WINAPI CoCreateInstance_Hook(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID riid, LPVOID *ppv) { if (rclsid == CLSID_FileOpenDialog) { return CoCreateInstance_Original(CLSID_FileOpenDialogLegacy, pUnkOuter, dwClsContext, riid, ppv); } else if (rclsid == CLSID_FileSaveDialog) { return CoCreateInstance_Original(CLSID_FileSaveDialogLegacy, pUnkOuter, dwClsContext, riid, ppv); }
return CoCreateInstance_Original(rclsid, pUnkOuter, dwClsContext, riid, ppv); }
BOOL Wh_ModInit() { Wh_SetFunctionHook((void*)CoCreateInstance, (void*)CoCreateInstance_Hook, (void**)&CoCreateInstance_Original);
return TRUE; }
void Wh_ModUninit() {}
This does require classic theme though to work properly, Windows will upgrade to the normal dialog no matter what but this solves my gripe with the Windhawk classic theme method. The mod doesn't work for me. I tried rebooting my PC as well as reinstalling Windhawk.
|
|
|
Post by The Jackal on Mar 13, 2023 11:17:56 GMT -8
You need Travis' Classic theme mod for Windhawk and running BasicThemer2 for it to show.
|
|
Jevil7452
Regular Member
Posts: 434
OS: Windows 7 Enterprise (6.1.7601)
Theme: Windows Aero by Microsoft Corporation
CPU: Intel Core i7-3770k
RAM: 32GB (4x8GB DDR3)
GPU: NVIDIA GeForce GTX 980 Ti + Intel(R) HD Graphics 4000
Computer Make/Model: OEM0
|
Post by Jevil7452 on Mar 13, 2023 13:08:16 GMT -8
You need Travis' Classic theme mod for Windhawk and running BasicThemer2 for it to show. That did fix my issues with the file open/save dialog mod, but it's kinda sad that it only works with that mod, as it causes some weirdness with the titlebars
|
|
|
Post by The Jackal on Mar 13, 2023 13:34:53 GMT -8
You need Travis' Classic theme mod for Windhawk and running BasicThemer2 for it to show. That did fix my issues with the file open/save dialog mod, but it's kinda sad that it only works with that mod, as it causes some weirdness with the titlebars Yes, sadly that is one of the trade-offs. I've noticed the same. EDIT: Changing the theme/scheme corrected the issue for me; I'm not sure, but it might be a bug with certain schemes or it corrects itself on theme change.
|
|
|
Post by OrthodoxWin32 on Mar 13, 2023 14:19:52 GMT -8
|
|
|
Post by The Jackal on Mar 14, 2023 13:29:21 GMT -8
Changing theme/scheme corrected the title bar issue for me. It appears BasicThemer doesn't like some schemes, IDK why.
|
|
aubymori
Sophomore Member
👅👅👅👅👅
Posts: 160
OS: Windows 10 IoT Enterprise LTSC 2021
Theme: Windows 10 Default
CPU: Intel Core i5-9300H
RAM: 8GB
GPU: Intel UHD Graphics 630 / NVIDIA GeForce GTX 1650
|
Post by aubymori on Mar 15, 2023 14:12:36 GMT -8
It would be lovely if someone could come up with a version that doesn't require the other mod.
|
|
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 16, 2023 2:52:24 GMT -8
It would be lovely if someone could come up with a version that doesn't require the other mod. I agree. travis's approach is nice but it didn't work well for me.
|
|
|
Post by anixx on Mar 18, 2023 5:39:27 GMT -8
// ==WindhawkMod== // @id classic-file-picker // @name Classic File Picker // @description Redirect the Windows Vista+ file picker to the Windows XP one // @version 0.1 // @author Cynosphere // @include * // @compilerOptions -lole32 -lcomdlg32 // ==/WindhawkMod==
// ==WindhawkModReadme== /* # Classic File Picker */ // ==/WindhawkModReadme==
template<class S> CLSID CreateGUID(const S& hexString) { CLSID clsid; CLSIDFromString(hexString, &clsid);
return clsid; }
const CLSID CLSID_FileOpenDialog = CreateGUID(L"{DC1C5A9C-E88A-4dde-A5A1-60F82A20AEF7}"); const CLSID CLSID_FileOpenDialogLegacy = CreateGUID(L"{725F645B-EAED-4fc5-B1C5-D9AD0ACCBA5E}"); const CLSID CLSID_FileSaveDialog = CreateGUID(L"{c0b4e2f3-ba21-4773-8dba-335ec946eb8b}"); const CLSID CLSID_FileSaveDialogLegacy = CreateGUID(L"{AF02484C-A0A9-4669-9051-058AB12B9195}");
using CoCreateInstance_t = decltype(&CoCreateInstance); CoCreateInstance_t CoCreateInstance_Original; HRESULT WINAPI CoCreateInstance_Hook(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID riid, LPVOID *ppv) { if (rclsid == CLSID_FileOpenDialog) { return CoCreateInstance_Original(CLSID_FileOpenDialogLegacy, pUnkOuter, dwClsContext, riid, ppv); } else if (rclsid == CLSID_FileSaveDialog) { return CoCreateInstance_Original(CLSID_FileSaveDialogLegacy, pUnkOuter, dwClsContext, riid, ppv); }
return CoCreateInstance_Original(rclsid, pUnkOuter, dwClsContext, riid, ppv); }
BOOL Wh_ModInit() { Wh_SetFunctionHook((void*)CoCreateInstance, (void*)CoCreateInstance_Hook, (void**)&CoCreateInstance_Original);
return TRUE; }
void Wh_ModUninit() {}
This does require classic theme though to work properly, Windows will upgrade to the normal dialog no matter what but this solves my gripe with the Windhawk classic theme method. Is itpossible to add ClientEdge to the icon list area?
|
|
|
Post by anixx on Mar 22, 2023 4:37:27 GMT -8
Hello, guys! I found a way to force classic file picker and classic theme without the use of BasicThemer! What one should do: - Enable the Cynosphere open/save dialogs WindHawk mod - Enable the Classic theme using the usual method, such as ClassicThemeTray (or SimpleClassicTheme or similar) - Enable the Classic Theme WindHawk mod by Travis, but modify it by changing "SetThemeAppProperties(0);" to "SetThemeAppProperties(STAP_ALLOW_NONCLIENT);". Also, add a line "// @exclude ApplicationFrameHost.exe" next to "// @include *"
This way you will have the classic theme as with ClassicThemeTray, but also have the classic (XP-style) file picker!
There would be no BasicThemer-related glitches, such as delays and dialogs with wrong window decorations.
|
|
|
Post by anixx on Mar 22, 2023 4:44:21 GMT -8
Ah you've made me very happy. It works well, only issue I have it will not work unless I use Travis' classic theme script, which forces the title bar to not use the classic theme for me. I'm using 6sicsix's hybrid classic theme batch script, and even uninstalling 6sicsix's script, Travis's mod still produces the same results. Not sure if it's an issue with build 1607. Thank you so much for making this a reality. I've wanted this for ages, thank you! I use BasicThemer2(-detours) to fix the titlebars See my post above. You can get rid of BasicThemer.
|
|
|
Post by anixx on Mar 22, 2023 5:34:17 GMT -8
A mod that fuses the functionality of the mod by Cynosphere and Travis, also fixing the window captions that allows to get rid of BasicThemer and does not require the Travis mod: // ==WindhawkMod== // @id classic-file-picker // @name Classic File Picker // @description Redirect the Windows Vista+ file picker to the Windows XP one // @version 0.1 // @author Anixx // @include * // @exclude ApplicationFrameHost.exe // @exclude msedge.exe // @compilerOptions -lole32 -lcomdlg32 -luxtheme // ==/WindhawkMod==
// ==WindhawkModReadme== /* # Classic File Picker */ // ==/WindhawkModReadme==
#include <uxtheme.h>
template<class S> CLSID CreateGUID(const S& hexString) { CLSID clsid; CLSIDFromString(hexString, &clsid);
return clsid; }
const CLSID CLSID_FileOpenDialog = CreateGUID(L"{DC1C5A9C-E88A-4dde-A5A1-60F82A20AEF7}"); const CLSID CLSID_FileOpenDialogLegacy = CreateGUID(L"{725F645B-EAED-4fc5-B1C5-D9AD0ACCBA5E}"); const CLSID CLSID_FileSaveDialog = CreateGUID(L"{c0b4e2f3-ba21-4773-8dba-335ec946eb8b}"); const CLSID CLSID_FileSaveDialogLegacy = CreateGUID(L"{AF02484C-A0A9-4669-9051-058AB12B9195}");
using CoCreateInstance_t = decltype(&CoCreateInstance); CoCreateInstance_t CoCreateInstance_Original; HRESULT WINAPI CoCreateInstance_Hook(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID riid, LPVOID *ppv) { if (rclsid == CLSID_FileOpenDialog) { return CoCreateInstance_Original(CLSID_FileOpenDialogLegacy, pUnkOuter, dwClsContext, riid, ppv); } else if (rclsid == CLSID_FileSaveDialog) { return CoCreateInstance_Original(CLSID_FileSaveDialogLegacy, pUnkOuter, dwClsContext, riid, ppv); }
return CoCreateInstance_Original(rclsid, pUnkOuter, dwClsContext, riid, ppv); }
BOOL Wh_ModInit() { SetThemeAppProperties(STAP_ALLOW_NONCLIENT); Wh_SetFunctionHook((void*)CoCreateInstance, (void*)CoCreateInstance_Hook, (void**)&CoCreateInstance_Original); return TRUE; }
|
|
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 22, 2023 9:24:18 GMT -8
It works perfectly! Really nice.
Now all that's left is to work on ClientEdge. Is it possible to do by modifying the resource? Or AHK or code improvements required?
|
|
|
Post by anixx on Mar 22, 2023 9:24:53 GMT -8
Basically, the line SetThemeAppProperties(STAP_ALLOW_NONCLIENT); makes classic theme to be applied to the window contents, but does not touch the window border at all. So, the mod should not affect the window borders art all.
|
|
|
Post by anixx on Mar 22, 2023 9:35:37 GMT -8
Just noticed that under LibreOffice it uses a different set of icons. I wonder, why?
|
|
|
Post by The Jackal on Mar 22, 2023 9:48:50 GMT -8
I have no such problems. Did you re-login after applying this? No. My bad. I've just logged out now and back in, and yeah, it's all working as it should. Classic title bars are applying everywhere as they should.
|
|