diff --git a/HandyControl/Tools/Helper/ExternDllHelper.cs b/HandyControl/Tools/Helper/ExternDllHelper.cs index 345abe7a..77a55d5f 100644 --- a/HandyControl/Tools/Helper/ExternDllHelper.cs +++ b/HandyControl/Tools/Helper/ExternDllHelper.cs @@ -19,6 +19,8 @@ namespace HandyControl.Tools private const string Shell32 = "shell32.dll"; + public delegate IntPtr WndProc(IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam); + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public class NOTIFYICONDATA { @@ -40,6 +42,21 @@ namespace HandyControl.Tools public int dwInfoFlags; } + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] + public class WNDCLASS_D + { + public int style; + public WndProc lpfnWndProc; + public int cbClsExtra = 0; + public int cbWndExtra = 0; + public IntPtr hInstance = IntPtr.Zero; + public IntPtr hIcon = IntPtr.Zero; + public IntPtr hCursor = IntPtr.Zero; + public IntPtr hbrBackground = IntPtr.Zero; + public string lpszMenuName = null; + public string lpszClassName = null; + } + [DllImport(Shell32, CharSet = CharSet.Auto)] [ResourceExposure(ResourceScope.None)] public static extern int Shell_NotifyIcon(int message, NOTIFYICONDATA pnid); diff --git a/HandyControlDemo/HandyControlDemo.csproj b/HandyControlDemo/HandyControlDemo.csproj index 9c659dd1..4231f0f6 100644 --- a/HandyControlDemo/HandyControlDemo.csproj +++ b/HandyControlDemo/HandyControlDemo.csproj @@ -189,6 +189,7 @@ NotifyIconDemoCtl.xaml + GravatarDemoCtl.xaml