5 implementations of GetHdc
System.Drawing.Common (1)
Special\NotSupported.cs (1)
629public System.IntPtr GetHdc() { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
System.Windows.Forms (2)
System\Windows\Forms\Rendering\DrawItemEventArgs.cs (1)
161IntPtr IDeviceContext.GetHdc() => Graphics?.GetHdc() ?? IntPtr.Zero;
System\Windows\Forms\Rendering\PaintEventArgs.cs (1)
134IntPtr IDeviceContext.GetHdc() => Graphics?.GetHdc() ?? IntPtr.Zero;
System.Windows.Forms.Primitives.TestUtilities (1)
HdcDeviceContextAdapter.cs (1)
18public IntPtr GetHdc() => (IntPtr)_hdc;
System.Windows.Forms.Tests (1)
System\Windows\Forms\TextRendererTests.cs (1)
663public IntPtr GetHdc() => IntPtr.Zero;
24 references to GetHdc
System.Windows.Forms (2)
System\Windows\Forms\Rendering\DrawItemEventArgs.cs (1)
162HDC IHdcContext.GetHdc() => (HDC)((IDeviceContext)this).GetHdc();
System\Windows\Forms\Rendering\PaintEventArgs.cs (1)
135HDC IHdcContext.GetHdc() => (HDC)((IDeviceContext)this).GetHdc();
System.Windows.Forms.Primitives (1)
System\Windows\Forms\DeviceContextExtensions.IDeviceContextAdapter.cs (1)
14public HDC GetHdc() => (HDC)_deviceContext.GetHdc();
System.Windows.Forms.Tests (21)
System\Windows\Forms\TextRendererTests.cs (21)
315.Setup(c => c.GetHdc()) 324mockDeviceContext.Verify(c => c.GetHdc(), Times.Once()); 328mockDeviceContext.Verify(c => c.GetHdc(), Times.Exactly(2)); 332mockDeviceContext.Verify(c => c.GetHdc(), Times.Exactly(3)); 336mockDeviceContext.Verify(c => c.GetHdc(), Times.Exactly(4)); 340mockDeviceContext.Verify(c => c.GetHdc(), Times.Exactly(5)); 344mockDeviceContext.Verify(c => c.GetHdc(), Times.Exactly(6)); 348mockDeviceContext.Verify(c => c.GetHdc(), Times.Exactly(7)); 352mockDeviceContext.Verify(c => c.GetHdc(), Times.Exactly(8)); 356mockDeviceContext.Verify(c => c.GetHdc(), Times.Exactly(9)); 360mockDeviceContext.Verify(c => c.GetHdc(), Times.Exactly(10)); 364mockDeviceContext.Verify(c => c.GetHdc(), Times.Exactly(11)); 368mockDeviceContext.Verify(c => c.GetHdc(), Times.Exactly(12)); 372mockDeviceContext.Verify(c => c.GetHdc(), Times.Exactly(13)); 376mockDeviceContext.Verify(c => c.GetHdc(), Times.Exactly(14)); 380mockDeviceContext.Verify(c => c.GetHdc(), Times.Exactly(15)); 384mockDeviceContext.Verify(c => c.GetHdc(), Times.Exactly(16)); 540.Setup(c => c.GetHdc()) 549mockDeviceContext.Verify(c => c.GetHdc(), Times.Once()); 553mockDeviceContext.Verify(c => c.GetHdc(), Times.Exactly(2)); 557mockDeviceContext.Verify(c => c.GetHdc(), Times.Exactly(3));