BeginPaintScope struct BeginPaintScope Helper to scope lifetime of an HDC retrieved via BeginPaint Documentation Code public HDC HDC { get; } public HWND HWND { get; } public Rectangle PaintRectangle { get; } public BeginPaintScope(HWND hwnd) public static HDC op_Implicit(ref BeginPaintScope scope) public void Dispose()