mirror of
https://github.com/greenshot/greenshot
synced 2025-08-19 13:10:00 -07:00
Added DwmEnableComposition for testing
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2286 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
9ca5f0d3bd
commit
fa02394047
1 changed files with 19 additions and 11 deletions
|
@ -93,6 +93,9 @@ namespace GreenshotPlugin.UnmanagedHelpers {
|
||||||
/// Description of DWM.
|
/// Description of DWM.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class DWM {
|
public class DWM {
|
||||||
|
public static readonly uint DWM_EC_DISABLECOMPOSITION = 0;
|
||||||
|
public static readonly uint DWM_EC_ENABLECOMPOSITION = 1;
|
||||||
|
|
||||||
// DWM
|
// DWM
|
||||||
[DllImport("dwmapi", SetLastError = true)]
|
[DllImport("dwmapi", SetLastError = true)]
|
||||||
public static extern int DwmRegisterThumbnail(IntPtr dest, IntPtr src, out IntPtr thumb);
|
public static extern int DwmRegisterThumbnail(IntPtr dest, IntPtr src, out IntPtr thumb);
|
||||||
|
@ -110,10 +113,15 @@ namespace GreenshotPlugin.UnmanagedHelpers {
|
||||||
public static extern int DwmGetWindowAttribute(IntPtr hwnd, int dwAttribute, out RECT lpRect, int size);
|
public static extern int DwmGetWindowAttribute(IntPtr hwnd, int dwAttribute, out RECT lpRect, int size);
|
||||||
[DllImport("dwmapi", SetLastError = true)]
|
[DllImport("dwmapi", SetLastError = true)]
|
||||||
public static extern int DwmEnableBlurBehindWindow(IntPtr hwnd, ref DWM_BLURBEHIND blurBehind);
|
public static extern int DwmEnableBlurBehindWindow(IntPtr hwnd, ref DWM_BLURBEHIND blurBehind);
|
||||||
|
[DllImport("dwmapi", SetLastError = true)]
|
||||||
|
public static extern uint DwmEnableComposition(uint uCompositionAction);
|
||||||
|
|
||||||
// Windows 8, e.g.:
|
public static void EnableComposition() {
|
||||||
//[DllImport("dwmapi", SetLastError = true)]
|
DWM.DwmEnableComposition(DWM.DWM_EC_ENABLECOMPOSITION);
|
||||||
//public static extern DWMAPI DwmShowContact(DWORD dwPointerID, DWM_SHOWCONTACT eShowContact);
|
}
|
||||||
|
public static void DisableComposition() {
|
||||||
|
DWM.DwmEnableComposition(DWM.DWM_EC_DISABLECOMPOSITION);
|
||||||
|
}
|
||||||
|
|
||||||
// Key to ColorizationColor for DWM
|
// Key to ColorizationColor for DWM
|
||||||
private const string COLORIZATION_COLOR_KEY = @"SOFTWARE\Microsoft\Windows\DWM";
|
private const string COLORIZATION_COLOR_KEY = @"SOFTWARE\Microsoft\Windows\DWM";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue