Revert of the change to the DWMWINDOWATTRIBUTE, as the enum values were not fixed we lost some functionality. Also fixed some potential issues with the ThumbnailForm, and aligned a bit of code with Dapplo.Window [skip ci]

This commit is contained in:
Robin Krom 2021-03-26 22:30:28 +01:00
commit b22d982f36
No known key found for this signature in database
GPG key ID: BCC01364F1371490
7 changed files with 174 additions and 102 deletions

View file

@ -23,6 +23,7 @@ using System;
using System.Drawing;
using System.Runtime.InteropServices;
using GreenshotPlugin.Core;
using GreenshotPlugin.Core.Enums;
using GreenshotPlugin.UnmanagedHelpers.Enums;
using GreenshotPlugin.UnmanagedHelpers.Structs;
using Microsoft.Win32;
@ -40,9 +41,9 @@ namespace GreenshotPlugin.UnmanagedHelpers {
[DllImport("dwmapi", SetLastError = true)]
public static extern int DwmUnregisterThumbnail(IntPtr thumb);
[DllImport("dwmapi", SetLastError = true)]
public static extern int DwmQueryThumbnailSourceSize(IntPtr thumb, out SIZE size);
public static extern HResult DwmQueryThumbnailSourceSize(IntPtr thumb, out SIZE size);
[DllImport("dwmapi", SetLastError = true)]
public static extern int DwmUpdateThumbnailProperties(IntPtr hThumb, ref DWM_THUMBNAIL_PROPERTIES props);
public static extern HResult DwmUpdateThumbnailProperties(IntPtr hThumb, ref DWM_THUMBNAIL_PROPERTIES props);
// Deprecated as of Windows 8 Release Preview
[DllImport("dwmapi", SetLastError = true)]