Fixed a potential issue with GetWindowLong, using a wrapper which decides upon the IntPtr size which call needs to be made.

Fixed the corner cut to work with a CreateRoundRectRgn, but made if it cuts configurable so people can turn it off.
Added a CountColor method to ImageHelper.cs, which should be used to check if PrintWindow functions properly.

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2236 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2012-11-05 14:18:13 +00:00
commit 197d46c9b9
5 changed files with 71 additions and 68 deletions

View file

@ -45,6 +45,8 @@ namespace GreenshotPlugin.UnmanagedHelpers {
public static extern int GetClipBox(IntPtr hdc, out RECT lprc);
[DllImport("gdi32", SetLastError = true)]
public static extern uint GetPixel(IntPtr hdc, int nXPos, int nYPos);
[DllImport("gdi32")]
public static extern IntPtr CreateRoundRectRgn(int x1, int y1, int x2, int y2, int cx, int cy);
}
[StructLayout(LayoutKind.Sequential, Pack = 2)]