From 70b696aaff9367b9f9001b19d0db9e63725a1abe Mon Sep 17 00:00:00 2001 From: Philipp Sumi Date: Sat, 16 Nov 2013 17:50:03 +0000 Subject: [PATCH] git-svn-id: https://svn.evolvesoftware.ch/repos/evolve.net/WPF/NotifyIcon@170 9f600761-6f11-4665-b6dc-0185e9171623 --- Source/NotifyIconWpf/Interop/NotifyIconData.cs | 3 +-- Source/NotifyIconWpf/Interop/WindowMessageSink.cs | 5 +++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Source/NotifyIconWpf/Interop/NotifyIconData.cs b/Source/NotifyIconWpf/Interop/NotifyIconData.cs index 78cc5a6..81cf0a6 100644 --- a/Source/NotifyIconWpf/Interop/NotifyIconData.cs +++ b/Source/NotifyIconWpf/Interop/NotifyIconData.cs @@ -1,5 +1,4 @@ using System; -using System.Drawing; using System.Runtime.InteropServices; namespace Hardcodet.Wpf.TaskbarNotification.Interop @@ -48,7 +47,7 @@ namespace Hardcodet.Wpf.TaskbarNotification.Interop /// /// A handle to the icon that should be displayed. Just - /// . + /// Icon.Handle. /// public IntPtr IconHandle; diff --git a/Source/NotifyIconWpf/Interop/WindowMessageSink.cs b/Source/NotifyIconWpf/Interop/WindowMessageSink.cs index 3cf4ee2..3c696f9 100644 --- a/Source/NotifyIconWpf/Interop/WindowMessageSink.cs +++ b/Source/NotifyIconWpf/Interop/WindowMessageSink.cs @@ -26,6 +26,7 @@ using System; using System.ComponentModel; using System.Diagnostics; +using System.Runtime.InteropServices; namespace Hardcodet.Wpf.TaskbarNotification.Interop { @@ -190,7 +191,11 @@ namespace Hardcodet.Wpf.TaskbarNotification.Interop if (MessageWindowHandle == IntPtr.Zero) { +#if SILVERLIGHT + throw new Exception("Message window handle was not a valid pointer."); +#else throw new Win32Exception(); +#endif } }