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