mirror of
https://github.com/Hofknecht/SystemTrayMenu.git
synced 2024-05-19 11:53:02 +12:00
parent
a0cdcb65c4
commit
61196e507f
|
@ -8,7 +8,7 @@ namespace SystemTrayMenu.DllImports
|
|||
[DllImport("user32.dll")]
|
||||
private static extern bool IsIconic(IntPtr hWnd);
|
||||
|
||||
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
|
||||
[DllImport("user32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
|
||||
private static extern IntPtr GetForegroundWindow();
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
|
|
|
@ -6,7 +6,7 @@ namespace SystemTrayMenu.DllImports
|
|||
public static partial class NativeMethods
|
||||
{
|
||||
// The CreatePopupMenu function creates a drop-down menu, submenu, or shortcut menu. The menu is initially empty. You can insert or append menu items by using the InsertMenuItem function. You can also use the InsertMenu function to insert menu items and the AppendMenu function to append menu items.
|
||||
[DllImport("user32", SetLastError = true, CharSet = CharSet.Auto)]
|
||||
[DllImport("user32", SetLastError = true, CharSet = CharSet.Unicode)]
|
||||
private static extern IntPtr CreatePopupMenu();
|
||||
|
||||
public static IntPtr User32CreatePopupMenu()
|
||||
|
|
|
@ -6,7 +6,7 @@ namespace SystemTrayMenu.DllImports
|
|||
public static partial class NativeMethods
|
||||
{
|
||||
// The DestroyMenu function destroys the specified menu and frees any memory that the menu occupies.
|
||||
[DllImport("user32", SetLastError = true, CharSet = CharSet.Auto)]
|
||||
[DllImport("user32", SetLastError = true, CharSet = CharSet.Unicode)]
|
||||
private static extern bool DestroyMenu(IntPtr hMenu);
|
||||
|
||||
public static bool User32DestroyMenu(IntPtr hMenu)
|
||||
|
|
|
@ -6,7 +6,7 @@ namespace SystemTrayMenu.DllImports
|
|||
public static partial class NativeMethods
|
||||
{
|
||||
// Determines the default menu item on the specified menu
|
||||
[DllImport("user32", SetLastError = true, CharSet = CharSet.Auto)]
|
||||
[DllImport("user32", SetLastError = true, CharSet = CharSet.Unicode)]
|
||||
private static extern int GetMenuDefaultItem(IntPtr hMenu, bool fByPos, uint gmdiFlags);
|
||||
|
||||
public static int User32GetMenuDefaultItem(IntPtr hMenu, bool fByPos, uint gmdiFlags)
|
||||
|
|
|
@ -6,7 +6,7 @@ namespace SystemTrayMenu.DllImports
|
|||
public static partial class NativeMethods
|
||||
{
|
||||
// The TrackPopupMenuEx function displays a shortcut menu at the specified location and tracks the selection of items on the shortcut menu. The shortcut menu can appear anywhere on the screen.
|
||||
[DllImport("user32.dll", ExactSpelling = true, CharSet = CharSet.Auto)]
|
||||
[DllImport("user32.dll", ExactSpelling = true, CharSet = CharSet.Unicode)]
|
||||
private static extern uint TrackPopupMenuEx(IntPtr hmenu, TPM flags, int x, int y, IntPtr hwnd, IntPtr lptpm);
|
||||
|
||||
internal static uint User32TrackPopupMenuEx(IntPtr hmenu, TPM flags, int x, int y, IntPtr hwnd, IntPtr lptpm)
|
||||
|
|
|
@ -656,7 +656,7 @@ namespace SystemTrayMenu.Utilities
|
|||
}
|
||||
|
||||
// Contains information about a menu item
|
||||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
|
||||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
|
||||
private struct MENUITEMINFO
|
||||
{
|
||||
public MENUITEMINFO(string text)
|
||||
|
@ -707,7 +707,7 @@ namespace SystemTrayMenu.Utilities
|
|||
}
|
||||
|
||||
// Defines the x- and y-coordinates of a point
|
||||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
|
||||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
|
||||
private struct POINT
|
||||
{
|
||||
public POINT(int x, int y)
|
||||
|
|
|
@ -18,7 +18,7 @@ namespace SystemTrayMenu.Utilities
|
|||
SLGP_RAWPATH = 0x4
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
|
||||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
|
||||
private struct WIN32_FIND_DATAW
|
||||
{
|
||||
public uint dwFileAttributes;
|
||||
|
|
|
@ -56,7 +56,6 @@ namespace SystemTrayMenu.Utilities
|
|||
internal static bool IsHidden(string path, ref bool hiddenEntry)
|
||||
{
|
||||
bool isDirectoryToHide = false;
|
||||
#warning #80
|
||||
if (path.Length < 260)
|
||||
{
|
||||
FileAttributes attributes = File.GetAttributes(path);
|
||||
|
|
Loading…
Reference in a new issue