Classic Toolbar Borders in Explorer
Jan 30, 2018 23:44:10 GMT -8
Post by R.O.B. on Jan 30, 2018 23:44:10 GMT -8
I was wondering about getting an explorer window to look a little more classic (specifically the toolbars), so I decided to open up Window Detective and mess around with some of the window styles.
This is what I came up with:
I'll admit, it's not perfect. In fact, it's rather volatile in its current state. Aside from some obvious padding issues, one of the most annoying problems with this is with the Classic Shell Explorer toolbar. Adding a border to the top of it makes it so the icons are invisible until you adjust the size of the toolbar manually, and sadly this doesn't survive resizing the window. But hey, Classic Shell is open source now, so who knows? Maybe this is fixable. I will say that the border around all the toolbars does work pretty reliably after resizing the window (before you do that, it might get cut off on the bottom).
Anyway, I just thought I'd share this. Hopefully one day, we can have an efficient way to automate something like this (possibly through AutoHotKey, or some other method).
EDIT (8/30/2018): Here's a usable version of this that looks similar to what's seen in the image:
Old version (outer border only):
This is what I came up with:
Anyway, I just thought I'd share this. Hopefully one day, we can have an efficient way to automate something like this (possibly through AutoHotKey, or some other method).
EDIT (8/30/2018): Here's a usable version of this that looks similar to what's seen in the image:
#NoTrayIcon
#NoEnv
Gui +LastFound
hWnd := WinExist()
SetControlDelay, -1
DllCall( "RegisterShellHookWindow", UInt,hWnd )
MsgNum := DllCall( "RegisterWindowMessage", Str,"SHELLHOOK" )
OnMessage( MsgNum, "ShellMessage" )
Return
ShellMessage(wParam,lParam) {
If (wParam = 1 or wParam = 6) ; HSHELL_WINDOWCREATED := 1
{
WinGetClass, WinClass, ahk_id %lParam%
if (WinClass = "CabinetWClass") {
Control, Style, +0x800000, ReBarWindow322, ahk_id %lParam%
Control, Style, +0x00000400, ReBarWindow322, ahk_id %lParam%
Control, Style, -0x0000200, ReBarWindow322, ahk_id %lParam%
ControlGetPos,,,,h, ReBarWindow322, ahk_id %lParam%
ControlMove, ReBarWindow322,,,,h+1, ahk_id %lParam%
ControlMove, ReBarWindow322,,,,h, ahk_id %lParam%
}
}
}
Old version (outer border only):
#NoTrayIcon
#NoEnv
Gui +LastFound
hWnd := WinExist()
SetControlDelay, -1
DllCall( "RegisterShellHookWindow", UInt,hWnd )
MsgNum := DllCall( "RegisterWindowMessage", Str,"SHELLHOOK" )
OnMessage( MsgNum, "ShellMessage" )
Return
ShellMessage(wParam,lParam) {
If (wParam = 1 or wParam = 6) ; HSHELL_WINDOWCREATED := 1
{
WinGetClass, WinClass, ahk_id %lParam%
if (WinClass = "CabinetWClass") {
Control, Style, +0x800000, ReBarWindow322, ahk_id %lParam%
}
}
}