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