ikas-mc / ContextMenuForWindows11

Add Custom Context Menu For Windows11
GNU Lesser General Public License v3.0
1.85k stars 90 forks source link

当同时有多个自定义右键菜单可选的时候,能否全部显示在一级目录,而不是Open With #120

Closed someone132s closed 4 months ago

someone132s commented 5 months ago

如题,不过看了下issue好像现在还不行...(就确认下

ikas-mc commented 5 months ago

这个是win11系统的限制,一个应用只能一个顶级菜单。

并且当前系统版本右键扩展应用越多,加载越卡

ikas-mc commented 4 months ago

提供了一种新的方法,自己生成独立的应用包,通过在应用包中直接配置关联的文件后缀,速度就快了 https://github.com/ikas-mc/ContextMenuForWindows11/wiki/Create-Custom-Package

ghost1372 commented 4 months ago

Hi @ikas-mc i have a question about custom packages... i recompiled your app with +1000 uuid 😁 since i use it in many apps which may installed all in a single pc (so i choose one of them for each app.)

https://github.com/ikas-mc/ContextMenuForWindows11/blob/bf147071b4ef644cd7b0f84efb01df6f2d6a86c9/ContextMenuCustom/ContextMenuCustomHost/CustomExplorerCommand.h#L11-L17

so my question is, is this correct? or i should remove all of them and i use your new Custom package uuid. (if yes, Will it work well if I use it on several different apps and all apps run on the same system?)

ikas-mc commented 4 months ago

@ghost1372 You're right, don't need to use new UUID(any) If build package yourself ,my suggestion is to use a different UUID for each package.

Why can it use the same uuid? Because I forcibly ignore the request uuid

GetClassObject(rclsid) -> GetClassObject(__uuidof(CustomExplorerCommand)

https://github.com/ikas-mc/ContextMenuForWindows11/blob/dev-2024/ContextMenuCustom/ContextMenuCustomHost/dllmain.cpp

STDAPI DllGetClassObject(_In_ REFCLSID rclsid, _In_ REFIID riid, _Outptr_ LPVOID FAR *ppv)
{
#if defined(CMC_ANY)
    return Module<InProc>::GetModule().GetClassObject(__uuidof(CustomExplorerCommand), riid, ppv);
#else
    return Module<InProc>::GetModule().GetClassObject(rclsid, riid, ppv);
#endif
}

may be other problems with this, so it is not recommended this's why I've added a new uuid , instead of just using the same uuid for all