■ DwmGetWindowAttribute API 함수를 선언하는 방법을 보여준다.
▶ 예제 코드 (C#)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
using System; using System.Runtime.InteropServices; #region DWM 윈도우 어트리뷰트 구하기 - DwmGetWindowAttribute(windowHandle, attribute, value, valueSize) /// <summary> /// DWM 윈도우 어트리뷰트 구하기 /// </summary> /// <param name="windowHandle">윈도우 핸들</param> /// <param name="attribute">어트리뷰트</param> /// <param name="value">값</param> /// <param name="valueSize">값 크기</param> /// <returns>처리 결과</returns> [DllImport("dwmapi")] private static extern int DwmGetWindowAttribute(IntPtr windowHandle, DWMWINDOWATTRIBUTE attribute, out bool value, int valueSize); #endregion /// <summary> /// DWM 윈도우 어트리뷰트 /// </summary> public enum DWMWINDOWATTRIBUTE : uint { /// <summary> /// NCRenderingEnabled /// </summary> NCRenderingEnabled = 1, /// <summary> /// NCRenderingPolicy /// </summary> NCRenderingPolicy, /// <summary> /// TransitionsForceDisabled /// </summary> TransitionsForceDisabled, /// <summary> /// AllowNCPaint /// </summary> AllowNCPaint, /// <summary> /// CaptionButtonBounds /// </summary> CaptionButtonBounds, /// <summary> /// NonClientRtlLayout /// </summary> NonClientRtlLayout, /// <summary> /// ForceIconicRepresentation /// </summary> ForceIconicRepresentation, /// <summary> /// Flip3DPolicy /// </summary> Flip3DPolicy, /// <summary> /// ExtendedFrameBounds /// </summary> ExtendedFrameBounds, /// <summary> /// HasIconicBitmap /// </summary> HasIconicBitmap, /// <summary> /// DisallowPeek /// </summary> DisallowPeek, /// <summary> /// ExcludedFromPeek /// </summary> ExcludedFromPeek, /// <summary> /// Cloak /// </summary> Cloak, /// <summary> /// Cloaked /// </summary> Cloaked, /// <summary> /// FreezeRepresentation /// </summary> FreezeRepresentation } |