/// <summary>
/// Rectangle
/// </summary>
[StructLayout(LayoutKind.Explicit)]
public struct Rect
{
[FieldOffset(0)]
public int Left;
[FieldOffset(4)]
public int Top;
[FieldOffset(8)]
public int Right;
[FieldOffset(12)]
public int Bottom;
}
/// <summary>
/// 해당 Rectangle영역의 색상을 반전
/// </summary>
/// <param name="hdc"></param>
/// <param name="lpRect"></param>
/// <returns></returns>
[DllImport("user32")]
public static extern bool InvertRect(IntPtr hdc, ref Rect lpRect);
'개발일기 > C#' 카테고리의 다른 글
Win32 API를 쓸때 유용한 페이지 (0) | 2016.02.23 |
---|---|
폰트 크기에서 폰트 높이로 단위 변환 (0) | 2016.02.19 |
Control 기본 이벤트 지정. (0) | 2016.01.12 |
[C#] Excel에서 RowsCount, ColumnsCount 구하기 (0) | 2014.07.08 |
[C#] 비동기 프로그래스바. (0) | 2014.05.30 |