4 writes to HDC
System.Private.Windows.Core (4)
Windows\Win32\Graphics\Gdi\DeviceContextHdcScope.cs (4)
94
HDC
= default;
130
HDC
= needToApplyProperties ? default : provider.GetHdc();
146
HDC
= HDC.IsNull ? DeviceContext.GetHdc() : HDC;
155
(
HDC
, _savedHdcState) = graphics.GetHdc(applyGraphicsState, saveHdcState);
14 references to HDC
System.Private.Windows.Core (14)
Windows\Win32\Graphics\Gdi\DeviceContextHdcScope.cs (14)
10
/// Helper to scope getting a <see cref="
HDC
"/> from a <see cref="IHdcContext"/> object. Releases
11
/// the <see cref="
HDC
"/> when disposed, unlocking the parent <see cref="IHdcContext"/> object.
35
/// Gets the <see cref="
HDC
"/> from the given <paramref name="deviceContext"/>.
53
/// When true, saves and restores the <see cref="
HDC
"/> state.
132
if (
HDC
.IsNull)
146
HDC =
HDC
.IsNull ? DeviceContext.GetHdc() :
HDC
;
148
_savedHdcState = saveHdcState ? PInvokeCore.SaveDC(
HDC
) : 0;
158
public static implicit operator HDC(in DeviceContextHdcScope scope) => scope.
HDC
;
159
public static implicit operator nint(in DeviceContextHdcScope scope) => scope.
HDC
;
160
public static explicit operator WPARAM(in DeviceContextHdcScope scope) => (WPARAM)scope.
HDC
;
165
if (
HDC
.IsNull)
174
OBJ_TYPE type = (OBJ_TYPE)PInvokeCore.GetObjectType(
HDC
);
194
PInvokeCore.RestoreDC(
HDC
, _savedHdcState);