using System; using System.Runtime.InteropServices; namespace DelftTools.Utils.Interop { public static class NativeWin32 { [DllImport("user32.dll", CharSet = CharSet.Auto, ExactSpelling = true)] public static extern bool EnableWindow(HandleRef hWnd, bool enable); [DllImport("user32.dll")] [return: MarshalAs(UnmanagedType.Bool)] public static extern bool GetIconInfo(IntPtr hIcon, ref IconInfo pIconInfo); [DllImport("user32.dll")] public static extern IntPtr CreateIconIndirect(ref IconInfo icon); [DllImport("user32.dll")] public static extern bool DestroyIcon(IntPtr handle); [DllImport("gdi32")] public static extern bool DeleteObject(IntPtr hObject); public struct IconInfo { public bool fIcon; public int xHotspot; public int yHotspot; public IntPtr hbmMask; public IntPtr hbmColor; } } }