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
This commit is contained in:
RKrom 2013-01-08 11:27:20 +00:00
parent 8a3fd911bf
commit a99a5d1ffd

View file

@ -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;