3 instantiations of HDC
Microsoft.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());
195 references to HDC
Microsoft.Private.Windows.Core (195)
System\ArgumentValidation.cs (1)
53
internal 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 (26)
177
/// <inheritdoc cref="Render(winmdroot.Graphics.Gdi.
HDC
, int, int, int, int, int, int, int, int, winmdroot.Foundation.RECT*)"/>
178
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)
205
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)
207
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);
222
/// <inheritdoc cref="get_CurDC(winmdroot.Graphics.Gdi.
HDC
*)"/>
223
internal unsafe winmdroot.Foundation.HRESULT get_CurDC(out winmdroot.Graphics.Gdi.
HDC
phDC)
225
fixed (winmdroot.Graphics.Gdi.
HDC
* phDCLocal = &phDC)
242
public unsafe winmdroot.Foundation.HRESULT get_CurDC(winmdroot.Graphics.Gdi.
HDC
* phDC)
244
return ((delegate *unmanaged [Stdcall]<IPicture*,winmdroot.Graphics.Gdi.
HDC
* ,winmdroot.Foundation.HRESULT>)lpVtbl[10])((IPicture*)Unsafe.AsPointer(ref this), phDC);
247
/// <inheritdoc cref="SelectPicture(winmdroot.Graphics.Gdi.
HDC
, winmdroot.Graphics.Gdi.
HDC
*, winmdroot.System.Ole.OLE_HANDLE*)"/>
248
internal unsafe winmdroot.Foundation.HRESULT SelectPicture(winmdroot.Graphics.Gdi.
HDC
hDCIn, out winmdroot.Graphics.Gdi.
HDC
phDCOut, out winmdroot.System.Ole.OLE_HANDLE phBmpOut)
252
fixed (winmdroot.Graphics.Gdi.
HDC
* phDCOutLocal = &phDCOut)
268
public unsafe winmdroot.Foundation.HRESULT SelectPicture(winmdroot.Graphics.Gdi.
HDC
hDCIn, winmdroot.Graphics.Gdi.
HDC
* phDCOut, winmdroot.System.Ole.OLE_HANDLE* phBmpOut)
270
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);
405
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;
409
internal delegate *unmanaged [Stdcall]<IPicture*,winmdroot.Graphics.Gdi.
HDC
* ,winmdroot.Foundation.HRESULT> get_CurDC_11;
411
internal delegate *unmanaged [Stdcall]<IPicture*,winmdroot.Graphics.Gdi.
HDC
,winmdroot.Graphics.Gdi.
HDC
* ,winmdroot.System.Ole.OLE_HANDLE* ,winmdroot.Foundation.HRESULT> SelectPicture_12;
448
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);
454
unsafe winmdroot.Foundation.HRESULT get_CurDC(winmdroot.Graphics.Gdi.
HDC
* phDC);
457
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 (58)
49
internal static extern 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);
73
internal static extern winmdroot.Graphics.Gdi.HENHMETAFILE CloseEnhMetaFile(winmdroot.Graphics.Gdi.
HDC
hdc);
139
internal static extern winmdroot.Graphics.Gdi.HBITMAP CreateCompatibleBitmap(winmdroot.Graphics.Gdi.
HDC
hdc, int cx, int cy);
152
internal static extern winmdroot.Graphics.Gdi.
HDC
CreateCompatibleDC(winmdroot.Graphics.Gdi.
HDC
hdc);
156
internal static unsafe winmdroot.Graphics.Gdi.
HDC
CreateDCW(string pwszDriver, string pwszDevice, string pszPort, winmdroot.Graphics.Gdi.DEVMODEW? pdm)
165
winmdroot.Graphics.Gdi.
HDC
__result = PInvokeCore.CreateDCW(pwszDriverLocal, pwszDeviceLocal, pszPortLocal, pdm.HasValue ? &pdmLocal : null);
192
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);
194
/// <inheritdoc cref="CreateDIBSection(winmdroot.Graphics.Gdi.
HDC
, winmdroot.Graphics.Gdi.BITMAPINFO*, winmdroot.Graphics.Gdi.DIB_USAGE, void**, winmdroot.Foundation.HANDLE, uint)"/>
196
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)
229
internal static extern 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);
231
/// <inheritdoc cref="CreateEnhMetaFile(winmdroot.Graphics.Gdi.
HDC
, winmdroot.Foundation.PCWSTR, winmdroot.Foundation.RECT*, winmdroot.Foundation.PCWSTR)"/>
233
internal static unsafe winmdroot.Graphics.Gdi.
HDC
CreateEnhMetaFile(winmdroot.Graphics.Gdi.
HDC
hdc, string lpFilename, winmdroot.Foundation.RECT? lprc, string lpDesc)
240
winmdroot.Graphics.Gdi.
HDC
__result = PInvokeCore.CreateEnhMetaFile(hdc, lpFilenameLocal, lprc.HasValue ? &lprcLocal : null, lpDescLocal);
260
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);
288
internal static unsafe winmdroot.Graphics.Gdi.
HDC
CreateICW(string pszDriver, string pszDevice, string pszPort, winmdroot.Graphics.Gdi.DEVMODEW? pdm)
297
winmdroot.Graphics.Gdi.
HDC
__result = PInvokeCore.CreateICW(pszDriverLocal, pszDeviceLocal, pszPortLocal, pdm.HasValue ? &pdmLocal : null);
319
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);
376
internal static extern winmdroot.Foundation.BOOL DeleteDC(winmdroot.Graphics.Gdi.
HDC
hdc);
378
/// <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*)"/>
380
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)
401
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);
413
internal static extern int GetClipRgn(winmdroot.Graphics.Gdi.
HDC
hdc, winmdroot.Graphics.Gdi.HRGN hrgn);
427
internal static int GetDeviceCaps(winmdroot.Graphics.Gdi.
HDC
hdc, winmdroot.Graphics.Gdi.GET_DEVICE_CAPS_INDEX index)
433
static extern int LocalExternFunction(winmdroot.Graphics.Gdi.
HDC
hdc, int index);
539
/// <inheritdoc cref="GetViewportExtEx(winmdroot.Graphics.Gdi.
HDC
, winmdroot.Foundation.SIZE*)"/>
541
internal static unsafe winmdroot.Foundation.BOOL GetViewportExtEx(winmdroot.Graphics.Gdi.
HDC
hdc, out winmdroot.Foundation.SIZE lpsize)
561
internal static extern unsafe winmdroot.Foundation.BOOL GetViewportExtEx(winmdroot.Graphics.Gdi.
HDC
hdc, winmdroot.Foundation.SIZE* lpsize);
563
/// <inheritdoc cref="GetViewportOrgEx(winmdroot.Graphics.Gdi.
HDC
, global::System.Drawing.Point*)"/>
565
internal static unsafe winmdroot.Foundation.BOOL GetViewportOrgEx(winmdroot.Graphics.Gdi.
HDC
hdc, out global::System.Drawing.Point lppoint)
585
internal static extern unsafe winmdroot.Foundation.BOOL GetViewportOrgEx(winmdroot.Graphics.Gdi.
HDC
hdc, global::System.Drawing.Point* lppoint);
587
/// <inheritdoc cref="GetWindowOrgEx(winmdroot.Graphics.Gdi.
HDC
, global::System.Drawing.Point*)"/>
589
internal static unsafe winmdroot.Foundation.BOOL GetWindowOrgEx(winmdroot.Graphics.Gdi.
HDC
hdc, out global::System.Drawing.Point lppoint)
609
internal static extern unsafe winmdroot.Foundation.BOOL GetWindowOrgEx(winmdroot.Graphics.Gdi.
HDC
hdc, global::System.Drawing.Point* lppoint);
611
/// <inheritdoc cref="GetWorldTransform(winmdroot.Graphics.Gdi.
HDC
, winmdroot.Graphics.Gdi.XFORM*)"/>
613
internal static unsafe winmdroot.Foundation.BOOL GetWorldTransform(winmdroot.Graphics.Gdi.
HDC
hdc, out winmdroot.Graphics.Gdi.XFORM lpxf)
631
internal static extern unsafe winmdroot.Foundation.BOOL GetWorldTransform(winmdroot.Graphics.Gdi.
HDC
hdc, winmdroot.Graphics.Gdi.XFORM* lpxf);
649
internal static extern winmdroot.Graphics.Gdi.GDI_REGION_TYPE IntersectClipRect(winmdroot.Graphics.Gdi.
HDC
hdc, int left, int top, int right, int bottom);
662
internal static extern unsafe winmdroot.Foundation.BOOL OffsetViewportOrgEx(winmdroot.Graphics.Gdi.
HDC
hdc, int x, int y, [Optional] global::System.Drawing.Point* lppt);
685
internal static extern uint RealizePalette(winmdroot.Graphics.Gdi.
HDC
hdc);
702
internal static extern winmdroot.Foundation.BOOL Rectangle(winmdroot.Graphics.Gdi.
HDC
hdc, int left, int top, int right, int bottom);
713
internal static extern winmdroot.Foundation.BOOL RestoreDC(winmdroot.Graphics.Gdi.
HDC
hdc, int nSavedDC);
726
internal static extern int SaveDC(winmdroot.Graphics.Gdi.
HDC
hdc);
741
internal static extern winmdroot.Graphics.Gdi.GDI_REGION_TYPE SelectClipRgn(winmdroot.Graphics.Gdi.
HDC
hdc, winmdroot.Graphics.Gdi.HRGN hrgn);
760
internal static extern winmdroot.Graphics.Gdi.HGDIOBJ SelectObject(winmdroot.Graphics.Gdi.
HDC
hdc, winmdroot.Graphics.Gdi.HGDIOBJ h);
778
internal static extern winmdroot.Graphics.Gdi.HPALETTE SelectPalette(winmdroot.Graphics.Gdi.
HDC
hdc, winmdroot.Graphics.Gdi.HPALETTE hPal, winmdroot.Foundation.BOOL bForceBkgd);
792
internal static extern winmdroot.Foundation.COLORREF SetBkColor(winmdroot.Graphics.Gdi.
HDC
hdc, winmdroot.Foundation.COLORREF color);
802
internal static int SetBkMode(winmdroot.Graphics.Gdi.
HDC
hdc, winmdroot.Graphics.Gdi.BACKGROUND_MODE mode)
808
static extern int LocalExternFunction(winmdroot.Graphics.Gdi.
HDC
hdc, int mode);
823
internal static extern int SetMapMode(winmdroot.Graphics.Gdi.
HDC
hdc, winmdroot.Graphics.Gdi.HDC_MAP_MODE iMode);
834
internal static extern int SetROP2(winmdroot.Graphics.Gdi.
HDC
hdc, winmdroot.Graphics.Gdi.R2_MODE rop2);
854
internal static extern uint SetTextAlign(winmdroot.Graphics.Gdi.
HDC
hdc, winmdroot.Graphics.Gdi.TEXT_ALIGN_OPTIONS align);
865
internal static extern winmdroot.Foundation.COLORREF SetTextColor(winmdroot.Graphics.Gdi.
HDC
hdc, winmdroot.Foundation.COLORREF color);
Windows.Win32.PInvokeCore.USER32.dll.g.cs (13)
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);
201
internal static extern 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);
250
/// <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)"/>
252
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)
280
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);
388
internal static extern winmdroot.Graphics.Gdi.
HDC
GetDC(winmdroot.Foundation.HWND hWnd);
403
internal static extern winmdroot.Graphics.Gdi.
HDC
GetDCEx(winmdroot.Foundation.HWND hWnd, winmdroot.Graphics.Gdi.HRGN hrgnClip, winmdroot.Graphics.Gdi.GET_DCX_FLAGS flags);
866
internal static extern int ReleaseDC(winmdroot.Foundation.HWND hWnd, winmdroot.Graphics.Gdi.
HDC
hDC);
950
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)
16
public static explicit operator
HDC
(WPARAM value) => (
HDC
)(nint)value.Value;
17
public static explicit operator WPARAM(
HDC
value) => new((nuint)value.Value);
Windows\Win32\Graphics\Gdi\BeginPaintScope.cs (2)
25
public
HDC
HDC { get; }
35
public 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)"/>
34
public CreateBitmapScope(
HDC
hdc, int cx, int cy) => HBITMAP = PInvokeCore.CreateCompatibleBitmap(hdc, cx, cy);
Windows\Win32\Graphics\Gdi\CreateDcScope.cs (4)
22
public
HDC
HDC { get; }
25
/// Creates a compatible HDC for <paramref name="hdc"/> using <see cref="PInvokeCore.CreateCompatibleDC(
HDC
)"/>.
32
public CreateDcScope(
HDC
hdc)
52
public 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)
19
public
HDC
HDC { get; }
29
/// Creates a <see cref="Gdi.
HDC
"/> using <see cref="PInvokeCore.GetDCEx(HWND, HRGN, GET_DCX_FLAGS)"/>.
60
public static implicit operator
HDC
(in GetDcScope scope) => scope.HDC;
Windows\Win32\Graphics\Gdi\HDC.cs (4)
9
internal readonly partial struct HDC : IHandle<
HDC
>
11
HDC
IHandle<
HDC
>.Handle => this;
12
object? 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
10
internal sealed class HdcHandle : IDisposable, IHandle<
HDC
>
24
public
HDC
Handle { get; private set; }
28
public static implicit operator
HDC
(in HdcHandle handle) => handle.Handle;
Windows\Win32\Graphics\Gdi\HGDIOBJ.cs (1)
8
public static implicit operator HGDIOBJ(
HDC
value) => (HGDIOBJ)value.Value;
Windows\Win32\Graphics\Gdi\IHDCContext.cs (1)
8
HDC
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.
41
public RegionScope(
HDC
hdc)
Windows\Win32\Graphics\Gdi\SaveDcScope.cs (3)
25
public
HDC
HDC { get; }
29
/// Saves the device context state using <see cref="PInvokeCore.SaveDC(
HDC
)"/>.
32
public 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.
22
private readonly
HDC
_hdc;
27
/// <see cref="PInvokeCore.SelectObject(
HDC
, HGDIOBJ)"/>.
29
public SelectObjectScope(
HDC
hdc, HGDIOBJ @object)
Windows\Win32\Graphics\Gdi\SelectPaletteScope.cs (2)
21
public
HDC
HDC { get; }
24
public SelectPaletteScope(
HDC
hdc, HPALETTE hpalette, bool forceBackground, bool realizePalette)
Windows\Win32\Graphics\Gdi\SetBackgroundColorScope.cs (3)
19
private readonly
HDC
_hdc;
23
/// <see cref="PInvokeCore.SetBkColor(
HDC
, COLORREF)"/>.
25
public SetBackgroundColorScope(
HDC
hdc, COLORREF color)
Windows\Win32\Graphics\Gdi\SetBkModeScope.cs (2)
23
private readonly
HDC
_hdc;
28
public SetBkModeScope(
HDC
hdc, BACKGROUND_MODE bkmode)
Windows\Win32\Graphics\Gdi\SetMapModeScope.cs (3)
23
private readonly
HDC
_hdc;
27
/// <see cref="PInvokeCore.SetMapMode(
HDC
, HDC_MAP_MODE)"/>.
29
public SetMapModeScope(
HDC
hdc, HDC_MAP_MODE mapMode)
Windows\Win32\Graphics\Gdi\SetRop2Scope.cs (3)
23
private readonly
HDC
_hdc;
26
/// Selects <paramref name="rop2"/> into the given <paramref name="hdc"/> using <see cref="PInvokeCore.SetROP2(
HDC
, R2_MODE)"/>.
28
public SetRop2Scope(
HDC
hdc, R2_MODE rop2)
Windows\Win32\Graphics\Gdi\SetTextAlignmentScope.cs (3)
23
private readonly
HDC
_hdc;
27
/// using <see cref="PInvokeCore.SetTextAlign(
HDC
, TEXT_ALIGN_OPTIONS)"/>.
29
public SetTextAlignmentScope(
HDC
hdc, TEXT_ALIGN_OPTIONS ta)
Windows\Win32\Graphics\Gdi\SetTextColorScope.cs (3)
23
private readonly
HDC
_hdc;
27
/// <see cref="PInvokeCore.SetTextColor(
HDC
, COLORREF)"/>.
29
public 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)"/>
15
HDC
hdcSrc,
18
ROP_CODE rop) where T : IHandle<
HDC
>
34
/// <inheritdoc cref="BitBlt(
HDC
, int, int, int, int,
HDC
, int, int, ROP_CODE)"/>
36
HDC
hdc,
44
ROP_CODE rop) where T : IHandle<
HDC
>
Windows\Win32\PInvokeCore.DrawIcon.cs (1)
8
public 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)"/>
10
HDC
hDC,
Windows\Win32\PInvokeCore.EnumDisplayMonitors.cs (5)
8
public delegate bool EnumDisplayMonitorsCallback(HMONITOR monitor,
HDC
hdc);
11
private delegate BOOL EnumDisplayMonitorsNativeCallback(HMONITOR monitor,
HDC
hdc, RECT* lprcMonitor, LPARAM lParam);
13
private static readonly delegate* unmanaged[Stdcall]<HMONITOR,
HDC
, RECT*, LPARAM, BOOL> s_enumDisplayMonitorsNativeCallbackFunctionPointer =
14
(delegate* unmanaged[Stdcall]<HMONITOR,
HDC
, RECT*, LPARAM, BOOL>)Marshal.GetFunctionPointerForDelegate(s_enumDisplayMonitorsNativeCallback);
37
private static BOOL HandleEnumDisplayMonitorsNativeCallback(HMONITOR monitor,
HDC
hdc, RECT* lprcMonitor, LPARAM lParam)
Windows\Win32\UI\Controls\Dialogs\PRINTDLGEXW.cs (1)
117
public
HDC
hDC;