From 193eb7d6d9edfd354ead9195c369f1a8cd94d894 Mon Sep 17 00:00:00 2001 From: RKrom Date: Tue, 4 Nov 2014 21:58:40 +0100 Subject: [PATCH] Fix overflow exception [skip ci] --- GreenshotPlugin/Core/WindowsHelper.cs | 2 +- GreenshotPlugin/UnmanagedHelpers/Enumerations.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/GreenshotPlugin/Core/WindowsHelper.cs b/GreenshotPlugin/Core/WindowsHelper.cs index a8569adab..488063fa4 100644 --- a/GreenshotPlugin/Core/WindowsHelper.cs +++ b/GreenshotPlugin/Core/WindowsHelper.cs @@ -865,7 +865,7 @@ namespace GreenshotPlugin.Core { return (WindowStyleFlags)User32.GetWindowLongWrapper(hWnd, (int)WindowLongIndex.GWL_STYLE); } set { - User32.SetWindowLongWrapper(hWnd, (int)WindowLongIndex.GWL_STYLE, new IntPtr((uint)value)); + User32.SetWindowLongWrapper(hWnd, (int)WindowLongIndex.GWL_STYLE, new IntPtr((long)value)); } } diff --git a/GreenshotPlugin/UnmanagedHelpers/Enumerations.cs b/GreenshotPlugin/UnmanagedHelpers/Enumerations.cs index 267b56032..edd85a168 100644 --- a/GreenshotPlugin/UnmanagedHelpers/Enumerations.cs +++ b/GreenshotPlugin/UnmanagedHelpers/Enumerations.cs @@ -25,7 +25,7 @@ namespace GreenshotPlugin.UnmanagedHelpers { /// Window Style Flags /// [Flags] - public enum WindowStyleFlags : uint { + public enum WindowStyleFlags : long { //WS_OVERLAPPED = 0x00000000, WS_POPUP = 0x80000000, WS_CHILD = 0x40000000,