2 writes to dc
System.Drawing (2)
commonui\System\Drawing\Printing\DefaultPrintController.cs (2)
60
dc
= document.PrinterSettings.CreateDeviceContext(modeHandle);
197
dc
= null;
28 references to dc
System.Drawing (28)
commonui\System\Drawing\Printing\DefaultPrintController.cs (28)
50
Debug.Assert(
dc
== null && graphics == null, "PrintController methods called in the wrong order?");
70
int result = SafeNativeMethods.StartDoc(new HandleRef(this.
dc
,
dc
.Hdc), info);
91
Debug.Assert(
dc
!= null && graphics == null, "PrintController methods called in the wrong order?");
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));
152
Debug.Assert(
dc
!= null && graphics != null, "PrintController methods called in the wrong order?");
160
int result = SafeNativeMethods.EndPage(new HandleRef(this.
dc
,
dc
.Hdc));
181
Debug.Assert(
dc
!= null && graphics == null, "PrintController methods called in the wrong order?");
189
if (
dc
!= null) {
191
int result = (e.Cancel) ? SafeNativeMethods.AbortDoc(new HandleRef(
dc
,
dc
.Hdc)) : SafeNativeMethods.EndDoc(new HandleRef(
dc
,
dc
.Hdc));
196
dc
.Dispose();