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