From a99a5d1ffdb03e3d07262fdac0cfd8f454b0a0ea Mon Sep 17 00:00:00 2001 From: RKrom Date: Tue, 8 Jan 2013 11:27:20 +0000 Subject: [PATCH] Prefer small icons, so we don't have to resize them. git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2420 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4 --- GreenshotPlugin/Core/WindowsHelper.cs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/GreenshotPlugin/Core/WindowsHelper.cs b/GreenshotPlugin/Core/WindowsHelper.cs index 1c1aba5e1..7b94b174b 100644 --- a/GreenshotPlugin/Core/WindowsHelper.cs +++ b/GreenshotPlugin/Core/WindowsHelper.cs @@ -329,14 +329,18 @@ namespace GreenshotPlugin.Core { const int ICON_SMALL2 = 2; IntPtr iconHandle = User32.SendMessage(hwnd, (int)WindowsMessages.WM_GETICON, ICON_SMALL2, 0); - if (iconHandle == IntPtr.Zero) + if (iconHandle == IntPtr.Zero) { iconHandle = User32.SendMessage(hwnd, (int)WindowsMessages.WM_GETICON, ICON_SMALL, 0); - if (iconHandle == IntPtr.Zero) - iconHandle = User32.SendMessage(hwnd, (int)WindowsMessages.WM_GETICON, ICON_BIG, 0); - if (iconHandle == IntPtr.Zero) - iconHandle = User32.GetClassLongWrapper(hwnd, GCL_HICON); - if (iconHandle == IntPtr.Zero) + } + if (iconHandle == IntPtr.Zero) { iconHandle = User32.GetClassLongWrapper(hwnd, GCL_HICONSM); + } + if (iconHandle == IntPtr.Zero) { + iconHandle = User32.SendMessage(hwnd, (int)WindowsMessages.WM_GETICON, ICON_BIG, 0); + } + if (iconHandle == IntPtr.Zero) { + iconHandle = User32.GetClassLongWrapper(hwnd, GCL_HICON); + } if (iconHandle == IntPtr.Zero) return null;