[Refs #87: Static Analysis] Fix P/Invoke - C# point varies on x86/x64

This commit is contained in:
baldurk
2014-10-05 19:01:28 +01:00
parent f198e71806
commit 09863d920b
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ namespace renderdocui.Code
// for redirecting mousewheel
[DllImport("user32.dll")]
public static extern IntPtr WindowFromPoint(System.Drawing.Point pt);
public static extern IntPtr WindowFromPoint(int xPoint, int yPoint);
[DllImport("user32.dll")]
public static extern IntPtr SendMessage(IntPtr wnd, int msg, IntPtr wp, IntPtr lp);
+1 -1
View File
@@ -51,7 +51,7 @@ namespace renderdocui.Windows
short x = (short)((pos >> 0) & 0xffff);
short y = (short)((pos >> 16) & 0xffff);
IntPtr wnd = Win32PInvoke.WindowFromPoint(new Point(x, y));
IntPtr wnd = Win32PInvoke.WindowFromPoint((int)x, (int)y);
if (wnd != IntPtr.Zero && wnd != m.HWnd && Control.FromHandle(wnd) != null)
{