mirror of
https://github.com/greenshot/greenshot
synced 2025-07-13 16:43:54 -07:00
Fixed a interop call signature error, which might cause issues on 64 bit. (these have not be seen!)
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2552 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
28346d2eab
commit
c8b1481a18
2 changed files with 9 additions and 9 deletions
|
@ -331,19 +331,19 @@ namespace GreenshotPlugin.Core {
|
|||
/// <param name="hwnd"></param>
|
||||
/// <returns></returns>
|
||||
private static Icon GetAppIcon(IntPtr hwnd) {
|
||||
const int ICON_SMALL = 0;
|
||||
const int ICON_BIG = 1;
|
||||
const int ICON_SMALL2 = 2;
|
||||
IntPtr ICON_SMALL = IntPtr.Zero;
|
||||
IntPtr ICON_BIG = new IntPtr(1);
|
||||
IntPtr ICON_SMALL2 = new IntPtr(2);
|
||||
|
||||
IntPtr iconHandle = User32.SendMessage(hwnd, (int)WindowsMessages.WM_GETICON, ICON_SMALL2, 0);
|
||||
IntPtr iconHandle = User32.SendMessage(hwnd, (int)WindowsMessages.WM_GETICON, ICON_SMALL2, IntPtr.Zero);
|
||||
if (iconHandle == IntPtr.Zero) {
|
||||
iconHandle = User32.SendMessage(hwnd, (int)WindowsMessages.WM_GETICON, ICON_SMALL, 0);
|
||||
iconHandle = User32.SendMessage(hwnd, (int)WindowsMessages.WM_GETICON, ICON_SMALL, IntPtr.Zero);
|
||||
}
|
||||
if (iconHandle == IntPtr.Zero) {
|
||||
iconHandle = User32.GetClassLongWrapper(hwnd, (int)ClassLongIndex.GCL_HICONSM);
|
||||
}
|
||||
if (iconHandle == IntPtr.Zero) {
|
||||
iconHandle = User32.SendMessage(hwnd, (int)WindowsMessages.WM_GETICON, ICON_BIG, 0);
|
||||
iconHandle = User32.SendMessage(hwnd, (int)WindowsMessages.WM_GETICON, ICON_BIG, IntPtr.Zero);
|
||||
}
|
||||
if (iconHandle == IntPtr.Zero) {
|
||||
iconHandle = User32.GetClassLongWrapper(hwnd, (int)ClassLongIndex.GCL_HICON);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue