17 instantiations of CreateDcScope
System.Drawing.Common (2)
System\Drawing\Printing\PrinterSettings.cs (2)
459CreateDcScope hdc = new(DriverName, PrinterNameInternal, devmode, informationOnly: false); 485CreateDcScope dc = new(DriverName, PrinterNameInternal, (DEVMODEW*)modePointer, informationOnly: true);
System.Private.Windows.Core (2)
Windows\Win32\Graphics\Gdi\HBITMAP.cs (2)
24using CreateDcScope sourceDC = new(screenDC); 28using CreateDcScope destinationDC = new(screenDC);
System.Windows.Forms (7)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (1)
1705using CreateDcScope compatibleDC = new(default);
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (1)
577using CreateDcScope hdc = new("DISPLAY");
System\Windows\Forms\Layout\Containers\ContainerControl.cs (1)
707using CreateDcScope dc = new(default);
System\Windows\Forms\Rendering\ControlPaint.cs (4)
153using CreateDcScope screen = new(default); 154using CreateDcScope dc = new(screen); 308using CreateDcScope sourceDC = new(screenDC); 309using CreateDcScope targetDC = new(screenDC);
System.Windows.Forms.Primitives.Tests (5)
System\Windows\Forms\DeviceContextScopeTests.cs (2)
19using CreateDcScope dcScope = new(default); 59using CreateDcScope dcScope = new(default);
Windows\Win32\RegionTests.cs (3)
14using CreateDcScope hdc = new(HDC.Null); 34using CreateDcScope hdc = new(HDC.Null); 48using CreateDcScope hdc = new(HDC.Null);
System.Windows.Forms.Tests (1)
System\Windows\Forms\TextRendererTests.cs (1)
751using var hdc = new CreateDcScope(default);
36 references to CreateDcScope
System.Drawing.Common (14)
System\Drawing\Printing\PageSettings.cs (3)
68using var hdc = _printerSettings.CreateDeviceContext(this); 83using var hdc = _printerSettings.CreateDeviceContext(this); 153using var hdc = _printerSettings.CreateInformationContext(this);
System\Drawing\Printing\PrinterSettings.cs (10)
337using var hdc = CreateInformationContext(DefaultPageSettings); 379using var hdc = CreateInformationContext(DefaultPageSettings); 440internal CreateDcScope CreateDeviceContext(PageSettings pageSettings) 456internal CreateDcScope CreateDeviceContext(HGLOBAL hdevmode) 459CreateDcScope hdc = new(DriverName, PrinterNameInternal, devmode, informationOnly: false); 465internal CreateDcScope CreateInformationContext(PageSettings pageSettings) 482internal unsafe CreateDcScope CreateInformationContext(HGLOBAL hdevmode) 485CreateDcScope dc = new(DriverName, PrinterNameInternal, (DEVMODEW*)modePointer, informationOnly: true); 508var hdc = CreateDeviceContext(pageSettings); 589using var hdc = CreateInformationContext(DefaultPageSettings);
System\Drawing\Printing\PrintPreviewGraphics.cs (1)
31using var hdc = _printPageEventArgs.PageSettings.PrinterSettings.CreateDeviceContext(hdevmode);
System.Private.Windows.Core (8)
Windows\Win32\Graphics\Gdi\CreateDcScope.cs (4)
52public static implicit operator HDC(in CreateDcScope scope) => scope.HDC; 53public static unsafe implicit operator HGDIOBJ(in CreateDcScope scope) => (HGDIOBJ)(scope.HDC.Value); 54public static implicit operator nint(in CreateDcScope scope) => scope.HDC; 55public static explicit operator WPARAM(in CreateDcScope scope) => (WPARAM)(nuint)(nint)scope.HDC;
Windows\Win32\Graphics\Gdi\HBITMAP.cs (2)
24using CreateDcScope sourceDC = new(screenDC); 28using CreateDcScope destinationDC = new(screenDC);
Windows\Win32\Graphics\Gdi\HdcHandle.cs (2)
13/// Take ownership from a <see cref="CreateDcScope"/>. 15public HdcHandle(CreateDcScope hdc)
System.Windows.Forms (7)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (1)
1705using CreateDcScope compatibleDC = new(default);
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (1)
577using CreateDcScope hdc = new("DISPLAY");
System\Windows\Forms\Layout\Containers\ContainerControl.cs (1)
707using CreateDcScope dc = new(default);
System\Windows\Forms\Rendering\ControlPaint.cs (4)
153using CreateDcScope screen = new(default); 154using CreateDcScope dc = new(screen); 308using CreateDcScope sourceDC = new(screenDC); 309using CreateDcScope targetDC = new(screenDC);
System.Windows.Forms.Primitives (1)
System\Windows\Forms\DeviceContextExtensions.cs (1)
124internal static Graphics CreateGraphics(this CreateDcScope hdc) => Graphics.FromHdcInternal(hdc.HDC);
System.Windows.Forms.Primitives.Tests (5)
System\Windows\Forms\DeviceContextScopeTests.cs (2)
19using CreateDcScope dcScope = new(default); 59using CreateDcScope dcScope = new(default);
Windows\Win32\RegionTests.cs (3)
14using CreateDcScope hdc = new(HDC.Null); 34using CreateDcScope hdc = new(HDC.Null); 48using CreateDcScope hdc = new(HDC.Null);
System.Windows.Forms.Tests (1)
System\Windows\Forms\TextRendererTests.cs (1)
751using var hdc = new CreateDcScope(default);