mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Add GetCommandStringFlags
This commit is contained in:
parent
850df7087d
commit
922cbbe92c
1 changed files with 19 additions and 5 deletions
|
|
@ -146,6 +146,20 @@ public static class ShellContextMenuDisplayHelper
|
|||
String = 0x00000000,
|
||||
}
|
||||
|
||||
enum GetCommandStringFlags : uint
|
||||
{
|
||||
VerbA = 0x00000000,
|
||||
HelpTextA = 0x00000001,
|
||||
ValidateA = 0x00000002,
|
||||
Unicode = VerbW,
|
||||
Verb = VerbW,
|
||||
VerbW = 0x00000004,
|
||||
HelpText = HelpTextW,
|
||||
HelpTextW = 0x00000005,
|
||||
Validate = ValidateW,
|
||||
ValidateW = 0x00000006,
|
||||
VerbIconW = 0x00000014
|
||||
|
||||
#endregion
|
||||
|
||||
private static IMalloc GetMalloc()
|
||||
|
|
@ -185,7 +199,7 @@ public static class ShellContextMenuDisplayHelper
|
|||
contextMenu = (IContextMenu)Marshal.GetTypedObjectForIUnknown(pContextMenu, typeof(IContextMenu));
|
||||
|
||||
hMenu = CreatePopupMenu();
|
||||
contextMenu.QueryContextMenu(hMenu, 0, ContextMenuStartId, ContextMenuEndId, (uint)ContextMenuFlags.Normal);
|
||||
contextMenu.QueryContextMenu(hMenu, 0, ContextMenuStartId, ContextMenuEndId, (uint)ContextMenuFlags.Explore);
|
||||
|
||||
var directory = Path.GetDirectoryName(fileName);
|
||||
var invokeCommandInfo = new CMINVOKECOMMANDINFO
|
||||
|
|
@ -195,7 +209,7 @@ public static class ShellContextMenuDisplayHelper
|
|||
hwnd = IntPtr.Zero,
|
||||
lpVerb = (IntPtr)(menuItemId - ContextMenuStartId),
|
||||
lpParameters = null,
|
||||
lpDirectory = directory ?? "",
|
||||
lpDirectory = null,
|
||||
nShow = 1,
|
||||
hIcon = IntPtr.Zero,
|
||||
};
|
||||
|
|
@ -236,10 +250,10 @@ public static class ShellContextMenuDisplayHelper
|
|||
IMalloc malloc = null;
|
||||
IntPtr originalPidl = IntPtr.Zero;
|
||||
IntPtr pShellFolder = IntPtr.Zero;
|
||||
IShellFolder shellFolder = null;
|
||||
IntPtr pContextMenu = IntPtr.Zero;
|
||||
IContextMenu contextMenu = null;
|
||||
IntPtr hMenu = IntPtr.Zero;
|
||||
IShellFolder shellFolder = null;
|
||||
IContextMenu contextMenu = null;
|
||||
|
||||
try
|
||||
{
|
||||
|
|
@ -262,7 +276,7 @@ public static class ShellContextMenuDisplayHelper
|
|||
contextMenu = (IContextMenu)Marshal.GetTypedObjectForIUnknown(pContextMenu, typeof(IContextMenu));
|
||||
|
||||
hMenu = CreatePopupMenu();
|
||||
contextMenu.QueryContextMenu(hMenu, 0, ContextMenuStartId, ContextMenuEndId, (uint)ContextMenuFlags.Normal);
|
||||
contextMenu.QueryContextMenu(hMenu, 0, ContextMenuStartId, ContextMenuEndId, (uint)ContextMenuFlags.Explore);
|
||||
|
||||
var menuItems = new List<ContextMenuItem>();
|
||||
ProcessMenuWithIcons(hMenu, contextMenu, menuItems);
|
||||
|
|
|
|||
Loading…
Reference in a new issue