8 instantiations of HDC
System.Private.Windows.Core (3)
Windows.Win32.HDC.g.cs (3)
41 public static explicit operator HDC(void* value) => new HDC(value); 57 public static explicit operator HDC(IntPtr value) => new HDC((void*)value.ToPointer()); 59 public static explicit operator HDC(UIntPtr value) => new HDC((void*)value.ToPointer());
System.Windows.Forms.Primitives.Tests (4)
System\Windows\Forms\DeviceContextHdcScopeTests.cs (1)
251HDC mockHdc = new(1234);
System\Windows\Forms\Internals\ArgumentValidationTests.cs (3)
91HDC param = new(IntPtr.Zero); 99HDC param = new(new IntPtr(24)); 106HDC param = new(IntPtr.Zero);
System.Windows.Forms.Tests (1)
System\Windows\Forms\CheckBoxBaseAdapterTests.cs (1)
247new HDC(hdcPtr),
667 references to HDC
System.Drawing.Common (68)
System\Drawing\BufferedGraphics.cs (2)
92(HDC)refTargetDC.Handle, 97(HDC)sourceDC,
System\Drawing\BufferedGraphicsContext.cs (13)
19private HDC _compatDC; 77return AllocBufferInTempManager(targetGraphics, HDC.Null, targetRectangle); 80return AllocBuffer(targetGraphics, HDC.Null, targetRectangle); 90return AllocBufferInTempManager(null, (HDC)targetDC, targetRectangle); 93return AllocBuffer(null, (HDC)targetDC, targetRectangle); 99private BufferedGraphics AllocBuffer(Graphics? targetGraphics, HDC targetDC, Rectangle targetRectangle) 121surface = CreateBuffer((HDC)destDc, targetRectangle.Width, targetRectangle.Height); 148private static BufferedGraphics AllocBufferInTempManager(Graphics? targetGraphics, HDC targetDC, Rectangle targetRectangle) 203private bool FillBitmapInfo(HDC hdc, HPALETTE hpalette, BITMAPINFO* bitmapInfo) 260private bool FillColorTable(HDC hdc, HPALETTE hpalette, BITMAPINFO* bitmapInfo) 304private Graphics CreateBuffer(HDC src, int width, int height) 352private HBITMAP CreateCompatibleDIB(HDC hdc, HPALETTE hpalette, int ulWidth, int ulHeight) 433_compatDC = HDC.Null;
System\Drawing\Font.cs (2)
590status = PInvokeGdiPlus.GdipCreateFontFromLogfont((HDC)hdc, (LOGFONTW*)lf, &font); 657Status status = PInvokeGdiPlus.GdipCreateFontFromDC((HDC)hdc, &font);
System\Drawing\Graphics.cs (14)
46private HDC _nativeHdc; 91Gdip.CheckStatus(PInvokeGdiPlus.GdipCreateFromHDC((HDC)hdc, &nativeGraphics)); 102Gdip.CheckStatus(PInvokeGdiPlus.GdipCreateFromHDC2((HDC)hdc, (HANDLE)hdevice, &nativeGraphics)); 145CheckStatus(!Gdip.Initialized ? Status.Ok : PInvokeGdiPlus.GdipReleaseDC(NativeGraphics, (HDC)hdc)); 146_nativeHdc = HDC.Null; 488HDC IHdcContext.GetHdc() => (HDC)GetHdc(); 492HDC hdc; 2743HDC targetDC = (HDC)GetHdc(); 3287(HDC hdc, int saveState) IGraphicsContextInfo.GetHdc(ApplyGraphicsProperties apply, bool alwaysSaveState) 3293HDC hdc = HDC.Null; 3314hdc = (HDC)GetHdc();
System\Drawing\Icon.cs (1)
272private void DrawIcon(HDC hdc, Rectangle imageRect, Rectangle targetRect, bool stretch)
System\Drawing\Imaging\Metafile.cs (9)
127(HDC)referenceHdc, 223(HDC)referenceHdc, 361(HDC)referenceHdc, 385(HDC)referenceHdc, 410(HDC)referenceHdc, 436(HDC)referenceHdc, 460(HDC)referenceHdc, 485(HDC)referenceHdc, 510(HDC)referenceHdc,
System\Drawing\Printing\DefaultPrintController.cs (5)
12public unsafe class StandardPrintController : PrintController, IHandle<HDC> 17HDC IHandle<HDC>.Handle => _hdc?.Handle ?? HDC.Null; 81HDC result = PInvoke.ResetDCW(_hdc, devmode);
System\Drawing\Printing\PreviewPrintController.cs (2)
58HDC hdc = _hdc ?? HDC.Null;
System\Drawing\Printing\PrinterSettings.cs (1)
341private static bool IsDirectPrintingSupported(HDC hdc, ImageFormat imageFormat, out int escapeFunction)
Windows.Win32.PInvoke.GDI32.dll.g.cs (9)
38 internal static extern int AbortDoc(winmdroot.Graphics.Gdi.HDC hdc); 71 internal static extern int EndDoc(winmdroot.Graphics.Gdi.HDC hdc); 84 internal static extern int EndPage(winmdroot.Graphics.Gdi.HDC hdc); 106 internal static extern int ExtEscape(winmdroot.Graphics.Gdi.HDC hdc, int iEscape, int cjInput, winmdroot.Foundation.PCSTR lpInData, int cjOutput, winmdroot.Foundation.PSTR lpOutData); 127 internal static extern unsafe int GetDIBits(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Graphics.Gdi.HBITMAP hbm, uint start, uint cLines, [Optional] void* lpvBits, winmdroot.Graphics.Gdi.BITMAPINFO* lpbmi, winmdroot.Graphics.Gdi.DIB_USAGE usage); 142 internal static extern unsafe winmdroot.Graphics.Gdi.HDC ResetDCW(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Graphics.Gdi.DEVMODEW* lpdm); 156 internal static extern unsafe int StartDoc(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Storage.Xps.DOCINFOW* lpdi); 169 internal static extern int StartPage(winmdroot.Graphics.Gdi.HDC hdc);
Windows\Win32\PInvoke.AbortDoc.cs (2)
8/// <inheritdoc cref="AbortDoc(HDC)"/> 9internal static unsafe int AbortDoc<T>(T hdc) where T : IHandle<HDC>
Windows\Win32\PInvoke.EndDoc.cs (2)
8/// <inheritdoc cref="EndDoc(HDC)"/> 9internal static unsafe int EndDoc<T>(T hdc) where T : IHandle<HDC>
Windows\Win32\PInvoke.EndPage.cs (2)
8/// <inheritdoc cref="EndPage(HDC)"/> 9internal static unsafe int EndPage<T>(T hdc) where T : IHandle<HDC>
Windows\Win32\PInvoke.StartDoc.cs (2)
8/// <inheritdoc cref="StartDoc(HDC, DOCINFOW*)"/> 9internal static unsafe int StartDoc<T>(T hdc, in DOCINFOW lpdi) where T : IHandle<HDC>
Windows\Win32\PInvoke.StartPage.cs (2)
8/// <inheritdoc cref="StartPage(HDC)"/> 9internal static unsafe int StartPage<T>(T hdc) where T : IHandle<HDC>
System.Drawing.Common.Tests (5)
Helpers.cs (1)
128internal static Rectangle GetWindowDCRect(HDC hdc) => GetHWndRect(PInvokeCore.WindowFromDC(hdc));
System\Drawing\ImageTests.cs (2)
673HDC hdc = PInvokeCore.CreateEnhMetaFile(HDC.Null, default, null, default(PCWSTR));
System\Drawing\Imaging\MetafileTests.cs (2)
1025HDC hdc = PInvokeCore.CreateEnhMetaFile(HDC.Null, default, null, default(PCWSTR));
System.Private.Windows.Core (200)
System\ArgumentValidation.cs (1)
47internal static void ThrowIfNull(HDC argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
Windows.Win32.HDC.g.cs (13)
25 : IEquatable<HDC> 35 internal static HDC Null => default; 39 public static implicit operator void*(HDC value) => value.Value; 41 public static explicit operator HDC(void* value) => new HDC(value); 43 public static bool operator ==(HDC left, HDC right) => left.Value == right.Value; 45 public static bool operator !=(HDC left, HDC right) => !(left == right); 47 public bool Equals(HDC other) => this.Value == other.Value; 49 public override bool Equals(object obj) => obj is HDC other && this.Equals(other); 55 public static implicit operator IntPtr(HDC value) => new IntPtr(value.Value); 57 public static explicit operator HDC(IntPtr value) => new HDC((void*)value.ToPointer()); 59 public static explicit operator HDC(UIntPtr value) => new HDC((void*)value.ToPointer());
Windows.Win32.IPicture.g.cs (30)
277 /// <inheritdoc cref="Render(winmdroot.Graphics.Gdi.HDC, int, int, int, int, int, int, int, int, winmdroot.Foundation.RECT*)"/> 278 internal unsafe winmdroot.Foundation.HRESULT Render(winmdroot.Graphics.Gdi.HDC hDC, int x, int y, int cx, int cy, int xSrc, int ySrc, int cxSrc, int cySrc, in winmdroot.Foundation.RECT pRcWBounds) 290 private static winmdroot.Foundation.HRESULT Render(IPicture* pThis, winmdroot.Graphics.Gdi.HDC hDC, int x, int y, int cx, int cy, int xSrc, int ySrc, int cxSrc, int cySrc, winmdroot.Foundation.RECT* pRcWBounds) 325 public unsafe winmdroot.Foundation.HRESULT Render(winmdroot.Graphics.Gdi.HDC hDC, int x, int y, int cx, int cy, int xSrc, int ySrc, int cxSrc, int cySrc, winmdroot.Foundation.RECT* pRcWBounds) 327 return ((delegate *unmanaged [Stdcall]<IPicture*,winmdroot.Graphics.Gdi.HDC ,int ,int ,int ,int ,int ,int ,int ,int ,winmdroot.Foundation.RECT* ,winmdroot.Foundation.HRESULT>)lpVtbl[8])((IPicture*)Unsafe.AsPointer(ref this), hDC, x, y, cx, cy, xSrc, ySrc, cxSrc, cySrc, pRcWBounds); 362 /// <inheritdoc cref="get_CurDC(winmdroot.Graphics.Gdi.HDC*)"/> 363 internal unsafe winmdroot.Foundation.HRESULT get_CurDC(out winmdroot.Graphics.Gdi.HDC phDC) 365 fixed (winmdroot.Graphics.Gdi.HDC* phDCLocal = &phDC) 375 private static winmdroot.Foundation.HRESULT get_CurDC(IPicture* pThis, winmdroot.Graphics.Gdi.HDC* phDC) 402 public unsafe winmdroot.Foundation.HRESULT get_CurDC(winmdroot.Graphics.Gdi.HDC* phDC) 404 return ((delegate *unmanaged [Stdcall]<IPicture*,winmdroot.Graphics.Gdi.HDC* ,winmdroot.Foundation.HRESULT>)lpVtbl[10])((IPicture*)Unsafe.AsPointer(ref this), phDC); 407 /// <inheritdoc cref="SelectPicture(winmdroot.Graphics.Gdi.HDC, winmdroot.Graphics.Gdi.HDC*, winmdroot.System.Ole.OLE_HANDLE*)"/> 408 internal unsafe winmdroot.Foundation.HRESULT SelectPicture(winmdroot.Graphics.Gdi.HDC hDCIn, out winmdroot.Graphics.Gdi.HDC phDCOut, out winmdroot.System.Ole.OLE_HANDLE phBmpOut) 412 fixed (winmdroot.Graphics.Gdi.HDC* phDCOutLocal = &phDCOut) 423 private static winmdroot.Foundation.HRESULT SelectPicture(IPicture* pThis, winmdroot.Graphics.Gdi.HDC hDCIn, winmdroot.Graphics.Gdi.HDC* phDCOut, winmdroot.System.Ole.OLE_HANDLE* phBmpOut) 448 public unsafe winmdroot.Foundation.HRESULT SelectPicture(winmdroot.Graphics.Gdi.HDC hDCIn, winmdroot.Graphics.Gdi.HDC* phDCOut, winmdroot.System.Ole.OLE_HANDLE* phBmpOut) 450 return ((delegate *unmanaged [Stdcall]<IPicture*,winmdroot.Graphics.Gdi.HDC ,winmdroot.Graphics.Gdi.HDC* ,winmdroot.System.Ole.OLE_HANDLE* ,winmdroot.Foundation.HRESULT>)lpVtbl[11])((IPicture*)Unsafe.AsPointer(ref this), hDCIn, phDCOut, phBmpOut); 685 internal delegate *unmanaged [Stdcall]<IPicture*,winmdroot.Graphics.Gdi.HDC ,int ,int ,int ,int ,int ,int ,int ,int ,winmdroot.Foundation.RECT* ,winmdroot.Foundation.HRESULT> Render_9; 689 internal delegate *unmanaged [Stdcall]<IPicture*,winmdroot.Graphics.Gdi.HDC* ,winmdroot.Foundation.HRESULT> get_CurDC_11; 691 internal delegate *unmanaged [Stdcall]<IPicture*,winmdroot.Graphics.Gdi.HDC ,winmdroot.Graphics.Gdi.HDC* ,winmdroot.System.Ole.OLE_HANDLE* ,winmdroot.Foundation.HRESULT> SelectPicture_12; 756 unsafe winmdroot.Foundation.HRESULT Render(winmdroot.Graphics.Gdi.HDC hDC, int x, int y, int cx, int cy, int xSrc, int ySrc, int cxSrc, int cySrc, winmdroot.Foundation.RECT* pRcWBounds); 762 unsafe winmdroot.Foundation.HRESULT get_CurDC(winmdroot.Graphics.Gdi.HDC* phDC); 765 unsafe winmdroot.Foundation.HRESULT SelectPicture(winmdroot.Graphics.Gdi.HDC hDCIn, winmdroot.Graphics.Gdi.HDC* phDCOut, winmdroot.System.Ole.OLE_HANDLE* phBmpOut);
Windows.Win32.PAINTSTRUCT.g.cs (1)
30 internal winmdroot.Graphics.Gdi.HDC hdc;
Windows.Win32.PInvokeCore.GDI32.dll.g.cs (61)
48 internal static winmdroot.Foundation.BOOL BitBlt(winmdroot.Graphics.Gdi.HDC hdc, int x, int y, int cx, int cy, winmdroot.Graphics.Gdi.HDC hdcSrc, int x1, int y1, winmdroot.Graphics.Gdi.ROP_CODE rop) 56 static extern winmdroot.Foundation.BOOL LocalExternFunction(winmdroot.Graphics.Gdi.HDC hdc, int x, int y, int cx, int cy, winmdroot.Graphics.Gdi.HDC hdcSrc, int x1, int y1, winmdroot.Graphics.Gdi.ROP_CODE rop); 81 internal static extern winmdroot.Graphics.Gdi.HENHMETAFILE CloseEnhMetaFile(winmdroot.Graphics.Gdi.HDC hdc); 147 internal static extern winmdroot.Graphics.Gdi.HBITMAP CreateCompatibleBitmap(winmdroot.Graphics.Gdi.HDC hdc, int cx, int cy); 160 internal static extern winmdroot.Graphics.Gdi.HDC CreateCompatibleDC(winmdroot.Graphics.Gdi.HDC hdc); 164 internal static unsafe winmdroot.Graphics.Gdi.HDC CreateDCW(string pwszDriver, string pwszDevice, string pszPort, winmdroot.Graphics.Gdi.DEVMODEW? pdm) 173 winmdroot.Graphics.Gdi.HDC __result = PInvokeCore.CreateDCW(pwszDriverLocal, pwszDeviceLocal, pszPortLocal, pdm.HasValue ? &pdmLocal : null); 200 internal static extern unsafe winmdroot.Graphics.Gdi.HDC CreateDCW(winmdroot.Foundation.PCWSTR pwszDriver, winmdroot.Foundation.PCWSTR pwszDevice, winmdroot.Foundation.PCWSTR pszPort, [Optional] winmdroot.Graphics.Gdi.DEVMODEW* pdm); 202 /// <inheritdoc cref="CreateDIBSection(winmdroot.Graphics.Gdi.HDC, winmdroot.Graphics.Gdi.BITMAPINFO*, winmdroot.Graphics.Gdi.DIB_USAGE, void**, winmdroot.Foundation.HANDLE, uint)"/> 204 internal static unsafe winmdroot.Graphics.Gdi.HBITMAP CreateDIBSection(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Graphics.Gdi.BITMAPINFO* pbmi, winmdroot.Graphics.Gdi.DIB_USAGE usage, out void* ppvBits, winmdroot.Foundation.HANDLE hSection, uint offset) 236 internal static unsafe winmdroot.Graphics.Gdi.HBITMAP CreateDIBSection(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Graphics.Gdi.BITMAPINFO* pbmi, winmdroot.Graphics.Gdi.DIB_USAGE usage, void** ppvBits, winmdroot.Foundation.HANDLE hSection, uint offset) 244 static extern unsafe winmdroot.Graphics.Gdi.HBITMAP LocalExternFunction(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Graphics.Gdi.BITMAPINFO* pbmi, winmdroot.Graphics.Gdi.DIB_USAGE usage, void** ppvBits, winmdroot.Foundation.HANDLE hSection, uint offset); 247 /// <inheritdoc cref="CreateEnhMetaFile(winmdroot.Graphics.Gdi.HDC, winmdroot.Foundation.PCWSTR, winmdroot.Foundation.RECT*, winmdroot.Foundation.PCWSTR)"/> 249 internal static unsafe winmdroot.Graphics.Gdi.HDC CreateEnhMetaFile(winmdroot.Graphics.Gdi.HDC hdc, string lpFilename, winmdroot.Foundation.RECT? lprc, string lpDesc) 256 winmdroot.Graphics.Gdi.HDC __result = PInvokeCore.CreateEnhMetaFile(hdc, lpFilenameLocal, lprc.HasValue ? &lprcLocal : null, lpDescLocal); 276 internal static extern unsafe winmdroot.Graphics.Gdi.HDC CreateEnhMetaFile(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Foundation.PCWSTR lpFilename, [Optional] winmdroot.Foundation.RECT* lprc, winmdroot.Foundation.PCWSTR lpDesc); 304 internal static unsafe winmdroot.Graphics.Gdi.HDC CreateICW(string pszDriver, string pszDevice, string pszPort, winmdroot.Graphics.Gdi.DEVMODEW? pdm) 313 winmdroot.Graphics.Gdi.HDC __result = PInvokeCore.CreateICW(pszDriverLocal, pszDeviceLocal, pszPortLocal, pdm.HasValue ? &pdmLocal : null); 335 internal static extern unsafe winmdroot.Graphics.Gdi.HDC CreateICW(winmdroot.Foundation.PCWSTR pszDriver, winmdroot.Foundation.PCWSTR pszDevice, winmdroot.Foundation.PCWSTR pszPort, [Optional] winmdroot.Graphics.Gdi.DEVMODEW* pdm); 392 internal static extern winmdroot.Foundation.BOOL DeleteDC(winmdroot.Graphics.Gdi.HDC hdc); 394 /// <inheritdoc cref="EnumEnhMetaFile(winmdroot.Graphics.Gdi.HDC, winmdroot.Graphics.Gdi.HENHMETAFILE, delegate *unmanaged[Stdcall]{global::Windows.Win32.Graphics.Gdi.HDC,global::Windows.Win32.Graphics.Gdi.HANDLETABLE*,global::Windows.Win32.Graphics.Gdi.ENHMETARECORD*,int,global::Windows.Win32.Foundation.LPARAM,int}, void*, winmdroot.Foundation.RECT*)"/> 396 internal static unsafe winmdroot.Foundation.BOOL EnumEnhMetaFile(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Graphics.Gdi.HENHMETAFILE hmf, delegate *unmanaged[Stdcall]<global::Windows.Win32.Graphics.Gdi.HDC,global::Windows.Win32.Graphics.Gdi.HANDLETABLE*,global::Windows.Win32.Graphics.Gdi.ENHMETARECORD*,int,global::Windows.Win32.Foundation.LPARAM,int> proc, void* param3, winmdroot.Foundation.RECT? lpRect) 417 internal static extern unsafe winmdroot.Foundation.BOOL EnumEnhMetaFile(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Graphics.Gdi.HENHMETAFILE hmf, delegate *unmanaged[Stdcall]<global::Windows.Win32.Graphics.Gdi.HDC,global::Windows.Win32.Graphics.Gdi.HANDLETABLE*,global::Windows.Win32.Graphics.Gdi.ENHMETARECORD*,int,global::Windows.Win32.Foundation.LPARAM,int> proc, [Optional] void* param3, [Optional] winmdroot.Foundation.RECT* lpRect); 429 internal static extern int GetClipRgn(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Graphics.Gdi.HRGN hrgn); 443 internal static int GetDeviceCaps(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Graphics.Gdi.GET_DEVICE_CAPS_INDEX index) 449 static extern int LocalExternFunction(winmdroot.Graphics.Gdi.HDC hdc, int index); 555 /// <inheritdoc cref="GetViewportExtEx(winmdroot.Graphics.Gdi.HDC, winmdroot.Foundation.SIZE*)"/> 557 internal static unsafe winmdroot.Foundation.BOOL GetViewportExtEx(winmdroot.Graphics.Gdi.HDC hdc, out winmdroot.Foundation.SIZE lpsize) 577 internal static extern unsafe winmdroot.Foundation.BOOL GetViewportExtEx(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Foundation.SIZE* lpsize); 579 /// <inheritdoc cref="GetViewportOrgEx(winmdroot.Graphics.Gdi.HDC, global::System.Drawing.Point*)"/> 581 internal static unsafe winmdroot.Foundation.BOOL GetViewportOrgEx(winmdroot.Graphics.Gdi.HDC hdc, out global::System.Drawing.Point lppoint) 601 internal static extern unsafe winmdroot.Foundation.BOOL GetViewportOrgEx(winmdroot.Graphics.Gdi.HDC hdc, global::System.Drawing.Point* lppoint); 603 /// <inheritdoc cref="GetWindowOrgEx(winmdroot.Graphics.Gdi.HDC, global::System.Drawing.Point*)"/> 605 internal static unsafe winmdroot.Foundation.BOOL GetWindowOrgEx(winmdroot.Graphics.Gdi.HDC hdc, out global::System.Drawing.Point lppoint) 625 internal static extern unsafe winmdroot.Foundation.BOOL GetWindowOrgEx(winmdroot.Graphics.Gdi.HDC hdc, global::System.Drawing.Point* lppoint); 627 /// <inheritdoc cref="GetWorldTransform(winmdroot.Graphics.Gdi.HDC, winmdroot.Graphics.Gdi.XFORM*)"/> 629 internal static unsafe winmdroot.Foundation.BOOL GetWorldTransform(winmdroot.Graphics.Gdi.HDC hdc, out winmdroot.Graphics.Gdi.XFORM lpxf) 647 internal static extern unsafe winmdroot.Foundation.BOOL GetWorldTransform(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Graphics.Gdi.XFORM* lpxf); 665 internal static extern winmdroot.Graphics.Gdi.GDI_REGION_TYPE IntersectClipRect(winmdroot.Graphics.Gdi.HDC hdc, int left, int top, int right, int bottom); 678 internal static extern unsafe winmdroot.Foundation.BOOL OffsetViewportOrgEx(winmdroot.Graphics.Gdi.HDC hdc, int x, int y, [Optional] global::System.Drawing.Point* lppt); 701 internal static extern uint RealizePalette(winmdroot.Graphics.Gdi.HDC hdc); 718 internal static extern winmdroot.Foundation.BOOL Rectangle(winmdroot.Graphics.Gdi.HDC hdc, int left, int top, int right, int bottom); 729 internal static extern winmdroot.Foundation.BOOL RestoreDC(winmdroot.Graphics.Gdi.HDC hdc, int nSavedDC); 742 internal static extern int SaveDC(winmdroot.Graphics.Gdi.HDC hdc); 757 internal static extern winmdroot.Graphics.Gdi.GDI_REGION_TYPE SelectClipRgn(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Graphics.Gdi.HRGN hrgn); 776 internal static extern winmdroot.Graphics.Gdi.HGDIOBJ SelectObject(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Graphics.Gdi.HGDIOBJ h); 794 internal static extern winmdroot.Graphics.Gdi.HPALETTE SelectPalette(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Graphics.Gdi.HPALETTE hPal, winmdroot.Foundation.BOOL bForceBkgd); 808 internal static extern winmdroot.Foundation.COLORREF SetBkColor(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Foundation.COLORREF color); 818 internal static int SetBkMode(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Graphics.Gdi.BACKGROUND_MODE mode) 824 static extern int LocalExternFunction(winmdroot.Graphics.Gdi.HDC hdc, int mode); 839 internal static extern int SetMapMode(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Graphics.Gdi.HDC_MAP_MODE iMode); 850 internal static extern int SetROP2(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Graphics.Gdi.R2_MODE rop2); 870 internal static extern uint SetTextAlign(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Graphics.Gdi.TEXT_ALIGN_OPTIONS align); 881 internal static extern winmdroot.Foundation.COLORREF SetTextColor(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Foundation.COLORREF color);
Windows.Win32.PInvokeCore.USER32.dll.g.cs (14)
28 internal static unsafe winmdroot.Graphics.Gdi.HDC BeginPaint(winmdroot.Foundation.HWND hWnd, out winmdroot.Graphics.Gdi.PAINTSTRUCT lpPaint) 32 winmdroot.Graphics.Gdi.HDC __result = PInvokeCore.BeginPaint(hWnd, lpPaintLocal); 49 internal static extern unsafe winmdroot.Graphics.Gdi.HDC BeginPaint(winmdroot.Foundation.HWND hWnd, winmdroot.Graphics.Gdi.PAINTSTRUCT* lpPaint); 216 internal static winmdroot.Foundation.BOOL DrawIconEx(winmdroot.Graphics.Gdi.HDC hdc, int xLeft, int yTop, winmdroot.UI.WindowsAndMessaging.HICON hIcon, int cxWidth, int cyWidth, uint istepIfAniCur, winmdroot.Graphics.Gdi.HBRUSH hbrFlickerFreeDraw, winmdroot.UI.WindowsAndMessaging.DI_FLAGS diFlags) 224 static extern winmdroot.Foundation.BOOL LocalExternFunction(winmdroot.Graphics.Gdi.HDC hdc, int xLeft, int yTop, winmdroot.UI.WindowsAndMessaging.HICON hIcon, int cxWidth, int cyWidth, uint istepIfAniCur, winmdroot.Graphics.Gdi.HBRUSH hbrFlickerFreeDraw, winmdroot.UI.WindowsAndMessaging.DI_FLAGS diFlags); 274 /// <inheritdoc cref="EnumDisplayMonitors(winmdroot.Graphics.Gdi.HDC, winmdroot.Foundation.RECT*, delegate *unmanaged[Stdcall]{global::Windows.Win32.Graphics.Gdi.HMONITOR,global::Windows.Win32.Graphics.Gdi.HDC,global::Windows.Win32.Foundation.RECT*,global::Windows.Win32.Foundation.LPARAM,global::Windows.Win32.Foundation.BOOL}, winmdroot.Foundation.LPARAM)"/> 276 internal static unsafe winmdroot.Foundation.BOOL EnumDisplayMonitors(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Foundation.RECT? lprcClip, delegate *unmanaged[Stdcall]<global::Windows.Win32.Graphics.Gdi.HMONITOR,global::Windows.Win32.Graphics.Gdi.HDC,global::Windows.Win32.Foundation.RECT*,global::Windows.Win32.Foundation.LPARAM,global::Windows.Win32.Foundation.BOOL> lpfnEnum, winmdroot.Foundation.LPARAM dwData) 304 internal static extern unsafe winmdroot.Foundation.BOOL EnumDisplayMonitors(winmdroot.Graphics.Gdi.HDC hdc, [Optional] winmdroot.Foundation.RECT* lprcClip, delegate *unmanaged[Stdcall]<global::Windows.Win32.Graphics.Gdi.HMONITOR,global::Windows.Win32.Graphics.Gdi.HDC,global::Windows.Win32.Foundation.RECT*,global::Windows.Win32.Foundation.LPARAM,global::Windows.Win32.Foundation.BOOL> lpfnEnum, winmdroot.Foundation.LPARAM dwData); 436 internal static extern winmdroot.Graphics.Gdi.HDC GetDC(winmdroot.Foundation.HWND hWnd); 451 internal static extern winmdroot.Graphics.Gdi.HDC GetDCEx(winmdroot.Foundation.HWND hWnd, winmdroot.Graphics.Gdi.HRGN hrgnClip, winmdroot.Graphics.Gdi.GET_DCX_FLAGS flags); 986 internal static extern int ReleaseDC(winmdroot.Foundation.HWND hWnd, winmdroot.Graphics.Gdi.HDC hDC); 1094 internal static extern winmdroot.Foundation.HWND WindowFromDC(winmdroot.Graphics.Gdi.HDC hDC);
Windows.Win32.System_Ole_IPicture_Extensions.g.cs (10)
73 /// <inheritdoc cref="winmdroot.System.Ole.IPicture.Interface.Render(winmdroot.Graphics.Gdi.HDC, int, int, int, int, int, int, int, int, winmdroot.Foundation.RECT*)"/> 74 internal static unsafe winmdroot.Foundation.HRESULT Render(this winmdroot.System.Ole.IPicture.Interface @this, winmdroot.Graphics.Gdi.HDC hDC, int x, int y, int cx, int cy, int xSrc, int ySrc, int cxSrc, int cySrc, in winmdroot.Foundation.RECT pRcWBounds) 83 /// <inheritdoc cref="winmdroot.System.Ole.IPicture.Interface.get_CurDC(winmdroot.Graphics.Gdi.HDC*)"/> 84 internal static unsafe winmdroot.Foundation.HRESULT get_CurDC(this winmdroot.System.Ole.IPicture.Interface @this, out winmdroot.Graphics.Gdi.HDC phDC) 86 fixed (winmdroot.Graphics.Gdi.HDC* phDCLocal = &phDC) 93 /// <inheritdoc cref="winmdroot.System.Ole.IPicture.Interface.SelectPicture(winmdroot.Graphics.Gdi.HDC, winmdroot.Graphics.Gdi.HDC*, winmdroot.System.Ole.OLE_HANDLE*)"/> 94 internal static unsafe winmdroot.Foundation.HRESULT SelectPicture(this winmdroot.System.Ole.IPicture.Interface @this, winmdroot.Graphics.Gdi.HDC hDCIn, out winmdroot.Graphics.Gdi.HDC phDCOut, out winmdroot.System.Ole.OLE_HANDLE phBmpOut) 98 fixed (winmdroot.Graphics.Gdi.HDC* phDCOutLocal = &phDCOut)
Windows\Win32\Foundation\WPARAM.cs (3)
16public static explicit operator HDC(WPARAM value) => (HDC)(nint)value.Value; 17public static explicit operator WPARAM(HDC value) => new((nuint)value.Value);
Windows\Win32\Graphics\Gdi\BeginPaintScope.cs (2)
25public HDC HDC { get; } 35public static implicit operator HDC(in BeginPaintScope scope) => scope.HDC;
Windows\Win32\Graphics\Gdi\CreateBitmapScope.cs (3)
31/// Creates a bitmap compatible with the given <see cref="HDC"/> via 32/// <see cref="PInvokeCore.CreateCompatibleBitmap(HDC, int, int)"/> 34public CreateBitmapScope(HDC hdc, int cx, int cy) => HBITMAP = PInvokeCore.CreateCompatibleBitmap(hdc, cx, cy);
Windows\Win32\Graphics\Gdi\CreateDcScope.cs (4)
22public HDC HDC { get; } 25/// Creates a compatible HDC for <paramref name="hdc"/> using <see cref="PInvokeCore.CreateCompatibleDC(HDC)"/>. 32public CreateDcScope(HDC hdc) 52public static implicit operator HDC(in CreateDcScope scope) => scope.HDC;
Windows\Win32\Graphics\Gdi\GetDcScope.cs (5)
7/// Helper to scope lifetime of an <see cref="Gdi.HDC"/> retrieved via <see cref="PInvokeCore.GetDC(HWND)"/> and 8/// <see cref="PInvokeCore.GetDCEx(HWND, HRGN, GET_DCX_FLAGS)"/>. Releases the <see cref="Gdi.HDC"/> (if any) 19public HDC HDC { get; } 29/// Creates a <see cref="Gdi.HDC"/> using <see cref="PInvokeCore.GetDCEx(HWND, HRGN, GET_DCX_FLAGS)"/>. 60public static implicit operator HDC(in GetDcScope scope) => scope.HDC;
Windows\Win32\Graphics\Gdi\HDC.cs (4)
10internal readonly partial struct HDC : IHandle<HDC> 12HDC IHandle<HDC>.Handle => this; 13object? IHandle<HDC>.Wrapper => null;
Windows\Win32\Graphics\Gdi\HdcHandle.cs (4)
7/// Used when you must keep a handle to an <see cref="HDC"/> in a field. Avoid keeping HDC handles in fields 10internal sealed class HdcHandle : IDisposable, IHandle<HDC> 24public HDC Handle { get; private set; } 26public static implicit operator HDC(in HdcHandle handle) => handle.Handle;
Windows\Win32\Graphics\Gdi\HGDIOBJ.cs (1)
8public static implicit operator HGDIOBJ(HDC value) => (HGDIOBJ)value.Value;
Windows\Win32\Graphics\Gdi\IHDCContext.cs (1)
8HDC GetHdc();
Windows\Win32\Graphics\Gdi\RegionScope.cs (2)
38/// Creates a clipping region copy via <see cref="PInvokeCore.GetClipRgn(HDC, HRGN)"/> for the given device context. 41public RegionScope(HDC hdc)
Windows\Win32\Graphics\Gdi\SaveDcScope.cs (3)
25public HDC HDC { get; } 29/// Saves the device context state using <see cref="PInvokeCore.SaveDC(HDC)"/>. 32public SaveDcScope(HDC hdc)
Windows\Win32\Graphics\Gdi\SelectObjectScope.cs (5)
7/// Helper to scope selecting a GDI object into an <see cref="HDC"/>. Restores the original 8/// object into the <see cref="HDC"/> when disposed. 22private readonly HDC _hdc; 27/// <see cref="PInvokeCore.SelectObject(HDC, HGDIOBJ)"/>. 29public SelectObjectScope(HDC hdc, HGDIOBJ @object)
Windows\Win32\Graphics\Gdi\SelectPaletteScope.cs (2)
21public HDC HDC { get; } 24public SelectPaletteScope(HDC hdc, HPALETTE hpalette, bool forceBackground, bool realizePalette)
Windows\Win32\Graphics\Gdi\SetBackgroundColorScope.cs (3)
19private readonly HDC _hdc; 23/// <see cref="PInvokeCore.SetBkColor(HDC, COLORREF)"/>. 25public SetBackgroundColorScope(HDC hdc, COLORREF color)
Windows\Win32\Graphics\Gdi\SetBkModeScope.cs (2)
23private readonly HDC _hdc; 28public SetBkModeScope(HDC hdc, BACKGROUND_MODE bkmode)
Windows\Win32\Graphics\Gdi\SetMapModeScope.cs (3)
23private readonly HDC _hdc; 27/// <see cref="PInvokeCore.SetMapMode(HDC, HDC_MAP_MODE)"/>. 29public SetMapModeScope(HDC hdc, HDC_MAP_MODE mapMode)
Windows\Win32\Graphics\Gdi\SetRop2Scope.cs (3)
23private readonly HDC _hdc; 26/// Selects <paramref name="rop2"/> into the given <paramref name="hdc"/> using <see cref="PInvokeCore.SetROP2(HDC, R2_MODE)"/>. 28public SetRop2Scope(HDC hdc, R2_MODE rop2)
Windows\Win32\Graphics\Gdi\SetTextAlignmentScope.cs (3)
23private readonly HDC _hdc; 27/// using <see cref="PInvokeCore.SetTextAlign(HDC, TEXT_ALIGN_OPTIONS)"/>. 29public SetTextAlignmentScope(HDC hdc, TEXT_ALIGN_OPTIONS ta)
Windows\Win32\Graphics\Gdi\SetTextColorScope.cs (3)
23private readonly HDC _hdc; 27/// <see cref="PInvokeCore.SetTextColor(HDC, COLORREF)"/>. 29public SetTextColorScope(HDC hdc, COLORREF color)
Windows\Win32\PInvokeCore.BitBlt.cs (8)
8/// <inheritdoc cref="BitBlt(HDC, int, int, int, int, HDC, int, int, ROP_CODE)"/> 15HDC hdcSrc, 18ROP_CODE rop) where T : IHandle<HDC> 34/// <inheritdoc cref="BitBlt(HDC, int, int, int, int, HDC, int, int, ROP_CODE)"/> 36HDC hdc, 44ROP_CODE rop) where T : IHandle<HDC>
Windows\Win32\PInvokeCore.DrawIcon.cs (1)
8public static BOOL DrawIcon<T>(HDC hDC, int x, int y, T hIcon)
Windows\Win32\PInvokeCore.DrawIconEx.cs (2)
8/// <inheritdoc cref="DrawIconEx(HDC, int, int, HICON, int, int, uint, HBRUSH, DI_FLAGS)"/> 10HDC hDC,
Windows\Win32\PInvokeCore.EnumDisplayMonitors.cs (2)
11public delegate bool EnumDisplayMonitorsCallback(HMONITOR monitor, HDC hdc); 27private static BOOL EnumDisplayMonitorsNativeCallback(HMONITOR monitor, HDC hdc, RECT* lprcMonitor, LPARAM lParam)
Windows\Win32\UI\Controls\Dialogs\PRINTDLGEXW.cs (1)
117public HDC hDC;
System.Private.Windows.GdiPlus (37)
System\Drawing\ApplyGraphicsProperties.cs (1)
9/// Enumeration defining the different Graphics properties to apply to an <see cref="HDC"/> when creating it
System\Drawing\IGraphicsContextInfo.cs (1)
10(HDC hdc, int saveState) GetHdc(ApplyGraphicsProperties apply, bool alwaysSaveState);
Windows.Win32.PInvokeGdiPlus.gdiplus.dll.g.cs (28)
1063 /// <inheritdoc cref="GdipCreateFontFromDC(winmdroot.Graphics.Gdi.HDC, winmdroot.Graphics.GdiPlus.GpFont**)"/> 1064 internal static unsafe winmdroot.Graphics.GdiPlus.Status GdipCreateFontFromDC(winmdroot.Graphics.Gdi.HDC hdc, ref winmdroot.Graphics.GdiPlus.GpFont* font) 1074 internal static extern unsafe winmdroot.Graphics.GdiPlus.Status GdipCreateFontFromDC(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Graphics.GdiPlus.GpFont** font); 1076 /// <inheritdoc cref="GdipCreateFontFromLogfont(winmdroot.Graphics.Gdi.HDC, winmdroot.Graphics.Gdi.LOGFONTW*, winmdroot.Graphics.GdiPlus.GpFont**)"/> 1077 internal static unsafe winmdroot.Graphics.GdiPlus.Status GdipCreateFontFromLogfont(winmdroot.Graphics.Gdi.HDC hdc, in winmdroot.Graphics.Gdi.LOGFONTW logfont, ref winmdroot.Graphics.GdiPlus.GpFont* font) 1090 internal static extern unsafe winmdroot.Graphics.GdiPlus.Status GdipCreateFontFromLogfont(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Graphics.Gdi.LOGFONTW* logfont, winmdroot.Graphics.GdiPlus.GpFont** font); 1092 /// <inheritdoc cref="GdipCreateFromHDC(winmdroot.Graphics.Gdi.HDC, winmdroot.Graphics.GdiPlus.GpGraphics**)"/> 1093 internal static unsafe winmdroot.Graphics.GdiPlus.Status GdipCreateFromHDC(winmdroot.Graphics.Gdi.HDC hdc, ref winmdroot.Graphics.GdiPlus.GpGraphics* graphics) 1103 internal static extern unsafe winmdroot.Graphics.GdiPlus.Status GdipCreateFromHDC(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Graphics.GdiPlus.GpGraphics** graphics); 1105 /// <inheritdoc cref="GdipCreateFromHDC2(winmdroot.Graphics.Gdi.HDC, winmdroot.Foundation.HANDLE, winmdroot.Graphics.GdiPlus.GpGraphics**)"/> 1106 internal static unsafe winmdroot.Graphics.GdiPlus.Status GdipCreateFromHDC2(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Foundation.HANDLE hDevice, ref winmdroot.Graphics.GdiPlus.GpGraphics* graphics) 1116 internal static extern unsafe winmdroot.Graphics.GdiPlus.Status GdipCreateFromHDC2(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Foundation.HANDLE hDevice, winmdroot.Graphics.GdiPlus.GpGraphics** graphics); 3289 /// <inheritdoc cref="GdipGetDC(winmdroot.Graphics.GdiPlus.GpGraphics*, winmdroot.Graphics.Gdi.HDC*)"/> 3290 internal static unsafe winmdroot.Graphics.GdiPlus.Status GdipGetDC(ref winmdroot.Graphics.GdiPlus.GpGraphics graphics, ref winmdroot.Graphics.Gdi.HDC hdc) 3292 fixed (winmdroot.Graphics.Gdi.HDC* hdcLocal = &hdc) 3303 internal static extern unsafe winmdroot.Graphics.GdiPlus.Status GdipGetDC(winmdroot.Graphics.GdiPlus.GpGraphics* graphics, winmdroot.Graphics.Gdi.HDC* hdc); 6342 /// <inheritdoc cref="GdipRecordMetafile(winmdroot.Graphics.Gdi.HDC, winmdroot.Graphics.GdiPlus.EmfType, winmdroot.Graphics.GdiPlus.RectF*, winmdroot.Graphics.GdiPlus.MetafileFrameUnit, winmdroot.Foundation.PCWSTR, winmdroot.Graphics.GdiPlus.GpMetafile**)"/> 6343 internal static unsafe winmdroot.Graphics.GdiPlus.Status GdipRecordMetafile(winmdroot.Graphics.Gdi.HDC referenceHdc, winmdroot.Graphics.GdiPlus.EmfType type, in winmdroot.Graphics.GdiPlus.RectF frameRect, winmdroot.Graphics.GdiPlus.MetafileFrameUnit frameUnit, string description, ref winmdroot.Graphics.GdiPlus.GpMetafile* metafile) 6359 internal static extern unsafe winmdroot.Graphics.GdiPlus.Status GdipRecordMetafile(winmdroot.Graphics.Gdi.HDC referenceHdc, winmdroot.Graphics.GdiPlus.EmfType type, winmdroot.Graphics.GdiPlus.RectF* frameRect, winmdroot.Graphics.GdiPlus.MetafileFrameUnit frameUnit, winmdroot.Foundation.PCWSTR description, winmdroot.Graphics.GdiPlus.GpMetafile** metafile); 6361 /// <inheritdoc cref="GdipRecordMetafileFileName(winmdroot.Foundation.PCWSTR, winmdroot.Graphics.Gdi.HDC, winmdroot.Graphics.GdiPlus.EmfType, winmdroot.Graphics.GdiPlus.RectF*, winmdroot.Graphics.GdiPlus.MetafileFrameUnit, winmdroot.Foundation.PCWSTR, winmdroot.Graphics.GdiPlus.GpMetafile**)"/> 6362 internal static unsafe winmdroot.Graphics.GdiPlus.Status GdipRecordMetafileFileName(string fileName, winmdroot.Graphics.Gdi.HDC referenceHdc, winmdroot.Graphics.GdiPlus.EmfType type, in winmdroot.Graphics.GdiPlus.RectF frameRect, winmdroot.Graphics.GdiPlus.MetafileFrameUnit frameUnit, string description, ref winmdroot.Graphics.GdiPlus.GpMetafile* metafile) 6381 internal static extern unsafe winmdroot.Graphics.GdiPlus.Status GdipRecordMetafileFileName(winmdroot.Foundation.PCWSTR fileName, winmdroot.Graphics.Gdi.HDC referenceHdc, winmdroot.Graphics.GdiPlus.EmfType type, winmdroot.Graphics.GdiPlus.RectF* frameRect, winmdroot.Graphics.GdiPlus.MetafileFrameUnit frameUnit, winmdroot.Foundation.PCWSTR description, winmdroot.Graphics.GdiPlus.GpMetafile** metafile); 6383 /// <inheritdoc cref="GdipRecordMetafileStream(winmdroot.System.Com.IStream*, winmdroot.Graphics.Gdi.HDC, winmdroot.Graphics.GdiPlus.EmfType, winmdroot.Graphics.GdiPlus.RectF*, winmdroot.Graphics.GdiPlus.MetafileFrameUnit, winmdroot.Foundation.PCWSTR, winmdroot.Graphics.GdiPlus.GpMetafile**)"/> 6384 internal static unsafe winmdroot.Graphics.GdiPlus.Status GdipRecordMetafileStream(winmdroot.System.Com.IStream* stream, winmdroot.Graphics.Gdi.HDC referenceHdc, winmdroot.Graphics.GdiPlus.EmfType type, in winmdroot.Graphics.GdiPlus.RectF frameRect, winmdroot.Graphics.GdiPlus.MetafileFrameUnit frameUnit, string description, ref winmdroot.Graphics.GdiPlus.GpMetafile* metafile) 6400 internal static extern unsafe winmdroot.Graphics.GdiPlus.Status GdipRecordMetafileStream(winmdroot.System.Com.IStream* stream, winmdroot.Graphics.Gdi.HDC referenceHdc, winmdroot.Graphics.GdiPlus.EmfType type, winmdroot.Graphics.GdiPlus.RectF* frameRect, winmdroot.Graphics.GdiPlus.MetafileFrameUnit frameUnit, winmdroot.Foundation.PCWSTR description, winmdroot.Graphics.GdiPlus.GpMetafile** metafile); 6402 /// <inheritdoc cref="GdipReleaseDC(winmdroot.Graphics.GdiPlus.GpGraphics*, winmdroot.Graphics.Gdi.HDC)"/> 6403 internal static unsafe winmdroot.Graphics.GdiPlus.Status GdipReleaseDC(ref winmdroot.Graphics.GdiPlus.GpGraphics graphics, winmdroot.Graphics.Gdi.HDC hdc) 6413 internal static extern unsafe winmdroot.Graphics.GdiPlus.Status GdipReleaseDC(winmdroot.Graphics.GdiPlus.GpGraphics* graphics, winmdroot.Graphics.Gdi.HDC hdc);
Windows\Win32\Graphics\Gdi\DeviceContextHdcScope.cs (4)
30public HDC HDC { get; } 39/// When a <see cref="T:System.Drawing.Graphics"/> object is created from a <see cref="Gdi.HDC"/> the clipping region and 40/// the viewport origin are applied (<see cref="PInvokeCore.GetViewportExtEx(HDC, SIZE*)"/>). The clipping 158public static implicit operator HDC(in DeviceContextHdcScope scope) => scope.HDC;
Windows\Win32\Graphics\Gdi\HdcExtensions.cs (1)
20where T : IHandle<HDC>
Windows\Win32\Graphics\Gdi\IGraphicsHdcProvider.cs (2)
27/// Gets the <see cref="HDC"/>, if the object was created from one. 29HDC GetHdc();
System.Windows.Forms (130)
System\Windows\Forms\ActiveX\AxHost.cs (1)
3057internal override HBRUSH InitializeDCForWmCtlColor(HDC dc, MessageId msg)
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (4)
406/// <inheritdoc cref="IViewObject.Interface.Draw(DVASPECT, int, void*, DVTARGETDEVICE*, HDC, HDC, RECTL*, RECTL*, nint, nuint)"/> 412HDC hdcTargetDev, 413HDC hdcDraw,
System\Windows\Forms\ActiveX\Control_ActiveXControlInterfaces.cs (12)
513/// <inheritdoc cref="IViewObject.Draw(DVASPECT, int, void*, DVTARGETDEVICE*, HDC, HDC, RECTL*, RECTL*, nint, nuint)"/> 519HDC hdcTargetDev, 520HDC hdcDraw, 543/// <inheritdoc cref="IViewObject.GetColorSet(DVASPECT, int, void*, DVTARGETDEVICE*, HDC, LOGPALETTE**)"/> 549HDC hicTargetDev, 569/// <inheritdoc cref="IViewObject.Draw(DVASPECT, int, void*, DVTARGETDEVICE*, HDC, HDC, RECTL*, RECTL*, nint, nuint)"/> 575HDC hdcTargetDev, 576HDC hdcDraw, 593/// <inheritdoc cref="IViewObject.GetColorSet(DVASPECT, int, void*, DVTARGETDEVICE*, HDC, LOGPALETTE**)"/> 599HDC hdcTargetDev,
System\Windows\Forms\Control.cs (11)
5873internal virtual HBRUSH InitializeDCForWmCtlColor(HDC dc, MessageId msg) 8790private unsafe void PrintToMetaFile(HDC hDC, IntPtr lParam) 8823private protected virtual void PrintToMetaFileRecursive(HDC hDC, IntPtr lParam, Rectangle bounds) 8856private void PrintToMetaFile_SendPrintMessage(HDC hDC, nint lParam) 11250m.ResultInternal = (LRESULT)(nint)control.InitializeDCForWmCtlColor((HDC)(nint)m.WParamInternal, m.MsgInternal); 11278HDC dc = (HDC)(nint)m.WParamInternal; 11839HDC dc = (HDC)(nint)m.WParamInternal; 11951HDC hdc = (HDC)(nint)m.WParamInternal;
System\Windows\Forms\Control.MetafileDCWrapper.cs (5)
25private readonly HDC _hMetafileDC; 28internal unsafe MetafileDCWrapper(HDC hOriginalDC, Size size) 83internal HDC HDC { get; private set; } 86private unsafe bool DICopy(HDC hdcDest, HDC hdcSrc, RECT rect, bool bStretch)
System\Windows\Forms\Control.PrintPaintEventArgs.cs (1)
14internal PrintPaintEventArgs(Message m, HDC dc, Rectangle clipRect)
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxBaseAdapter.cs (1)
213internal static Rectangle DrawPopupBorder(HDC hdc, Rectangle r, ColorData colors)
System\Windows\Forms\Controls\Buttons\ButtonInternal\RadioButtonBaseAdapter.cs (1)
97private static void DrawAndFillEllipse(HDC hdc, HPEN borderPen, HBRUSH fieldBrush, Rectangle bounds)
System\Windows\Forms\Controls\Buttons\CheckBoxRenderer.cs (1)
243internal static Size GetGlyphSize(HDC hdc, CheckBoxState state, HWND hwnd)
System\Windows\Forms\Controls\Buttons\RadioButtonRenderer.cs (2)
54HDC hdc, 257internal static Size GetGlyphSize(HDC hdc, RadioButtonState state, HWND hwnd)
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (11)
2001internal override HBRUSH InitializeDCForWmCtlColor(HDC dc, MessageId msg) 3451HDC hdc = (HDC)m.WParamInternal; 3682(HDC)m.WParamInternal, 3686(HDC)m.WParamInternal, 3700(HDC)m.WParamInternal, 3704(HDC)m.WParamInternal, 3716m.ResultInternal = (LRESULT)(nint)InitializeDCForWmCtlColor((HDC)(nint)m.WParamInternal, m.MsgInternal); 3789HDC dc = useBeginPaint ? paintScope! : (HDC)m.WParamInternal; 3846using Graphics g = Graphics.FromHdcInternal((HDC)m.WParamInternal);
System\Windows\Forms\Controls\ComboBox\ComboBoxRenderer.cs (1)
115internal static void DrawDropDownButtonForHandle(HDC hdc, Rectangle bounds, ComboBoxState state, HWND hwnd)
System\Windows\Forms\Controls\GroupBox\GroupBox.cs (2)
667using Graphics graphics = Graphics.FromHdcInternal((HDC)m.WParamInternal); 674PInvoke.FillRect((HDC)m.WParamInternal, rect, hbrush);
System\Windows\Forms\Controls\ImageList\ImageList.cs (6)
528HDC dc = (HDC)g.GetHdc(); 534new HandleRef<HDC>(g, dc), 664HDC dc = (HDC)graphics.GetHdc(); 670new HandleRef<HDC>(graphics, dc),
System\Windows\Forms\Controls\Labels\Label.cs (1)
1349private protected override void PrintToMetaFileRecursive(HDC hDC, IntPtr lParam, Rectangle bounds)
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (1)
2324using Graphics g = Graphics.FromHdc((HDC)m.WParamInternal);
System\Windows\Forms\Controls\ListView\ListView.cs (1)
6959using Graphics g = Graphics.FromHdc((HDC)m.WParamInternal);
System\Windows\Forms\Controls\TextBox\MaskedTextBox.cs (1)
2889using Graphics g = Graphics.FromHdc((HDC)m.WParamInternal);
System\Windows\Forms\Controls\TextBox\TextBox.cs (2)
819using Graphics g = Graphics.FromHdc((HDC)m.WParamInternal); 860private void DrawPlaceholderText(HDC hdc)
System\Windows\Forms\Controls\TextBox\TextBoxBase.cs (1)
1995internal override HBRUSH InitializeDCForWmCtlColor(HDC dc, MessageId msg)
System\Windows\Forms\Controls\ToolStrips\CachedItemHdcInfo.cs (5)
8internal class CachedItemHdcInfo : IDisposable, IHandle<HDC> 14private HDC _cachedItemHDC; 18public HDC Handle => _cachedItemHDC; 22public HDC GetCachedItemDC(HDC toolStripHDC, Size bitmapSize)
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (2)
2649private protected override void PrintToMetaFileRecursive(HDC hDC, IntPtr lParam, Rectangle bounds) 3492HDC itemHDC = ItemHdcInfo.GetCachedItemDC(toolStripHDC, bitmapSize);
System\Windows\Forms\Controls\TreeView\TreeView.cs (1)
3137using Graphics g = Graphics.FromHdc((HDC)m.WParamInternal);
System\Windows\Forms\Design\ComponentEditorForm.PageSelector.cs (2)
89HDC dc, 260private void FillRectDither(HDC dc, RECT rc)
System\Windows\Forms\ErrorProvider\ErrorProvider.ErrorWindow.cs (1)
161private unsafe void MirrorDcIfNeeded(HDC hdc)
System\Windows\Forms\Input\Cursor.cs (1)
336(HDC)dc,
System\Windows\Forms\Panels\Panel.cs (1)
224private protected override void PrintToMetaFileRecursive(HDC hDC, IntPtr lParam, Rectangle bounds)
System\Windows\Forms\Rendering\ControlPaint.cs (1)
2054HDC dc,
System\Windows\Forms\Rendering\DCMapping.cs (2)
26private readonly HDC _hdc; 29public unsafe DCMapping(HDC hdc, Rectangle bounds)
System\Windows\Forms\Rendering\DrawingEventArgs.cs (4)
27private readonly HDC _hdc; 47HDC dc, 77internal HDC HDC => IsStateClean ? default : _hdc; 120internal HDC GetHDC() => _hdc;
System\Windows\Forms\Rendering\DrawingEventFlags.cs (1)
24/// default when constructing via an <see cref="HDC"/> as it, by definition, has no <see cref="Graphics"/>
System\Windows\Forms\Rendering\DrawItemEventArgs.cs (6)
57HDC hdc, 66HDC hdc, 159internal HDC HDC => _event.HDC; 162HDC IHdcContext.GetHdc() => (HDC)((IDeviceContext)this).GetHdc(); 166HDC IGraphicsHdcProvider.GetHdc() => _event.GetHDC();
System\Windows\Forms\Rendering\FontCache.Data.cs (1)
39HDC hdc = screenDC.HDC;
System\Windows\Forms\Rendering\GdiCache.cs (3)
19/// Gets an <see cref="HDC"/> based off of the primary display. 26/// When disposed the <see cref="HDC"/> will be returned to the cache. Do NOT change the state of the 43/// When disposed the <see cref="Graphics"/> object will be disposed and the underlying <see cref="HDC"/>
System\Windows\Forms\Rendering\PaintEventArgs.cs (6)
49HDC hdc = e.HDC; 68HDC hdc, 132internal HDC HDC => _event.HDC; 135HDC IHdcContext.GetHdc() => (HDC)((IDeviceContext)this).GetHdc(); 139HDC IGraphicsHdcProvider.GetHdc() => _event.GetHDC();
System\Windows\Forms\Rendering\ScreenDcCache.cs (5)
51return new ScreenDcScope(this, (HDC)item); 62private void Release(HDC hdc) 80PInvokeCore.DeleteDC((HDC)temp); 92PInvokeCore.DeleteDC((HDC)hdc); 98private static unsafe void ValidateHdc(HDC hdc)
System\Windows\Forms\Rendering\ScreenDcCache.ScreenDcScope.cs (3)
17public HDC HDC { get; } 20public ScreenDcScope(ScreenDcCache cache, HDC hdc) 26public static implicit operator HDC(in ScreenDcScope scope) => scope.HDC;
System\Windows\Forms\Rendering\TextExtensions.cs (4)
50this HDC hdc, 152this HDC hdc, 211this HDC hdc, 282public static unsafe Size GetTextExtent(this HDC hdc, string? text, HFONT hfont)
System\Windows\Forms\Rendering\TextRenderer.cs (5)
330HDC hdc = e.HDC; 346HDC hdc, 356HDC hdc, 656/// The <see cref="HDC"/> to get the font from if <paramref name="font"/> is <see langword="null"/>. 658private static FontCache.Scope GetFontOrHdcHFONT(Font? font, FONT_QUALITY quality, HDC hdc)
System\Windows\Forms\Screen.cs (3)
54internal unsafe Screen(HMONITOR monitor, HDC hdc) 56HDC screenDC = hdc; 109PInvokeCore.EnumDisplayMonitors((HMONITOR hmonitor, HDC hdc) =>
System\Windows\Forms\Scrolling\ScrollBar.cs (1)
492internal override HBRUSH InitializeDCForWmCtlColor(HDC dc, MessageId msg) => default;
System\Windows\Forms\VisualStyles\VisualStyleRenderer.cs (6)
219internal unsafe void DrawBackground(HDC dc, Rectangle bounds, HWND hwnd = default) 248internal unsafe void DrawBackground(HDC dc, Rectangle bounds, Rectangle clipRectangle, HWND hwnd) 275internal unsafe Rectangle DrawEdge(HDC dc, Rectangle bounds, Edges edges, EdgeStyle style, EdgeEffects effects) 379internal void DrawText(HDC dc, Rectangle bounds, string? textToDraw, bool drawDisabled, TextFormatFlags flags) 413internal Rectangle GetBackgroundContentRectangle(HDC dc, Rectangle bounds) 579internal unsafe Size GetPartSize(HDC dc, ThemeSizeType type, HWND hwnd = default)
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\ControlDesigner.cs (1)
2041using Graphics g = Graphics.FromHdc((HDC)m.WParamInternal);
System.Windows.Forms.Primitives (196)
System\Windows\Forms\DeviceContextExtensions.cs (10)
26this HDC hdc, 43internal static void FillRectangle(this HDC hdc, Rectangle rectangle, HBRUSH hbrush) 56internal static void DrawLine(this HDC hdc, HPEN hpen, Point p1, Point p2) => 62internal static void DrawLine(this HDC hdc, HPEN hpen, int x1, int y1, int x2, int y2) => 80internal static unsafe void DrawLines(this HDC hdc, HPEN hpen, ReadOnlySpan<int> lines) 101/// Calls <see cref="PInvoke.GetNearestColor(HDC, COLORREF)"/> to get the nearest color for the given 117internal static Color FindNearestColor(this HDC hdc, Color color) 123internal static Graphics CreateGraphics(this HDC hdc) => Graphics.FromHdcInternal(hdc); 135this HDC hdc, 152internal static void FillRectangle(this HDC hdc, HBRUSH hbrush, Rectangle rectangle)
System\Windows\Forms\DeviceContextExtensions.IDeviceContextAdapter.cs (2)
14public HDC GetHdc() => (HDC)_deviceContext.GetHdc();
Windows.Win32.DRAWITEMSTRUCT.g.cs (1)
66 internal winmdroot.Graphics.Gdi.HDC hDC;
Windows.Win32.IFont.g.cs (5)
832 private static winmdroot.Foundation.HRESULT SetHdc(IFont* pThis, winmdroot.Graphics.Gdi.HDC hDC) 859 public void SetHdc(winmdroot.Graphics.Gdi.HDC hDC) 861 ((delegate *unmanaged [Stdcall]<IFont*,winmdroot.Graphics.Gdi.HDC ,winmdroot.Foundation.HRESULT>)lpVtbl[26])((IFont*)Unsafe.AsPointer(ref this), hDC).ThrowOnFailure(); 937 internal delegate *unmanaged [Stdcall]<IFont*,winmdroot.Graphics.Gdi.HDC ,winmdroot.Foundation.HRESULT> SetHdc_27; 1058winmdroot.Foundation.HRESULT SetHdc(winmdroot.Graphics.Gdi.HDC hDC);
Windows.Win32.IViewObject.g.cs (21)
55 /// <inheritdoc cref="Draw(winmdroot.System.Com.DVASPECT, int, void*, winmdroot.System.Com.DVTARGETDEVICE*, winmdroot.Graphics.Gdi.HDC, winmdroot.Graphics.Gdi.HDC, winmdroot.Foundation.RECTL*, winmdroot.Foundation.RECTL*, nint, nuint)"/> 56 internal unsafe void Draw(winmdroot.System.Com.DVASPECT dwDrawAspect, int lindex, void* pvAspect, winmdroot.System.Com.DVTARGETDEVICE* ptd, winmdroot.Graphics.Gdi.HDC hdcTargetDev, winmdroot.Graphics.Gdi.HDC hdcDraw, winmdroot.Foundation.RECTL? lprcBounds, winmdroot.Foundation.RECTL? lprcWBounds, nint pfnContinue, nuint dwContinue) 66 private static winmdroot.Foundation.HRESULT Draw(IViewObject* pThis, winmdroot.System.Com.DVASPECT dwDrawAspect, int lindex, void* pvAspect, [Optional] winmdroot.System.Com.DVTARGETDEVICE* ptd, winmdroot.Graphics.Gdi.HDC hdcTargetDev, winmdroot.Graphics.Gdi.HDC hdcDraw, [Optional] winmdroot.Foundation.RECTL* lprcBounds, [Optional] winmdroot.Foundation.RECTL* lprcWBounds, nint pfnContinue, nuint dwContinue) 106 public unsafe void Draw(winmdroot.System.Com.DVASPECT dwDrawAspect, int lindex, void* pvAspect, [Optional] winmdroot.System.Com.DVTARGETDEVICE* ptd, winmdroot.Graphics.Gdi.HDC hdcTargetDev, winmdroot.Graphics.Gdi.HDC hdcDraw, [Optional] winmdroot.Foundation.RECTL* lprcBounds, [Optional] winmdroot.Foundation.RECTL* lprcWBounds, nint pfnContinue, nuint dwContinue) 108 ((delegate *unmanaged [Stdcall]<IViewObject*,winmdroot.System.Com.DVASPECT ,int ,void* ,winmdroot.System.Com.DVTARGETDEVICE* ,winmdroot.Graphics.Gdi.HDC ,winmdroot.Graphics.Gdi.HDC ,winmdroot.Foundation.RECTL* ,winmdroot.Foundation.RECTL* ,nint ,nuint ,winmdroot.Foundation.HRESULT>)lpVtbl[3])((IViewObject*)Unsafe.AsPointer(ref this), dwDrawAspect, lindex, pvAspect, ptd, hdcTargetDev, hdcDraw, lprcBounds, lprcWBounds, pfnContinue, dwContinue).ThrowOnFailure(); 111 /// <inheritdoc cref="GetColorSet(winmdroot.System.Com.DVASPECT, int, void*, winmdroot.System.Com.DVTARGETDEVICE*, winmdroot.Graphics.Gdi.HDC, winmdroot.Graphics.Gdi.LOGPALETTE**)"/> 112 internal unsafe void GetColorSet(winmdroot.System.Com.DVASPECT dwDrawAspect, int lindex, void* pvAspect, winmdroot.System.Com.DVTARGETDEVICE* ptd, winmdroot.Graphics.Gdi.HDC hicTargetDev, out winmdroot.Graphics.Gdi.LOGPALETTE* ppColorSet) 123 private static winmdroot.Foundation.HRESULT GetColorSet(IViewObject* pThis, winmdroot.System.Com.DVASPECT dwDrawAspect, int lindex, void* pvAspect, [Optional] winmdroot.System.Com.DVTARGETDEVICE* ptd, winmdroot.Graphics.Gdi.HDC hicTargetDev, winmdroot.Graphics.Gdi.LOGPALETTE** ppColorSet) 155 public unsafe void GetColorSet(winmdroot.System.Com.DVASPECT dwDrawAspect, int lindex, void* pvAspect, [Optional] winmdroot.System.Com.DVTARGETDEVICE* ptd, winmdroot.Graphics.Gdi.HDC hicTargetDev, winmdroot.Graphics.Gdi.LOGPALETTE** ppColorSet) 157 ((delegate *unmanaged [Stdcall]<IViewObject*,winmdroot.System.Com.DVASPECT ,int ,void* ,winmdroot.System.Com.DVTARGETDEVICE* ,winmdroot.Graphics.Gdi.HDC ,winmdroot.Graphics.Gdi.LOGPALETTE** ,winmdroot.Foundation.HRESULT>)lpVtbl[4])((IViewObject*)Unsafe.AsPointer(ref this), dwDrawAspect, lindex, pvAspect, ptd, hicTargetDev, ppColorSet).ThrowOnFailure(); 342 internal delegate *unmanaged [Stdcall]<IViewObject*,winmdroot.System.Com.DVASPECT ,int ,void* ,winmdroot.System.Com.DVTARGETDEVICE* ,winmdroot.Graphics.Gdi.HDC ,winmdroot.Graphics.Gdi.HDC ,winmdroot.Foundation.RECTL* ,winmdroot.Foundation.RECTL* ,nint ,nuint ,winmdroot.Foundation.HRESULT> Draw_4; 344 internal delegate *unmanaged [Stdcall]<IViewObject*,winmdroot.System.Com.DVASPECT ,int ,void* ,winmdroot.System.Com.DVTARGETDEVICE* ,winmdroot.Graphics.Gdi.HDC ,winmdroot.Graphics.Gdi.LOGPALETTE** ,winmdroot.Foundation.HRESULT> GetColorSet_5; 384 unsafe winmdroot.Foundation.HRESULT Draw(winmdroot.System.Com.DVASPECT dwDrawAspect, int lindex, void* pvAspect, [Optional] winmdroot.System.Com.DVTARGETDEVICE* ptd, winmdroot.Graphics.Gdi.HDC hdcTargetDev, winmdroot.Graphics.Gdi.HDC hdcDraw, [Optional] winmdroot.Foundation.RECTL* lprcBounds, [Optional] winmdroot.Foundation.RECTL* lprcWBounds, nint pfnContinue, nuint dwContinue); 387 unsafe winmdroot.Foundation.HRESULT GetColorSet(winmdroot.System.Com.DVASPECT dwDrawAspect, int lindex, void* pvAspect, [Optional] winmdroot.System.Com.DVTARGETDEVICE* ptd, winmdroot.Graphics.Gdi.HDC hicTargetDev, winmdroot.Graphics.Gdi.LOGPALETTE** ppColorSet);
Windows.Win32.IViewObject2.g.cs (21)
55 /// <inheritdoc cref="Draw(winmdroot.System.Com.DVASPECT, int, void*, winmdroot.System.Com.DVTARGETDEVICE*, winmdroot.Graphics.Gdi.HDC, winmdroot.Graphics.Gdi.HDC, winmdroot.Foundation.RECTL*, winmdroot.Foundation.RECTL*, nint, nuint)"/> 56 internal unsafe void Draw(winmdroot.System.Com.DVASPECT dwDrawAspect, int lindex, void* pvAspect, winmdroot.System.Com.DVTARGETDEVICE* ptd, winmdroot.Graphics.Gdi.HDC hdcTargetDev, winmdroot.Graphics.Gdi.HDC hdcDraw, winmdroot.Foundation.RECTL? lprcBounds, winmdroot.Foundation.RECTL? lprcWBounds, nint pfnContinue, nuint dwContinue) 66 private static winmdroot.Foundation.HRESULT Draw(IViewObject2* pThis, winmdroot.System.Com.DVASPECT dwDrawAspect, int lindex, void* pvAspect, [Optional] winmdroot.System.Com.DVTARGETDEVICE* ptd, winmdroot.Graphics.Gdi.HDC hdcTargetDev, winmdroot.Graphics.Gdi.HDC hdcDraw, [Optional] winmdroot.Foundation.RECTL* lprcBounds, [Optional] winmdroot.Foundation.RECTL* lprcWBounds, nint pfnContinue, nuint dwContinue) 83 public unsafe void Draw(winmdroot.System.Com.DVASPECT dwDrawAspect, int lindex, void* pvAspect, [Optional] winmdroot.System.Com.DVTARGETDEVICE* ptd, winmdroot.Graphics.Gdi.HDC hdcTargetDev, winmdroot.Graphics.Gdi.HDC hdcDraw, [Optional] winmdroot.Foundation.RECTL* lprcBounds, [Optional] winmdroot.Foundation.RECTL* lprcWBounds, nint pfnContinue, nuint dwContinue) 85 ((delegate *unmanaged [Stdcall]<IViewObject2*,winmdroot.System.Com.DVASPECT ,int ,void* ,winmdroot.System.Com.DVTARGETDEVICE* ,winmdroot.Graphics.Gdi.HDC ,winmdroot.Graphics.Gdi.HDC ,winmdroot.Foundation.RECTL* ,winmdroot.Foundation.RECTL* ,nint ,nuint ,winmdroot.Foundation.HRESULT>)lpVtbl[3])((IViewObject2*)Unsafe.AsPointer(ref this), dwDrawAspect, lindex, pvAspect, ptd, hdcTargetDev, hdcDraw, lprcBounds, lprcWBounds, pfnContinue, dwContinue).ThrowOnFailure(); 88 /// <inheritdoc cref="GetColorSet(winmdroot.System.Com.DVASPECT, int, void*, winmdroot.System.Com.DVTARGETDEVICE*, winmdroot.Graphics.Gdi.HDC, winmdroot.Graphics.Gdi.LOGPALETTE**)"/> 89 internal unsafe void GetColorSet(winmdroot.System.Com.DVASPECT dwDrawAspect, int lindex, void* pvAspect, winmdroot.System.Com.DVTARGETDEVICE* ptd, winmdroot.Graphics.Gdi.HDC hicTargetDev, out winmdroot.Graphics.Gdi.LOGPALETTE* ppColorSet) 100 private static winmdroot.Foundation.HRESULT GetColorSet(IViewObject2* pThis, winmdroot.System.Com.DVASPECT dwDrawAspect, int lindex, void* pvAspect, [Optional] winmdroot.System.Com.DVTARGETDEVICE* ptd, winmdroot.Graphics.Gdi.HDC hicTargetDev, winmdroot.Graphics.Gdi.LOGPALETTE** ppColorSet) 117 public unsafe void GetColorSet(winmdroot.System.Com.DVASPECT dwDrawAspect, int lindex, void* pvAspect, [Optional] winmdroot.System.Com.DVTARGETDEVICE* ptd, winmdroot.Graphics.Gdi.HDC hicTargetDev, winmdroot.Graphics.Gdi.LOGPALETTE** ppColorSet) 119 ((delegate *unmanaged [Stdcall]<IViewObject2*,winmdroot.System.Com.DVASPECT ,int ,void* ,winmdroot.System.Com.DVTARGETDEVICE* ,winmdroot.Graphics.Gdi.HDC ,winmdroot.Graphics.Gdi.LOGPALETTE** ,winmdroot.Foundation.HRESULT>)lpVtbl[4])((IViewObject2*)Unsafe.AsPointer(ref this), dwDrawAspect, lindex, pvAspect, ptd, hicTargetDev, ppColorSet).ThrowOnFailure(); 306 internal delegate *unmanaged [Stdcall]<IViewObject2*,winmdroot.System.Com.DVASPECT ,int ,void* ,winmdroot.System.Com.DVTARGETDEVICE* ,winmdroot.Graphics.Gdi.HDC ,winmdroot.Graphics.Gdi.HDC ,winmdroot.Foundation.RECTL* ,winmdroot.Foundation.RECTL* ,nint ,nuint ,winmdroot.Foundation.HRESULT> Draw_4; 308 internal delegate *unmanaged [Stdcall]<IViewObject2*,winmdroot.System.Com.DVASPECT ,int ,void* ,winmdroot.System.Com.DVTARGETDEVICE* ,winmdroot.Graphics.Gdi.HDC ,winmdroot.Graphics.Gdi.LOGPALETTE** ,winmdroot.Foundation.HRESULT> GetColorSet_5; 351 unsafe new winmdroot.Foundation.HRESULT Draw(winmdroot.System.Com.DVASPECT dwDrawAspect, int lindex, void* pvAspect, [Optional] winmdroot.System.Com.DVTARGETDEVICE* ptd, winmdroot.Graphics.Gdi.HDC hdcTargetDev, winmdroot.Graphics.Gdi.HDC hdcDraw, [Optional] winmdroot.Foundation.RECTL* lprcBounds, [Optional] winmdroot.Foundation.RECTL* lprcWBounds, nint pfnContinue, nuint dwContinue); 354 unsafe new winmdroot.Foundation.HRESULT GetColorSet(winmdroot.System.Com.DVASPECT dwDrawAspect, int lindex, void* pvAspect, [Optional] winmdroot.System.Com.DVTARGETDEVICE* ptd, winmdroot.Graphics.Gdi.HDC hicTargetDev, winmdroot.Graphics.Gdi.LOGPALETTE** ppColorSet);
Windows.Win32.NMCUSTOMDRAW.g.cs (1)
40 internal winmdroot.Graphics.Gdi.HDC hdc;
Windows.Win32.PInvoke.COMCTL32.dll.g.cs (2)
125 internal static extern winmdroot.Foundation.BOOL ImageList_Draw(winmdroot.UI.Controls.HIMAGELIST himl, int i, winmdroot.Graphics.Gdi.HDC hdcDst, int x, int y, winmdroot.UI.Controls.IMAGE_LIST_DRAW_STYLE fStyle); 165 internal static extern winmdroot.Foundation.BOOL ImageList_DrawEx(winmdroot.UI.Controls.HIMAGELIST himl, int i, winmdroot.Graphics.Gdi.HDC hdcDst, int x, int y, int dx, int dy, winmdroot.Foundation.COLORREF rgbBk, winmdroot.Foundation.COLORREF rgbFg, winmdroot.UI.Controls.IMAGE_LIST_DRAW_STYLE fStyle);
Windows.Win32.PInvoke.GDI32.dll.g.cs (48)
61 internal static extern winmdroot.Graphics.Gdi.HPALETTE CreateHalftonePalette(winmdroot.Graphics.Gdi.HDC hdc); 101 internal static extern winmdroot.Foundation.BOOL Ellipse(winmdroot.Graphics.Gdi.HDC hdc, int left, int top, int right, int bottom); 103 /// <inheritdoc cref="ExtTextOut(winmdroot.Graphics.Gdi.HDC, int, int, winmdroot.Graphics.Gdi.ETO_OPTIONS, winmdroot.Foundation.RECT*, winmdroot.Foundation.PCWSTR, uint, int*)"/> 105 internal static unsafe winmdroot.Foundation.BOOL ExtTextOut(winmdroot.Graphics.Gdi.HDC hdc, int x, int y, winmdroot.Graphics.Gdi.ETO_OPTIONS options, winmdroot.Foundation.RECT? lprect, string lpString, ReadOnlySpan<int> lpDx) 141 internal static extern unsafe winmdroot.Foundation.BOOL ExtTextOut(winmdroot.Graphics.Gdi.HDC hdc, int x, int y, winmdroot.Graphics.Gdi.ETO_OPTIONS options, [Optional] winmdroot.Foundation.RECT* lprect, winmdroot.Foundation.PCWSTR lpString, uint c, [Optional] int* lpDx); 167 internal static extern winmdroot.Foundation.COLORREF GetBkColor(winmdroot.Graphics.Gdi.HDC hdc); 178 internal static winmdroot.Graphics.Gdi.BACKGROUND_MODE GetBkMode(winmdroot.Graphics.Gdi.HDC hdc) 184 static extern int LocalExternFunction(winmdroot.Graphics.Gdi.HDC hdc); 187 /// <inheritdoc cref="GetBrushOrgEx(winmdroot.Graphics.Gdi.HDC, global::System.Drawing.Point*)"/> 189 internal static unsafe winmdroot.Foundation.BOOL GetBrushOrgEx(winmdroot.Graphics.Gdi.HDC hdc, out global::System.Drawing.Point lppt) 210 internal static extern unsafe winmdroot.Foundation.BOOL GetBrushOrgEx(winmdroot.Graphics.Gdi.HDC hdc, global::System.Drawing.Point* lppt); 212 /// <inheritdoc cref="GetClipBox(winmdroot.Graphics.Gdi.HDC, winmdroot.Foundation.RECT*)"/> 214 internal static unsafe winmdroot.Graphics.Gdi.GDI_REGION_TYPE GetClipBox(winmdroot.Graphics.Gdi.HDC hdc, out winmdroot.Foundation.RECT lprect) 235 internal static extern unsafe winmdroot.Graphics.Gdi.GDI_REGION_TYPE GetClipBox(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Foundation.RECT* lprect); 247 internal static extern int GetClipRgn(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Graphics.Gdi.HRGN hrgn); 257 internal static winmdroot.Graphics.Gdi.HGDIOBJ GetCurrentObject(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Graphics.Gdi.OBJ_TYPE type) 263 static extern winmdroot.Graphics.Gdi.HGDIOBJ LocalExternFunction(winmdroot.Graphics.Gdi.HDC hdc, uint type); 285 internal static extern unsafe int GetDIBits(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Graphics.Gdi.HBITMAP hbm, uint start, uint cLines, [Optional] void* lpvBits, winmdroot.Graphics.Gdi.BITMAPINFO* lpbmi, winmdroot.Graphics.Gdi.DIB_USAGE usage); 299 internal static extern winmdroot.Graphics.Gdi.HDC_MAP_MODE GetMapMode(winmdroot.Graphics.Gdi.HDC hdc); 312 internal static extern winmdroot.Foundation.COLORREF GetNearestColor(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Foundation.COLORREF color); 351 internal static extern winmdroot.Graphics.Gdi.R2_MODE GetROP2(winmdroot.Graphics.Gdi.HDC hdc); 353 /// <inheritdoc cref="GetSystemPaletteEntries(winmdroot.Graphics.Gdi.HDC, uint, uint, winmdroot.Graphics.Gdi.PALETTEENTRY*)"/> 355 internal static unsafe uint GetSystemPaletteEntries(winmdroot.Graphics.Gdi.HDC hdc, uint iStart, Span<winmdroot.Graphics.Gdi.PALETTEENTRY> pPalEntries) 375 internal static extern unsafe uint GetSystemPaletteEntries(winmdroot.Graphics.Gdi.HDC hdc, uint iStart, uint cEntries, [Optional] winmdroot.Graphics.Gdi.PALETTEENTRY* pPalEntries); 390 internal static extern winmdroot.Graphics.Gdi.TEXT_ALIGN_OPTIONS GetTextAlign(winmdroot.Graphics.Gdi.HDC hdc); 400 internal static extern winmdroot.Foundation.COLORREF GetTextColor(winmdroot.Graphics.Gdi.HDC hdc); 402 /// <inheritdoc cref="GetTextExtentPoint32W(winmdroot.Graphics.Gdi.HDC, winmdroot.Foundation.PCWSTR, int, winmdroot.Foundation.SIZE*)"/> 404 internal static unsafe winmdroot.Foundation.BOOL GetTextExtentPoint32W(winmdroot.Graphics.Gdi.HDC hdc, string lpString, int c, out winmdroot.Foundation.SIZE psizl) 431 internal static extern unsafe winmdroot.Foundation.BOOL GetTextExtentPoint32W(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Foundation.PCWSTR lpString, int c, winmdroot.Foundation.SIZE* psizl); 433 /// <inheritdoc cref="GetTextMetrics(winmdroot.Graphics.Gdi.HDC, winmdroot.Graphics.Gdi.TEXTMETRICW*)"/> 435 internal static unsafe winmdroot.Foundation.BOOL GetTextMetrics(winmdroot.Graphics.Gdi.HDC hdc, out winmdroot.Graphics.Gdi.TEXTMETRICW lptm) 453 internal static extern unsafe winmdroot.Foundation.BOOL GetTextMetrics(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Graphics.Gdi.TEXTMETRICW* lptm); 455 /// <inheritdoc cref="GetViewportExtEx(winmdroot.Graphics.Gdi.HDC, winmdroot.Foundation.SIZE*)"/> 457 internal static unsafe winmdroot.Foundation.BOOL GetViewportExtEx(winmdroot.Graphics.Gdi.HDC hdc, out winmdroot.Foundation.SIZE lpsize) 477 internal static extern unsafe winmdroot.Foundation.BOOL GetViewportExtEx(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Foundation.SIZE* lpsize); 495 internal static extern winmdroot.Graphics.Gdi.GDI_REGION_TYPE IntersectClipRect(winmdroot.Graphics.Gdi.HDC hdc, int left, int top, int right, int bottom); 510 internal static extern winmdroot.Foundation.BOOL LineTo(winmdroot.Graphics.Gdi.HDC hdc, int x, int y); 512 /// <inheritdoc cref="LPtoDP(winmdroot.Graphics.Gdi.HDC, global::System.Drawing.Point*, int)"/> 514 internal static unsafe winmdroot.Foundation.BOOL LPtoDP(winmdroot.Graphics.Gdi.HDC hdc, ReadOnlySpan<global::System.Drawing.Point> lppt) 536 internal static extern unsafe winmdroot.Foundation.BOOL LPtoDP(winmdroot.Graphics.Gdi.HDC hdc, global::System.Drawing.Point* lppt, int c); 549 internal static extern unsafe winmdroot.Foundation.BOOL MoveToEx(winmdroot.Graphics.Gdi.HDC hdc, int x, int y, [Optional] global::System.Drawing.Point* lppt); 567 internal static extern winmdroot.Foundation.BOOL PatBlt(winmdroot.Graphics.Gdi.HDC hdc, int x, int y, int w, int h, winmdroot.Graphics.Gdi.ROP_CODE rop); 583 internal static extern winmdroot.Foundation.BOOL RoundRect(winmdroot.Graphics.Gdi.HDC hdc, int left, int top, int right, int bottom, int width, int height); 600 internal static extern unsafe winmdroot.Foundation.BOOL SetViewportExtEx(winmdroot.Graphics.Gdi.HDC hdc, int x, int y, [Optional] winmdroot.Foundation.SIZE* lpsz); 618 internal static extern unsafe winmdroot.Foundation.BOOL SetViewportOrgEx(winmdroot.Graphics.Gdi.HDC hdc, int x, int y, [Optional] global::System.Drawing.Point* lppt); 635 internal static extern unsafe winmdroot.Foundation.BOOL SetWindowExtEx(winmdroot.Graphics.Gdi.HDC hdc, int x, int y, [Optional] winmdroot.Foundation.SIZE* lpsz); 653 internal static extern unsafe winmdroot.Foundation.BOOL SetWindowOrgEx(winmdroot.Graphics.Gdi.HDC hdc, int x, int y, [Optional] global::System.Drawing.Point* lppt); 679 internal static extern unsafe int StretchDIBits(winmdroot.Graphics.Gdi.HDC hdc, int xDest, int yDest, int DestWidth, int DestHeight, int xSrc, int ySrc, int SrcWidth, int SrcHeight, [Optional] void* lpBits, winmdroot.Graphics.Gdi.BITMAPINFO* lpbmi, winmdroot.Graphics.Gdi.DIB_USAGE iUsage, winmdroot.Graphics.Gdi.ROP_CODE rop);
Windows.Win32.PInvoke.USER32.dll.g.cs (16)
663 /// <inheritdoc cref="DrawEdge(winmdroot.Graphics.Gdi.HDC, winmdroot.Foundation.RECT*, winmdroot.Graphics.Gdi.DRAWEDGE_FLAGS, winmdroot.Graphics.Gdi.DRAW_EDGE_FLAGS)"/> 665 internal static unsafe winmdroot.Foundation.BOOL DrawEdge(winmdroot.Graphics.Gdi.HDC hdc, ref winmdroot.Foundation.RECT qrc, winmdroot.Graphics.Gdi.DRAWEDGE_FLAGS edge, winmdroot.Graphics.Gdi.DRAW_EDGE_FLAGS grfFlags) 691 internal static extern unsafe winmdroot.Foundation.BOOL DrawEdge(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Foundation.RECT* qrc, winmdroot.Graphics.Gdi.DRAWEDGE_FLAGS edge, winmdroot.Graphics.Gdi.DRAW_EDGE_FLAGS grfFlags); 693 /// <inheritdoc cref="DrawFrameControl(winmdroot.Graphics.Gdi.HDC, winmdroot.Foundation.RECT*, winmdroot.Graphics.Gdi.DFC_TYPE, winmdroot.Graphics.Gdi.DFCS_STATE)"/> 695 internal static unsafe winmdroot.Foundation.BOOL DrawFrameControl(winmdroot.Graphics.Gdi.HDC param0, ref winmdroot.Foundation.RECT param1, winmdroot.Graphics.Gdi.DFC_TYPE param2, winmdroot.Graphics.Gdi.DFCS_STATE param3) 714 internal static extern unsafe winmdroot.Foundation.BOOL DrawFrameControl(winmdroot.Graphics.Gdi.HDC param0, winmdroot.Foundation.RECT* param1, winmdroot.Graphics.Gdi.DFC_TYPE param2, winmdroot.Graphics.Gdi.DFCS_STATE param3); 739 /// <inheritdoc cref="DrawText(winmdroot.Graphics.Gdi.HDC, winmdroot.Foundation.PCWSTR, int, winmdroot.Foundation.RECT*, winmdroot.Graphics.Gdi.DRAW_TEXT_FORMAT)"/> 741 internal static unsafe int DrawText(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Foundation.PCWSTR lpchText, int cchText, ref winmdroot.Foundation.RECT lprc, winmdroot.Graphics.Gdi.DRAW_TEXT_FORMAT format) 769 internal static extern unsafe int DrawText(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Foundation.PCWSTR lpchText, int cchText, winmdroot.Foundation.RECT* lprc, winmdroot.Graphics.Gdi.DRAW_TEXT_FORMAT format); 771 /// <inheritdoc cref="DrawTextEx(winmdroot.Graphics.Gdi.HDC, winmdroot.Foundation.PWSTR, int, winmdroot.Foundation.RECT*, winmdroot.Graphics.Gdi.DRAW_TEXT_FORMAT, winmdroot.Graphics.Gdi.DRAWTEXTPARAMS*)"/> 773 internal static unsafe int DrawTextEx(winmdroot.Graphics.Gdi.HDC hdc, ref Span<char>lpchText, int cchText, ref winmdroot.Foundation.RECT lprc, winmdroot.Graphics.Gdi.DRAW_TEXT_FORMAT format, winmdroot.Graphics.Gdi.DRAWTEXTPARAMS? lpdtp) 809 internal static extern unsafe int DrawTextEx(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Foundation.PWSTR lpchText, int cchText, winmdroot.Foundation.RECT* lprc, winmdroot.Graphics.Gdi.DRAW_TEXT_FORMAT format, [Optional] winmdroot.Graphics.Gdi.DRAWTEXTPARAMS* lpdtp); 942 /// <inheritdoc cref="FillRect(winmdroot.Graphics.Gdi.HDC, winmdroot.Foundation.RECT*, winmdroot.Graphics.Gdi.HBRUSH)"/> 944 internal static unsafe int FillRect(winmdroot.Graphics.Gdi.HDC hDC, in winmdroot.Foundation.RECT lprc, winmdroot.Graphics.Gdi.HBRUSH hbr) 968 internal static extern unsafe int FillRect(winmdroot.Graphics.Gdi.HDC hDC, winmdroot.Foundation.RECT* lprc, winmdroot.Graphics.Gdi.HBRUSH hbr); 2714 internal static extern int ReleaseDC(winmdroot.Foundation.HWND hWnd, winmdroot.Graphics.Gdi.HDC hDC);
Windows.Win32.PInvoke.UXTHEME.dll.g.cs (40)
39 /// <inheritdoc cref="DrawThemeBackground(winmdroot.UI.Controls.HTHEME, winmdroot.Graphics.Gdi.HDC, int, int, winmdroot.Foundation.RECT*, winmdroot.Foundation.RECT*)"/> 41 internal static unsafe winmdroot.Foundation.HRESULT DrawThemeBackground(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, in winmdroot.Foundation.RECT pRect, winmdroot.Foundation.RECT? pClipRect) 82 internal static extern unsafe winmdroot.Foundation.HRESULT DrawThemeBackground(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, winmdroot.Foundation.RECT* pRect, [Optional] winmdroot.Foundation.RECT* pClipRect); 84 /// <inheritdoc cref="DrawThemeEdge(winmdroot.UI.Controls.HTHEME, winmdroot.Graphics.Gdi.HDC, int, int, winmdroot.Foundation.RECT*, winmdroot.Graphics.Gdi.DRAWEDGE_FLAGS, winmdroot.Graphics.Gdi.DRAW_EDGE_FLAGS, winmdroot.Foundation.RECT*)"/> 86 internal static unsafe winmdroot.Foundation.HRESULT DrawThemeEdge(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, in winmdroot.Foundation.RECT pDestRect, winmdroot.Graphics.Gdi.DRAWEDGE_FLAGS uEdge, winmdroot.Graphics.Gdi.DRAW_EDGE_FLAGS uFlags, winmdroot.Foundation.RECT* pContentRect) 134 internal static extern unsafe winmdroot.Foundation.HRESULT DrawThemeEdge(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, winmdroot.Foundation.RECT* pDestRect, winmdroot.Graphics.Gdi.DRAWEDGE_FLAGS uEdge, winmdroot.Graphics.Gdi.DRAW_EDGE_FLAGS uFlags, [Optional] winmdroot.Foundation.RECT* pContentRect); 136 /// <inheritdoc cref="DrawThemeParentBackground(winmdroot.Foundation.HWND, winmdroot.Graphics.Gdi.HDC, winmdroot.Foundation.RECT*)"/> 138 internal static unsafe winmdroot.Foundation.HRESULT DrawThemeParentBackground(winmdroot.Foundation.HWND hwnd, winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Foundation.RECT? prc) 166 internal static extern unsafe winmdroot.Foundation.HRESULT DrawThemeParentBackground(winmdroot.Foundation.HWND hwnd, winmdroot.Graphics.Gdi.HDC hdc, [Optional] winmdroot.Foundation.RECT* prc); 168 /// <inheritdoc cref="DrawThemeText(winmdroot.UI.Controls.HTHEME, winmdroot.Graphics.Gdi.HDC, int, int, winmdroot.Foundation.PCWSTR, int, winmdroot.Graphics.Gdi.DRAW_TEXT_FORMAT, uint, winmdroot.Foundation.RECT*)"/> 170 internal static unsafe winmdroot.Foundation.HRESULT DrawThemeText(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, string pszText, int cchText, winmdroot.Graphics.Gdi.DRAW_TEXT_FORMAT dwTextFlags, uint dwTextFlags2, in winmdroot.Foundation.RECT pRect) 225 internal static extern unsafe winmdroot.Foundation.HRESULT DrawThemeText(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, winmdroot.Foundation.PCWSTR pszText, int cchText, winmdroot.Graphics.Gdi.DRAW_TEXT_FORMAT dwTextFlags, uint dwTextFlags2, winmdroot.Foundation.RECT* pRect); 275 /// <inheritdoc cref="GetThemeBackgroundContentRect(winmdroot.UI.Controls.HTHEME, winmdroot.Graphics.Gdi.HDC, int, int, winmdroot.Foundation.RECT*, winmdroot.Foundation.RECT*)"/> 277 internal static unsafe winmdroot.Foundation.HRESULT GetThemeBackgroundContentRect(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, in winmdroot.Foundation.RECT pBoundingRect, out winmdroot.Foundation.RECT pContentRect) 320 internal static extern unsafe winmdroot.Foundation.HRESULT GetThemeBackgroundContentRect(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, winmdroot.Foundation.RECT* pBoundingRect, winmdroot.Foundation.RECT* pContentRect); 322 /// <inheritdoc cref="GetThemeBackgroundExtent(winmdroot.UI.Controls.HTHEME, winmdroot.Graphics.Gdi.HDC, int, int, winmdroot.Foundation.RECT*, winmdroot.Foundation.RECT*)"/> 324 internal static unsafe winmdroot.Foundation.HRESULT GetThemeBackgroundExtent(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, in winmdroot.Foundation.RECT pContentRect, out winmdroot.Foundation.RECT pExtentRect) 367 internal static extern unsafe winmdroot.Foundation.HRESULT GetThemeBackgroundExtent(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, winmdroot.Foundation.RECT* pContentRect, winmdroot.Foundation.RECT* pExtentRect); 369 /// <inheritdoc cref="GetThemeBackgroundRegion(winmdroot.UI.Controls.HTHEME, winmdroot.Graphics.Gdi.HDC, int, int, winmdroot.Foundation.RECT*, winmdroot.Graphics.Gdi.HRGN*)"/> 371 internal static unsafe winmdroot.Foundation.HRESULT GetThemeBackgroundRegion(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, in winmdroot.Foundation.RECT pRect, winmdroot.Graphics.Gdi.HRGN* pRegion) 411 internal static extern unsafe winmdroot.Foundation.HRESULT GetThemeBackgroundRegion(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, winmdroot.Foundation.RECT* pRect, winmdroot.Graphics.Gdi.HRGN* pRegion); 631 /// <inheritdoc cref="GetThemeFont(winmdroot.UI.Controls.HTHEME, winmdroot.Graphics.Gdi.HDC, int, int, int, winmdroot.Graphics.Gdi.LOGFONTW*)"/> 633 internal static unsafe winmdroot.Foundation.HRESULT GetThemeFont(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, int iPropId, out winmdroot.Graphics.Gdi.LOGFONTW pFont) 676 internal static extern unsafe winmdroot.Foundation.HRESULT GetThemeFont(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, int iPropId, winmdroot.Graphics.Gdi.LOGFONTW* pFont); 726 /// <inheritdoc cref="GetThemeMargins(winmdroot.UI.Controls.HTHEME, winmdroot.Graphics.Gdi.HDC, int, int, winmdroot.UI.Controls.THEME_PROPERTY_SYMBOL_ID, winmdroot.Foundation.RECT*, winmdroot.UI.Controls.MARGINS*)"/> 728 internal static unsafe winmdroot.Foundation.HRESULT GetThemeMargins(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, winmdroot.UI.Controls.THEME_PROPERTY_SYMBOL_ID iPropId, winmdroot.Foundation.RECT? prc, out winmdroot.UI.Controls.MARGINS pMargins) 774 internal static unsafe winmdroot.Foundation.HRESULT GetThemeMargins(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, winmdroot.UI.Controls.THEME_PROPERTY_SYMBOL_ID iPropId, [Optional] winmdroot.Foundation.RECT* prc, winmdroot.UI.Controls.MARGINS* pMargins) 780 static extern unsafe winmdroot.Foundation.HRESULT LocalExternFunction(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, int iPropId, [Optional] winmdroot.Foundation.RECT* prc, winmdroot.UI.Controls.MARGINS* pMargins); 783 /// <inheritdoc cref="GetThemePartSize(winmdroot.UI.Controls.HTHEME, winmdroot.Graphics.Gdi.HDC, int, int, winmdroot.Foundation.RECT*, winmdroot.UI.Controls.THEMESIZE, winmdroot.Foundation.SIZE*)"/> 785 internal static unsafe winmdroot.Foundation.HRESULT GetThemePartSize(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, winmdroot.Foundation.RECT? prc, winmdroot.UI.Controls.THEMESIZE eSize, out winmdroot.Foundation.SIZE psz) 828 internal static extern unsafe winmdroot.Foundation.HRESULT GetThemePartSize(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, [Optional] winmdroot.Foundation.RECT* prc, winmdroot.UI.Controls.THEMESIZE eSize, winmdroot.Foundation.SIZE* psz); 976 /// <inheritdoc cref="GetThemeTextExtent(winmdroot.UI.Controls.HTHEME, winmdroot.Graphics.Gdi.HDC, int, int, winmdroot.Foundation.PCWSTR, int, winmdroot.Graphics.Gdi.DRAW_TEXT_FORMAT, winmdroot.Foundation.RECT*, winmdroot.Foundation.RECT*)"/> 978 internal static unsafe winmdroot.Foundation.HRESULT GetThemeTextExtent(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, string pszText, int cchCharCount, winmdroot.Graphics.Gdi.DRAW_TEXT_FORMAT dwTextFlags, winmdroot.Foundation.RECT? pBoundingRect, out winmdroot.Foundation.RECT pExtentRect) 1036 internal static extern unsafe winmdroot.Foundation.HRESULT GetThemeTextExtent(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, winmdroot.Foundation.PCWSTR pszText, int cchCharCount, winmdroot.Graphics.Gdi.DRAW_TEXT_FORMAT dwTextFlags, [Optional] winmdroot.Foundation.RECT* pBoundingRect, winmdroot.Foundation.RECT* pExtentRect); 1038 /// <inheritdoc cref="GetThemeTextMetrics(winmdroot.UI.Controls.HTHEME, winmdroot.Graphics.Gdi.HDC, int, int, winmdroot.Graphics.Gdi.TEXTMETRICW*)"/> 1040 internal static unsafe winmdroot.Foundation.HRESULT GetThemeTextMetrics(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, out winmdroot.Graphics.Gdi.TEXTMETRICW ptm) 1078 internal static extern unsafe winmdroot.Foundation.HRESULT GetThemeTextMetrics(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, winmdroot.Graphics.Gdi.TEXTMETRICW* ptm); 1080 /// <inheritdoc cref="HitTestThemeBackground(winmdroot.UI.Controls.HTHEME, winmdroot.Graphics.Gdi.HDC, int, int, winmdroot.UI.Controls.HIT_TEST_BACKGROUND_OPTIONS, winmdroot.Foundation.RECT*, winmdroot.Graphics.Gdi.HRGN, global::System.Drawing.Point, ushort*)"/> 1082 internal static unsafe winmdroot.Foundation.HRESULT HitTestThemeBackground(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, winmdroot.UI.Controls.HIT_TEST_BACKGROUND_OPTIONS dwOptions, in winmdroot.Foundation.RECT pRect, winmdroot.Graphics.Gdi.HRGN hrgn, global::System.Drawing.Point ptTest, out ushort pwHitTestCode) 1138 internal static extern unsafe winmdroot.Foundation.HRESULT HitTestThemeBackground(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, winmdroot.UI.Controls.HIT_TEST_BACKGROUND_OPTIONS dwOptions, winmdroot.Foundation.RECT* pRect, winmdroot.Graphics.Gdi.HRGN hrgn, global::System.Drawing.Point ptTest, ushort* pwHitTestCode);
Windows.Win32.System_Ole_IViewObject_Extensions.g.cs (6)
23 /// <inheritdoc cref="winmdroot.System.Ole.IViewObject.Interface.Draw(winmdroot.System.Com.DVASPECT, int, void*, winmdroot.System.Com.DVTARGETDEVICE*, winmdroot.Graphics.Gdi.HDC, winmdroot.Graphics.Gdi.HDC, winmdroot.Foundation.RECTL*, winmdroot.Foundation.RECTL*, nint, nuint)"/> 24 internal static unsafe winmdroot.Foundation.HRESULT Draw(this winmdroot.System.Ole.IViewObject.Interface @this, winmdroot.System.Com.DVASPECT dwDrawAspect, int lindex, void* pvAspect, winmdroot.System.Com.DVTARGETDEVICE* ptd, winmdroot.Graphics.Gdi.HDC hdcTargetDev, winmdroot.Graphics.Gdi.HDC hdcDraw, winmdroot.Foundation.RECTL? lprcBounds, winmdroot.Foundation.RECTL? lprcWBounds, nint pfnContinue, nuint dwContinue) 32 /// <inheritdoc cref="winmdroot.System.Ole.IViewObject.Interface.GetColorSet(winmdroot.System.Com.DVASPECT, int, void*, winmdroot.System.Com.DVTARGETDEVICE*, winmdroot.Graphics.Gdi.HDC, winmdroot.Graphics.Gdi.LOGPALETTE**)"/> 33 internal static unsafe winmdroot.Foundation.HRESULT GetColorSet(this winmdroot.System.Ole.IViewObject.Interface @this, winmdroot.System.Com.DVASPECT dwDrawAspect, int lindex, void* pvAspect, winmdroot.System.Com.DVTARGETDEVICE* ptd, winmdroot.Graphics.Gdi.HDC hicTargetDev, out winmdroot.Graphics.Gdi.LOGPALETTE* ppColorSet)
Windows.Win32.System_Ole_IViewObject2_Extensions.g.cs (6)
23 /// <inheritdoc cref="winmdroot.System.Ole.IViewObject2.Interface.Draw(winmdroot.System.Com.DVASPECT, int, void*, winmdroot.System.Com.DVTARGETDEVICE*, winmdroot.Graphics.Gdi.HDC, winmdroot.Graphics.Gdi.HDC, winmdroot.Foundation.RECTL*, winmdroot.Foundation.RECTL*, nint, nuint)"/> 24 internal static unsafe winmdroot.Foundation.HRESULT Draw(this winmdroot.System.Ole.IViewObject2.Interface @this, winmdroot.System.Com.DVASPECT dwDrawAspect, int lindex, void* pvAspect, winmdroot.System.Com.DVTARGETDEVICE* ptd, winmdroot.Graphics.Gdi.HDC hdcTargetDev, winmdroot.Graphics.Gdi.HDC hdcDraw, winmdroot.Foundation.RECTL? lprcBounds, winmdroot.Foundation.RECTL? lprcWBounds, nint pfnContinue, nuint dwContinue) 32 /// <inheritdoc cref="winmdroot.System.Ole.IViewObject2.Interface.GetColorSet(winmdroot.System.Com.DVASPECT, int, void*, winmdroot.System.Com.DVTARGETDEVICE*, winmdroot.Graphics.Gdi.HDC, winmdroot.Graphics.Gdi.LOGPALETTE**)"/> 33 internal static unsafe winmdroot.Foundation.HRESULT GetColorSet(this winmdroot.System.Ole.IViewObject2.Interface @this, winmdroot.System.Com.DVASPECT dwDrawAspect, int lindex, void* pvAspect, winmdroot.System.Com.DVTARGETDEVICE* ptd, winmdroot.Graphics.Gdi.HDC hicTargetDev, out winmdroot.Graphics.Gdi.LOGPALETTE* ppColorSet)
Windows\Win32\PInvoke.DrawTextEx.cs (2)
8/// <inheritdoc cref="DrawTextEx(HDC, PWSTR, int, RECT*, DRAW_TEXT_FORMAT, DRAWTEXTPARAMS*)"/> 10HDC hdc,
Windows\Win32\PInvoke.FillRect.cs (2)
8/// <inheritdoc cref="FillRect(HDC, in RECT, HBRUSH)"/> 10where T : IHandle<HDC>
Windows\Win32\PInvoke.GetTextExtentPoint32.cs (2)
10/// <inheritdoc cref="GetTextExtentPoint32W(HDC, PCWSTR, int, SIZE*)"/> 11public static unsafe BOOL GetTextExtentPoint32W<T>(T hdc, string lpString, int c, Size size) where T : IHandle<HDC>
Windows\Win32\PInvoke.GetThemeFont.cs (2)
10/// <inheritdoc cref="GetThemeFont(HTHEME, HDC, int, int, int, LOGFONTW*)"/> 11public static unsafe HRESULT GetThemeFont<T>(T hTheme, HDC hdc, int iPartId, int iStateId, int iPropId, out LOGFONT pFont)
Windows\Win32\PInvoke.ImageList.cs (4)
28/// <inheritdoc cref="ImageList_Draw(HIMAGELIST, int, HDC, int, int, IMAGE_LIST_DRAW_STYLE)"/> 29public static bool Draw<T>(T himl, int i, HDC hdcDst, int x, int y, IMAGE_LIST_DRAW_STYLE fStyle) 37/// <inheritdoc cref="ImageList_DrawEx(HIMAGELIST, int, HDC, int, int, int, int, COLORREF, COLORREF, IMAGE_LIST_DRAW_STYLE)"/> 48IMAGE_LIST_DRAW_STYLE fStyle) where THIML : IHandle<HIMAGELIST> where THDC : IHandle<HDC>
Windows\Win32\PInvoke.IntersectClipRect.cs (2)
8/// <inheritdoc cref="IntersectClipRect(HDC, int, int, int, int)"/> 9public static GDI_REGION_TYPE IntersectClipRect<T>(T hdc, int left, int top, int right, int bottom) where T : IHandle<HDC>
Windows\Win32\UI\Controls\Dialogs\CHOOSEFONTW.cs (1)
56public HDC hDC;
Windows\Win32\UI\Controls\Dialogs\PRINTDLGW_32.cs (1)
24public HDC hDC;
Windows\Win32\UI\Controls\Dialogs\PRINTDLGW_64.cs (1)
120public HDC hDC;
System.Windows.Forms.Primitives.Tests (9)
System\Windows\Forms\DeviceContextHdcScopeTests.cs (1)
251HDC mockHdc = new(1234);
System\Windows\Forms\DeviceContextScopeTests.cs (2)
13private static extern int GetRandomRgn(HDC hdc, HRGN hrgn, int i); 80Assert.Equal(dcScope.HDC, (HDC)hdc);
System\Windows\Forms\Internals\ArgumentValidationTests.cs (3)
91HDC param = new(IntPtr.Zero); 99HDC param = new(new IntPtr(24)); 106HDC param = new(IntPtr.Zero);
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.Primitives.TestUtilities (14)
DeviceContextState.cs (1)
26public DeviceContextState(HDC hdc)
HdcDeviceContextAdapter.cs (3)
9/// Simple adapter for passing <see cref="HDC"/> as <see cref="IDeviceContext"/>. Does not manage HDC 14private readonly HDC _hdc; 16public HdcDeviceContextAdapter(HDC hdc) => _hdc = hdc;
Metafiles\EmfRecord.cs (2)
11public HDC HDC { get; } 18HDC hdc,
Metafiles\EmfScope.cs (8)
19public HDC HDC { get; } 27public EmfScope(HDC hdc) 38private static unsafe HDC CreateEnhMetaFile( 39HDC hdc = default, 47HDC metafileHdc = PInvokeCore.CreateEnhMetaFile(hdc, pFileName, lprc, pDesc); 86(delegate* unmanaged[Stdcall]<HDC, HANDLETABLE*, ENHMETARECORD*, int, LPARAM, int>)callback, 234HDC hdc, 247public static implicit operator HDC(in EmfScope scope) => scope.HDC;
System.Windows.Forms.Tests (7)
System\Windows\Forms\AxHostTests.cs (3)
1594iPicture.get_CurDC(out HDC hdc).Should().Be(HRESULT.E_FAIL); 1680iPicture.get_CurDC(out HDC curDc).ThrowOnFailure(); 1708iPicture.get_CurDC(out HDC _).Should().Be(HRESULT.E_FAIL);
System\Windows\Forms\ComponentModel\Com2Interop\COM2PictureConverterTests.cs (4)
197public HRESULT get_CurDC(HDC* phDC) => HRESULT.S_OK; 202public HRESULT Render(HDC hDC, int x, int y, int cx, int cy, int xSrc, int ySrc, int cxSrc, int cySrc, RECT* pRcWBounds) => HRESULT.S_OK; 204public HRESULT SelectPicture(HDC hDCIn, HDC* phDCOut, OLE_HANDLE* phBmpOut) => HRESULT.S_OK;