mirror of
https://github.com/greenshot/greenshot
synced 2025-08-21 14:03:23 -07:00
Changes for Thomas & fixed undo/redo for background changes
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1647 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
a7b082d6ba
commit
46758d238c
8 changed files with 164 additions and 31 deletions
|
@ -20,6 +20,8 @@
|
|||
*/
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Microsoft.Win32;
|
||||
using System.Drawing;
|
||||
|
||||
namespace GreenshotPlugin.UnmanagedHelpers {
|
||||
|
||||
|
@ -107,6 +109,9 @@ namespace GreenshotPlugin.UnmanagedHelpers {
|
|||
[DllImport("dwmapi", SetLastError = true)]
|
||||
public static extern int DwmEnableBlurBehindWindow(IntPtr hwnd, ref DWM_BLURBEHIND blurBehind);
|
||||
|
||||
// Key to ColorizationColor for DWM
|
||||
private const string COLORIZATION_COLOR_KEY = @"SOFTWARE\Microsoft\Windows\DWM";
|
||||
|
||||
/// <summary>
|
||||
/// Helper method for an easy DWM check
|
||||
/// </summary>
|
||||
|
@ -119,5 +124,19 @@ namespace GreenshotPlugin.UnmanagedHelpers {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static Color ColorizationColor {
|
||||
get {
|
||||
using (RegistryKey key = Registry.CurrentUser.OpenSubKey(COLORIZATION_COLOR_KEY, false)) {
|
||||
if (key != null) {
|
||||
object dwordValue = key.GetValue("ColorizationColor");
|
||||
if (dwordValue != null) {
|
||||
return Color.FromArgb((Int32)dwordValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
return Color.White;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue