43 references to HGDIOBJ
System.Private.Windows.Core (20)
Windows\Win32\Graphics\Gdi\CreateBitmapScope.cs (1)
37
public static implicit operator
HGDIOBJ
(in CreateBitmapScope scope) => scope.HBITMAP;
Windows\Win32\Graphics\Gdi\CreateBrushScope.cs (1)
39
public static implicit operator
HGDIOBJ
(in CreateBrushScope scope) => scope.HBRUSH;
Windows\Win32\Graphics\Gdi\CreateDcScope.cs (2)
53
public static unsafe implicit operator
HGDIOBJ
(in CreateDcScope scope) => (
HGDIOBJ
)(scope.HDC.Value);
Windows\Win32\Graphics\Gdi\CreatePenScope.cs (1)
33
public static unsafe implicit operator
HGDIOBJ
(in CreatePenScope scope) => scope.HPEN;
Windows\Win32\Graphics\Gdi\HGDIOBJ.cs (5)
8
public static implicit operator
HGDIOBJ
(HDC value) => (
HGDIOBJ
)value.Value;
10
public static explicit operator HFONT(
HGDIOBJ
value) => (HFONT)value.Value;
11
public static explicit operator HBRUSH(
HGDIOBJ
value) => (HBRUSH)value.Value;
12
public static explicit operator HBITMAP(
HGDIOBJ
value) => (HBITMAP)value.Value;
Windows\Win32\Graphics\Gdi\ObjectScope.cs (3)
21
public
HGDIOBJ
HGDIOBJ { get; }
24
public ObjectScope(
HGDIOBJ
@object) => HGDIOBJ = @object;
26
public static implicit operator
HGDIOBJ
(in ObjectScope objectScope) => objectScope.HGDIOBJ;
Windows\Win32\Graphics\Gdi\SelectObjectScope.cs (3)
23
public
HGDIOBJ
PreviousObject { get; }
27
/// <see cref="PInvokeCore.SelectObject(HDC,
HGDIOBJ
)"/>.
29
public SelectObjectScope(HDC hdc,
HGDIOBJ
@object)
Windows\Win32\PInvokeCore.GetObject.cs (2)
8
/// <inheritdoc cref="GetObject(
HGDIOBJ
,int,void*)"/>
9
public static unsafe bool GetObject<T>(
HGDIOBJ
h, out T @object) where T : unmanaged
Windows\Win32\UI\WindowsAndMessaging\ICONINFO.cs (2)
12
PInvokeCore.DeleteObject((
HGDIOBJ
)hbmMask.Value);
18
PInvokeCore.DeleteObject((
HGDIOBJ
)hbmColor.Value);
System.Windows.Forms (12)
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (2)
5708
HGDIOBJ
saveBrush = PInvokeCore.SelectObject(dc, halftone);
5727
HGDIOBJ
saveBrush = PInvokeCore.SelectObject(dc, halftone);
System\Windows\Forms\Controls\ImageList\ImageList.ImageCollection.cs (2)
167
PInvokeCore.DeleteObject((
HGDIOBJ
)hBitmap);
168
PInvokeCore.DeleteObject((
HGDIOBJ
)hMask);
System\Windows\Forms\Controls\ToolStrips\CachedItemHdcInfo.cs (1)
35
HGDIOBJ
oldBitmap = PInvokeCore.SelectObject(_cachedItemHDC, _cachedItemBitmap);
System\Windows\Forms\Design\ComponentEditorForm.PageSelector.cs (2)
104
(state & STATE_HOT) != 0 ? (
HGDIOBJ
)Parent!.FontHandle : default);
262
HGDIOBJ
hbrushOld = PInvokeCore.SelectObject(dc, _hbrushDither);
System\Windows\Forms\Rendering\ControlPaint.cs (5)
213
HGDIOBJ
previousBitmap = PInvokeCore.SelectObject(dc, hbitmap);
310
using SelectObjectScope sourceBitmapSelection = new(sourceDC, (
HGDIOBJ
)monochromeMask);
311
using SelectObjectScope targetBitmapSelection = new(targetDC, (
HGDIOBJ
)colorMask.Value);
1804
FrameStyle.Dashed => (
HGDIOBJ
)PInvokeCore.CreatePen(PEN_STYLE.PS_DOT, cWidth: 1, (COLORREF)(uint)ColorTranslator.ToWin32(backColor)).Value,
1805
FrameStyle.Thick => (
HGDIOBJ
)PInvokeCore.CreatePen(PEN_STYLE.PS_SOLID, cWidth: 2, (COLORREF)(uint)ColorTranslator.ToWin32(backColor)).Value,
System.Windows.Forms.Primitives (3)
System\Windows\Forms\DeviceContextExtensions.cs (3)
86
using SelectObjectScope selection = new(hdc, (
HGDIOBJ
)hpen.Value);
143
using var penSelection = pen.IsNull ? default : new SelectObjectScope(hdc, (
HGDIOBJ
)pen.Value);
144
using var brushSelection = brush.IsNull ? default : new SelectObjectScope(hdc, (
HGDIOBJ
)brush.Value);
System.Windows.Forms.Primitives.Tests (2)
Interop\Gdi32\GetStockObjectTests.cs (1)
14
HGDIOBJ
hgdiobj = PInvokeCore.GetStockObject((GET_STOCK_OBJECT_FLAGS)id);
System\Windows\Forms\DeviceContextScopeTests.cs (1)
69
HGDIOBJ
current = PInvoke.GetCurrentObject(dcScope, OBJ_TYPE.OBJ_BRUSH);
System.Windows.Forms.Primitives.TestUtilities (5)
DeviceContextState.cs (4)
43
var
hfont = PInvoke.GetCurrentObject(hdc, OBJ_TYPE.OBJ_FONT);
47
var
hpen = PInvoke.GetCurrentObject(hdc, OBJ_TYPE.OBJ_PEN);
51
var
hbrush = PInvoke.GetCurrentObject(hdc, OBJ_TYPE.OBJ_BRUSH);
143
HGDIOBJ
hgdiobj = PInvokeCore.GetStockObject(selectionRecord->StockObject);
Metafiles\EmfRecord.cs (1)
33
public ReadOnlySpan<
HGDIOBJ
> Handles => new(_lpht, _nHandles);
System.Windows.Forms.Tests (1)
System\Windows\Forms\ComponentModel\Com2Interop\COM2PictureConverterTests.cs (1)
113
PInvokeCore.DeleteObject((
HGDIOBJ
)hBitmap);