3 instantiations of HFONT
System.Private.Windows.Core (3)
Windows.Win32.HFONT.g.cs (3)
41 public static explicit operator HFONT(void* value) => new HFONT(value); 57 public static explicit operator HFONT(IntPtr value) => new HFONT((void*)value.ToPointer()); 59 public static explicit operator HFONT(UIntPtr value) => new HFONT((void*)value.ToPointer());
77 references to HFONT
System.Drawing.Common (3)
System\Drawing\Font.cs (1)
719HFONT handle = PInvokeCore.CreateFontIndirect((LOGFONTW*)&lf);
System\Drawing\SystemFonts.cs (2)
183HFONT handle = (HFONT)PInvokeCore.GetStockObject(GET_STOCK_OBJECT_FLAGS.DEFAULT_GUI_FONT);
System.Private.Windows.Core (22)
Windows.Win32.HFONT.g.cs (14)
25 : IEquatable<HFONT> 35 internal static HFONT Null => default; 39 public static implicit operator void*(HFONT value) => value.Value; 41 public static explicit operator HFONT(void* value) => new HFONT(value); 43 public static bool operator ==(HFONT left, HFONT right) => left.Value == right.Value; 45 public static bool operator !=(HFONT left, HFONT right) => !(left == right); 47 public bool Equals(HFONT other) => this.Value == other.Value; 49 public override bool Equals(object obj) => obj is HFONT other && this.Equals(other); 55 public static implicit operator IntPtr(HFONT value) => new IntPtr(value.Value); 57 public static explicit operator HFONT(IntPtr value) => new HFONT((void*)value.ToPointer()); 59 public static explicit operator HFONT(UIntPtr value) => new HFONT((void*)value.ToPointer()); 61 public static implicit operator HGDIOBJ(HFONT value) => new HGDIOBJ(value.Value);
Windows.Win32.PInvokeCore.GDI32.dll.g.cs (3)
280 internal static unsafe winmdroot.Graphics.Gdi.HFONT CreateFontIndirect(in winmdroot.Graphics.Gdi.LOGFONTW lplf) 284 winmdroot.Graphics.Gdi.HFONT __result = PInvokeCore.CreateFontIndirect(lplfLocal); 300 internal static extern unsafe winmdroot.Graphics.Gdi.HFONT CreateFontIndirect(winmdroot.Graphics.Gdi.LOGFONTW* lplf);
Windows\Win32\Foundation\LRESULT.cs (2)
13public static explicit operator HFONT(LRESULT value) => (HFONT)value.Value;
Windows\Win32\Foundation\WPARAM.cs (1)
19public static explicit operator WPARAM(HFONT value) => new((nuint)value.Value);
Windows\Win32\Graphics\Gdi\HGDIOBJ.cs (2)
10public static explicit operator HFONT(HGDIOBJ value) => (HFONT)value.Value;
System.Windows.Forms (33)
System\Windows\Forms\ComponentModel\COM2Interop\COM2FontConverter.cs (4)
16private HFONT _lastHandle = HFONT.Null; 35_lastHandle = HFONT.Null; 40HFONT fontHandle = iFont.Value->hFont;
System\Windows\Forms\Control.cs (1)
2003internal HFONT FontHandle
System\Windows\Forms\Control.FontHandleWrapper.cs (4)
11/// Wrapper for a <see cref="Drawing.Font"/>'s <see cref="HFONT"/>. 15private HFONT _handle; 17internal FontHandleWrapper(Font font) => _handle = (HFONT)font.ToHfont(); 19internal HFONT Handle
System\Windows\Forms\Controls\DateTimePicker\DateTimePicker.cs (1)
219private HFONT CalendarFontHandle
System\Windows\Forms\Controls\ListView\ListView.cs (3)
109private HFONT _odCacheFontHandle; 6377HFONT hFont = (HFONT)PInvokeCore.SendMessage(hwndHdr, PInvokeCore.WM_GETFONT);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (2)
3732var hFont = (HFONT)Font.ToHfont();
System\Windows\Forms\Layout\Containers\ContainerControl.cs (2)
319internal SizeF GetCurrentAutoScaleDimensions(HFONT fontHandle) 700private unsafe SizeF GetFontAutoScaleDimensions(HFONT fontHandle)
System\Windows\Forms\OwnerDrawPropertyBag.cs (1)
47internal HFONT FontHandle
System\Windows\Forms\Rendering\FontCache.cs (4)
9/// Thread safe cache of <see cref="HFONT"/> objects created from <see cref="Font"/> objects. 13/// This adds a slight managed memory overhead to creating the <see cref="HFONT"/>, but saves 56 bytes and 22internal sealed partial class FontCache : RefCountedCache<HFONT, FontCache.Data, (Font Font, FONT_QUALITY Quality)> 32/// Gets a ref-counting scope containing the <see cref="HFONT"/> that matches the specified
System\Windows\Forms\Rendering\FontCache.Data.cs (3)
19public HFONT HFONT { get; private set; } 66private static unsafe HFONT FromFont(Font font, FONT_QUALITY quality = FONT_QUALITY.DEFAULT_QUALITY) 111HFONT hfont = PInvokeCore.CreateFontIndirect(&logFont);
System\Windows\Forms\Rendering\FontCache.FontCacheEntry.cs (1)
11public override HFONT Object => Data.HFONT;
System\Windows\Forms\Rendering\GdiCache.cs (2)
78/// Gets a cached <see cref="HFONT"/> based off of the given <paramref name="font"/> and 86/// When disposed the <see cref="HFONT"/> will be returned to the cache. If you must pass the scope to
System\Windows\Forms\Rendering\TextExtensions.cs (2)
70using SelectObjectScope fontSelection = new(hdc, (HFONT)font); 282public static unsafe Size GetTextExtent(this HDC hdc, string? text, HFONT hfont)
System\Windows\Forms\Rendering\TextRenderer.cs (3)
652/// Get a cached <see cref="HFONT"/> based off of the given <paramref name="font"/> and <paramref name="quality"/>, 666HFONT hfont = (HFONT)PInvoke.GetCurrentObject(hdc, OBJ_TYPE.OBJ_FONT);
System.Windows.Forms.Primitives (18)
System\Windows\Forms\SystemDrawingExtensions.cs (2)
14internal static HFONT ToHFONT(this Font font) => (HFONT)font.ToHfont();
Windows.Win32.IFont.g.cs (16)
570 private static winmdroot.Foundation.HRESULT get_hFont(IFont* pThis, winmdroot.Graphics.Gdi.HFONT* phFont) 597 internal winmdroot.Graphics.Gdi.HFONT hFont 601 winmdroot.Graphics.Gdi.HFONT __result; 602 ((delegate *unmanaged [Stdcall]<IFont*,winmdroot.Graphics.Gdi.HFONT* ,winmdroot.Foundation.HRESULT>)lpVtbl[19])((IFont*)Unsafe.AsPointer(ref this), &__result).ThrowOnFailure(); 761 private static winmdroot.Foundation.HRESULT AddRefHfont(IFont* pThis, winmdroot.Graphics.Gdi.HFONT hFont) 787 public void AddRefHfont(winmdroot.Graphics.Gdi.HFONT hFont) 789 ((delegate *unmanaged [Stdcall]<IFont*,winmdroot.Graphics.Gdi.HFONT ,winmdroot.Foundation.HRESULT>)lpVtbl[24])((IFont*)Unsafe.AsPointer(ref this), hFont).ThrowOnFailure(); 795 private static winmdroot.Foundation.HRESULT ReleaseHfont(IFont* pThis, winmdroot.Graphics.Gdi.HFONT hFont) 824 public void ReleaseHfont(winmdroot.Graphics.Gdi.HFONT hFont) 826 ((delegate *unmanaged [Stdcall]<IFont*,winmdroot.Graphics.Gdi.HFONT ,winmdroot.Foundation.HRESULT>)lpVtbl[25])((IFont*)Unsafe.AsPointer(ref this), hFont).ThrowOnFailure(); 923 internal delegate *unmanaged [Stdcall]<IFont*,winmdroot.Graphics.Gdi.HFONT* ,winmdroot.Foundation.HRESULT> get_hFont_20; 933 internal delegate *unmanaged [Stdcall]<IFont*,winmdroot.Graphics.Gdi.HFONT ,winmdroot.Foundation.HRESULT> AddRefHfont_25; 935 internal delegate *unmanaged [Stdcall]<IFont*,winmdroot.Graphics.Gdi.HFONT ,winmdroot.Foundation.HRESULT> ReleaseHfont_26; 1034 winmdroot.Graphics.Gdi.HFONT hFont 1052winmdroot.Foundation.HRESULT AddRefHfont(winmdroot.Graphics.Gdi.HFONT hFont); 1055winmdroot.Foundation.HRESULT ReleaseHfont(winmdroot.Graphics.Gdi.HFONT hFont);
System.Windows.Forms.Primitives.Tests (1)
Interop\User32\LOGFONTWTests.cs (1)
37HFONT handle = PInvokeCore.CreateFontIndirect(&logFont);