6 writes to hDC
System.Drawing (6)
misc\GDI\DeviceContext.cs (6)
153
this.
hDC
= ((IDeviceContext)this).GetHdc(); // this.hDC will be released on call to Dispose.
249
this.
hDC
= hDC;
388
this.
hDC
= IntPtr.Zero;
400
this.
hDC
= IntPtr.Zero;
437
this.
hDC
= IntUnsafeNativeMethods.GetDC(new HandleRef(this, this.hWnd));
464
this.
hDC
= IntPtr.Zero;
16 references to hDC
System.Drawing (16)
misc\GDI\DeviceContext.cs (16)
145
if( this.
hDC
== IntPtr.Zero )
164
Debug.Assert( this.
hDC
!= IntPtr.Zero, "Attempt to use deleted HDC - DC type: " + this.dcType );
166
return this.
hDC
;
180
Debug.Assert(this.
hDC
!= IntPtr.Zero, "Cannot get initial state without a valid HDC");
181
hCurrentPen = hInitialPen = IntUnsafeNativeMethods.GetCurrentObject(new HandleRef(this,
hDC
), IntNativeMethods.OBJ_PEN);
182
hCurrentBrush = hInitialBrush = IntUnsafeNativeMethods.GetCurrentObject(new HandleRef(this,
hDC
), IntNativeMethods.OBJ_BRUSH);
183
hCurrentBmp = hInitialBmp = IntUnsafeNativeMethods.GetCurrentObject(new HandleRef(this,
hDC
), IntNativeMethods.OBJ_BITMAP);
184
hCurrentFont = hInitialFont = IntUnsafeNativeMethods.GetCurrentObject(new HandleRef(this,
hDC
), IntNativeMethods.OBJ_FONT);
257
this.hWnd = IntUnsafeNativeMethods.WindowFromDC( new HandleRef( this, this.
hDC
) );
386
IntUnsafeNativeMethods.DeleteHDC(new HandleRef(this, this.
hDC
));
398
IntUnsafeNativeMethods.DeleteDC(new HandleRef(this, this.
hDC
));
431
if (this.
hDC
== IntPtr.Zero)
443
return this.
hDC
;
454
if (this.
hDC
!= IntPtr.Zero && this.dcType == DeviceContextType.Display)
459
IntUnsafeNativeMethods.ReleaseDC(new HandleRef(this, this.hWnd), new HandleRef(this, this.
hDC
));
516
IntUnsafeNativeMethods.RestoreDC(new HandleRef(this, this.
hDC
), -1);