rikka0w0 / Taskbar-Context-Menu-Tweaker

Bring back the classic context menu style to Windows 10 taskbar
66 stars 6 forks source link

Context menu (Desktop + File Explorer) #2

Open w64bit opened 6 years ago

w64bit commented 6 years ago

Is it possible to add context menu tweaker also for Desktop and File Explorer context menus? Thank you

rikka0w0 commented 6 years ago

The well-known registry tweak for restore classic explorer context menu has been remove since 1809. Just confirmed QAQ I miss this feature so much, so I'm thinking about how to do it with program. The fact is that, all shell context menu have the modern style, e.g. file explorer and open file dialog window in notepad. So there must be a common library which is used by the system to draw the menu. We need to locate the code and perform an code injection to each process. But up to now, I have no idea about how to do the patch. Hints or suggestions are welcomed!

Jake1702 commented 5 years ago

Perhaps explorerframe?

ksdixon commented 5 years ago

This is infuriating.

I make text bold and disable new context menu so I have blue highlight colour, so that I can see better. To see Firefox respecting my settings but File Explorer not just takes the Micky.

rikka0w0 commented 5 years ago

I really don't like the new context menu. But today I made some break through. Conclusion is that:

  1. Only the menu owned by Windows shell has the new style, including desktop, file explorer and open dialog boxes in all applications, self-build shell menus (remember shell provides APIs to allow you to populate your own menu) like this is not affected.
  2. Most ugly menus are owner-drawn by a window which has a class name of "SHELLDLL_DefView", there is one exception, the folder tree in file explorer is called "SysTreeView32" and its parent is called "NamespaceTreeControl".
  3. The code used to draw the ugly menu should be identical to how most program draw owner-drawn menu. Message WM_MEASUREITEM and WM_DRAWITEM are observed.
  4. The browse folder dialog still has the system menu style.

Looks like Microsoft adds the owner-drawn menu flag after querying all menu items, disable owner-drawn while adding menu item has been proved impossible.

To change the menu style, we need our code to present in all processes which have the "SHELLDLL_DefView" and "NamespaceTreeControl". Global hook is not a very good choice since it is very inefficient. Making a shell extension looks good, because shell extensions will be loaded by all "SHELLDLL_DefView" and "NamespaceTreeControl" when needed.

Then we need to find a good type of shell extension to implement. Here are some very naive idea:

  1. When our extension is being loaded, it scans for "SHELLDLL_DefView" and "NamespaceTreeControl"
  2. Replaces WndProc of "SHELLDLL_DefView" and "NamespaceTreeControl" to our own
  3. In our WndProc we handle the WM_INITMENUPOPUP message, this message is sent to the window just before the menu is displayed.
  4. Traverse the entire menu and remove the MF_OWNERDRAW flag for all menu items

This should work, but problems are:

  1. Which type of shell extension should be implemented
  2. How can we locate the correct "SHELLDLL_DefView" and "NamespaceTreeControl" window

Seems like this cannot be done with this program (this program only injects code to the taskbar process), I will start another repo for the explorer context menu patch. I will let your guys know when it is ready. But for now, stay on this thread and post your thoughts here!

PS: I don't hate new menu styles but I really hate inconsistency.

ksdixon commented 5 years ago

I hate it due to visibility, as a disabled user with eyesight problems.

We're talking a difference of the following for me: http://tinypic.com/view.php?pic=mua9t5&s=9

I know nothing of Windows Explorer hacking, but another tweak I use is I have a .dll file that I put into the system32 folder and then run regsvr32 on admin elevated command prompt to register it. I have to re-do this every time I reset windows from fresh, but upgrade installs retain the setting etc. All it does is reinstate the column headers like name, date modified, size, type into all view styles of File Explorer. Microsoft ripped them out of all view styles except for Details view after Windows Vista if I recall correctly. Is there anything about this method that could help our cause?

rikka0w0 commented 5 years ago

Hi, Can you share the dll you mentioned?

ksdixon commented 5 years ago

https://www.sendspace.com/file/zn4aom

ksdixon commented 5 years ago

there seems to be some positive attention on my reddit post about this issue: https://www.reddit.com/r/Windows10/comments/9mh50b/please_spend_a_moment_to_upvote_this/

and i started a uservoice thread in the Ease Of Access category too: https://microsoftaccessibility.uservoice.com/forums/307429-microsoft-accessibility-feedback/suggestions/35661268-windows-10-build-1809-file-explorer-right-click

The uservoice post is a bit ramble-y, i cleaned-up the reddit post, but can't seem to edit the uservoice one.

rikka0w0 commented 5 years ago

It this the same dll? https://github.com/ijprest/Explorer7Fixes

ksdixon commented 5 years ago

yes sir :)

rikka0w0 commented 5 years ago

Hi All,

I have started a new repo, this project generates a DLL file, which will be loaded by explorer and changes the menu style. Use regsvr32.exe .\ExplorerContextMenuTweaker.dll to install, and regsvr32.exe /u .\ExplorerContextMenuTweaker.dll to uninstall. The dll can be deleted after restarting Explorer.exe.

So far, this is the best I can get: kin3 i2 5jf2qfvompt6x2h

Warning: This software is very experimental, not even Alpha stage! Crashes MAY occur! Use at your own risk!

Mario0051 commented 5 years ago

Also, I think it doesn't work on the sound context menu now.

rikka0w0 commented 5 years ago

Which version of Windows 10 are u using? Can you give any details e.g. system version/screenshots?

Mario0051 commented 5 years ago

I am using Windows 10 Build 18282, and this is the issue I am encountering: image

rikka0w0 commented 5 years ago

I will have a look

Mario0051 commented 5 years ago

I am using Windows 10 Build 18305 now and my issue has seemed to be fixed: image And also this issue: image image

ci70 commented 5 years ago

taskbar

rikka0w0 commented 4 years ago
  • The loading mechanism could be better (similar to StartIsBack which uses COM)
  • This doesn't seem to modify taskbar context menus. (tested on 1507 LTSB)
  • Would interesting to have End Process instead of Close Window when ALT is pressed.

taskbar

  1. I will have a look at COM
  2. The image shown is NOT context menu, it is called jump list. It uses a new type of window which is completely different from the win7 jump list window.
  3. As I mentioned in 2, the jump list is not a conventional window, it seems to be a UWP window. For now, I have no idea about how to hook UWP applications.
rikka0w0 commented 4 years ago

For those who are looking for a method to disable immersive context menus in the shell explorer in 1809 and above, I have found an alternative solution:

Check out this:

This is a tutorial for patching aerolite.msstyles, this should give you a immersive menu that looks just like the classic menu. This can be done without any coding, the only thing you need to do is to download uxTheme patcher and the patched aerolite.msstyles from the following link: https://gist.github.com/rikka0w0/971e247871154427d5e62c7b3a7ac1d4

Also check out: https://github.com/rikka0w0/ExplorerContextMenuTweaker/issues/5

rikka0w0 commented 4 years ago

I am using Windows 10 Build 18282, and this is the issue I am encountering: image

I don't have that menu on my Windows, I need you to collect some information so that I can fix the problem, can you do me a favour?

innuendo33 commented 4 years ago

Hi I'd like to submit this ( because of dll inject subject here ) to your opinion if you don't mind : https://imgur.com/pIc5yYs

Do you have any idea if it's possible ? ( couldn't locate file / registry where treeview background settings in windows OS ) systreeview32 control ( that said no one found how since Win 7 ) https://vistastylebuilder.com/forum/index.php?topic=1130.0

Thanks for advice . Regards

innuendo33 commented 4 years ago

Hi

Do you think it's also possible to get back legacy adressbar and restore search box old in latests windows 10 builds ( 1909 & 2004 ) ?

rikka0w0 commented 4 years ago

Hi

Do you think it's also possible to get back legacy adressbar and restore search box old in latests windows 10 builds ( 1909 & 2004 ) ?

No, it is not possible or at least very hard to restore the legacy address bar. However it is relatively easy to "simulate" its behavior. I can still find the address bar in Win10 1909: image Is this what you are talking about?

innuendo33 commented 4 years ago

yes and also the searchbox in file explorer ( see my screenshot ) since 1909 & now 20h1 builds they screwed custom theme to skin correctly those parts .

Capture

and what's strange is under 20h1 build , the legacy one is still operate when you run control panel with a custom theme, its searchbox is the legacy one so I was wondering how to bypass and restore old searchbox to apply custom themes and have a nicer look ( now we get an ugly modern square with arrow on left of searchbox ) Under 1909 there is a tool " mach 2 " which allow revert back but not working for update to release this month . https://www.thewindowsclub.com/enable-legacy-search-box-in-file-explorer-of-windows-10/

I was heard this behaviour change to allow explorer search using modernsearchbox class and windows search feature as an UWP .

Thanks for your interest !