46 references to Hdc
System.Drawing (46)
commonui\System\Drawing\Graphics.cs (1)
921HandleRef screenDC = new HandleRef( null, dc.Hdc );
commonui\System\Drawing\Printing\DefaultPrintController.cs (12)
70int result = SafeNativeMethods.StartDoc(new HandleRef(this.dc, dc.Hdc), info); 104IntPtr result = SafeNativeMethods.ResetDC(new HandleRef(this.dc, dc.Hdc), new HandleRef(null, modePointer)); 105Debug.Assert(result == dc.Hdc, "ResetDC didn't return the same handle I gave it"); 118graphics = Graphics.FromHdcInternal( dc.Hdc ); 125int dpiX = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(this.dc, dc.Hdc), SafeNativeMethods.LOGPIXELSX); 126int dpiY = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(this.dc, dc.Hdc), SafeNativeMethods.LOGPIXELSY); 127int hardMarginX_DU = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(this.dc, dc.Hdc), SafeNativeMethods.PHYSICALOFFSETX); 128int hardMarginY_DU = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(this.dc, dc.Hdc), SafeNativeMethods.PHYSICALOFFSETY); 137int result2 = SafeNativeMethods.StartPage(new HandleRef(this.dc, dc.Hdc)); 160int result = SafeNativeMethods.EndPage(new HandleRef(this.dc, dc.Hdc)); 191int result = (e.Cancel) ? SafeNativeMethods.AbortDoc(new HandleRef(dc, dc.Hdc)) : SafeNativeMethods.EndDoc(new HandleRef(dc, dc.Hdc));
commonui\System\Drawing\Printing\PageSettings.cs (5)
113int dpiX = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.LOGPIXELSX); 114int hardMarginX_DU = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.PHYSICALOFFSETX); 143int dpiY = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.LOGPIXELSY); 144int hardMarginY_DU = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.PHYSICALOFFSETY); 239HandleRef hdc = new HandleRef(dc, dc.Hdc);
commonui\System\Drawing\Printing\PreviewPrintController.cs (5)
122Metafile metafile = new Metafile(dc.Hdc, new Rectangle(0,0, metafileSize.Width, metafileSize.Height), MetafileFrameUnit.GdiCompatible, EmfType.EmfPlusOnly); 134int dpiX = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.LOGPIXELSX); 135int dpiY = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.LOGPIXELSY); 136int hardMarginX_DU = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.PHYSICALOFFSETX); 137int hardMarginY_DU = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.PHYSICALOFFSETY);
commonui\System\Drawing\Printing\PrinterSettings.cs (4)
532HandleRef hdc = new HandleRef(dc, dc.Hdc); 575HandleRef hdc = new HandleRef(dc, dc.Hdc); 745Graphics g = Graphics.FromHdcInternal(dc.Hdc); 967result = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(dc, dc.Hdc), capability);
commonui\System\Drawing\Printing\PrintPreviewGraphics.cs (5)
50using( Graphics graphics = Graphics.FromHdcInternal(dc.Hdc) ) { 55int dpiX = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.LOGPIXELSX); 56int dpiY = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.LOGPIXELSY); 57int hardMarginX_DU = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.PHYSICALOFFSETX); 58int hardMarginY_DU = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.PHYSICALOFFSETY);
misc\GDI\DeviceContext.cs (12)
194IntPtr currentPen = IntUnsafeNativeMethods.SelectObject(new HandleRef(this, this.Hdc), new HandleRef( this, hInitialPen)); 202IntPtr currentBrush = IntUnsafeNativeMethods.SelectObject(new HandleRef(this, this.Hdc), new HandleRef( this, hInitialBrush)); 210IntPtr currentBmp = IntUnsafeNativeMethods.SelectObject(new HandleRef(this, this.Hdc), new HandleRef( this, hInitialBmp)); 479return (DeviceContextGraphicsMode) IntUnsafeNativeMethods.GetGraphicsMode( new HandleRef( this, this.Hdc ) ); 496return (DeviceContextGraphicsMode) IntUnsafeNativeMethods.SetGraphicsMode( new HandleRef( this, this.Hdc ), unchecked((int) newMode)); 567HandleRef hdc = new HandleRef( this, this.Hdc); 605HandleRef hdc = new HandleRef(this, this.Hdc); 626int result = IntUnsafeNativeMethods.GetClipRgn(new HandleRef( this, this.Hdc), new HandleRef(clip, clip.HRegion)); 649IntUnsafeNativeMethods.OffsetViewportOrgEx( new HandleRef( this, this.Hdc ), dx, dy, orgn ); 671return other.Hdc == this.Hdc; 681return this.Hdc.GetHashCode();
misc\GDI\WindowsGraphics.cs (2)
283this.graphics.ReleaseHdcInternal(this.dc.Hdc); 307return this.dc.Hdc;