6 instantiations of HICON
System.Private.Windows.Core (6)
Windows.Win32.HCURSOR.g.cs (1)
61 public static implicit operator HICON(HCURSOR value) => new HICON(value.Value);
Windows.Win32.HICON.g.cs (3)
41 public static explicit operator HICON(void* value) => new HICON(value); 57 public static explicit operator HICON(IntPtr value) => new HICON((void*)value.ToPointer()); 59 public static explicit operator HICON(UIntPtr value) => new HICON((void*)value.ToPointer());
Windows\Win32\System\Ole\OLE_HANDLE.cs (1)
10public static explicit operator HICON(OLE_HANDLE handle) => new((int)handle.Value);
Windows\Win32\UI\WindowsAndMessaging\HICON.cs (1)
11public static explicit operator HICON(HANDLE handle) => new((nint)handle);
121 references to HICON
System.Drawing.Common (21)
System\Drawing\Bitmap.cs (2)
137PInvokeGdiPlus.GdipCreateBitmapFromHICON((HICON)hicon, &bitmap).ThrowIfFailed(); 181HICON hicon;
System\Drawing\Icon.cs (11)
35private HICON _handle; 40internal Icon(HICON handle) : this(handle, false) 44internal Icon(HICON handle, bool takeOwnership) 172HICON hIcon; 187HICON IHandle<HICON>.Handle => (HICON)Handle; 253_handle = HICON.Null; 398return new Icon((HICON)handle); 871HICON hicon = HICON.Null;
System\Drawing\SystemIcons.cs (1)
104HICON hicon;
Windows.Win32.PInvoke.SHELL32.dll.g.cs (3)
52 internal static extern unsafe winmdroot.UI.WindowsAndMessaging.HICON ExtractAssociatedIcon(winmdroot.Foundation.HINSTANCE hInst, winmdroot.Foundation.PWSTR pszIconPath, ushort* piIcon); 90 internal static extern unsafe winmdroot.Foundation.HRESULT SHDefExtractIcon(winmdroot.Foundation.PCWSTR pszIconFile, int iIndex, uint uFlags, [Optional] winmdroot.UI.WindowsAndMessaging.HICON* phiconLarge, [Optional] winmdroot.UI.WindowsAndMessaging.HICON* phiconSmall, uint nIconSize);
Windows.Win32.PInvoke.USER32.dll.g.cs (3)
60 internal static unsafe winmdroot.UI.WindowsAndMessaging.HICON CreateIconFromResourceEx(byte* presbits, uint dwResSize, winmdroot.Foundation.BOOL fIcon, uint dwVer, int cxDesired, int cyDesired, winmdroot.UI.WindowsAndMessaging.IMAGE_FLAGS Flags) 63 winmdroot.UI.WindowsAndMessaging.HICON __retVal = LocalExternFunction(presbits, dwResSize, fIcon, dwVer, cxDesired, cyDesired, Flags); 68 static extern unsafe winmdroot.UI.WindowsAndMessaging.HICON LocalExternFunction(byte* presbits, uint dwResSize, winmdroot.Foundation.BOOL fIcon, uint dwVer, int cxDesired, int cyDesired, winmdroot.UI.WindowsAndMessaging.IMAGE_FLAGS Flags);
Windows\Win32\UI\Shell\SHSTOCKICONINFO.cs (1)
15public HICON hIcon;
System.Private.Windows.Core (46)
Windows.Win32.HCURSOR.g.cs (1)
61 public static implicit operator HICON(HCURSOR value) => new HICON(value.Value);
Windows.Win32.HICON.g.cs (13)
25 : IEquatable<HICON> 35 internal static HICON Null => default; 39 public static implicit operator void*(HICON value) => value.Value; 41 public static explicit operator HICON(void* value) => new HICON(value); 43 public static bool operator ==(HICON left, HICON right) => left.Value == right.Value; 45 public static bool operator !=(HICON left, HICON right) => !(left == right); 47 public bool Equals(HICON other) => this.Value == other.Value; 49 public override bool Equals(object obj) => obj is HICON other && this.Equals(other); 55 public static implicit operator IntPtr(HICON value) => new IntPtr(value.Value); 57 public static explicit operator HICON(IntPtr value) => new HICON((void*)value.ToPointer()); 59 public static explicit operator HICON(UIntPtr value) => new HICON((void*)value.ToPointer());
Windows.Win32.PICTDESC.g.cs (1)
79 internal winmdroot.UI.WindowsAndMessaging.HICON hicon;
Windows.Win32.PInvokeCore.USER32.dll.g.cs (13)
162 internal static winmdroot.Foundation.BOOL DestroyIcon(winmdroot.UI.WindowsAndMessaging.HICON hIcon) 170 static extern winmdroot.Foundation.BOOL LocalExternFunction(winmdroot.UI.WindowsAndMessaging.HICON hIcon); 216 internal static 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) 224 static extern winmdroot.Foundation.BOOL LocalExternFunction(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); 500 /// <inheritdoc cref="GetIconInfo(winmdroot.UI.WindowsAndMessaging.HICON, winmdroot.UI.WindowsAndMessaging.ICONINFO*)"/> 502 internal static unsafe winmdroot.Foundation.BOOL GetIconInfo(winmdroot.UI.WindowsAndMessaging.HICON hIcon, out winmdroot.UI.WindowsAndMessaging.ICONINFO piconinfo) 525 internal static unsafe winmdroot.Foundation.BOOL GetIconInfo(winmdroot.UI.WindowsAndMessaging.HICON hIcon, winmdroot.UI.WindowsAndMessaging.ICONINFO* piconinfo) 533 static extern unsafe winmdroot.Foundation.BOOL LocalExternFunction(winmdroot.UI.WindowsAndMessaging.HICON hIcon, winmdroot.UI.WindowsAndMessaging.ICONINFO* piconinfo); 745 internal static unsafe winmdroot.UI.WindowsAndMessaging.HICON LoadIcon(winmdroot.Foundation.HINSTANCE hInstance, string lpIconName) 749 winmdroot.UI.WindowsAndMessaging.HICON __result = PInvokeCore.LoadIcon(hInstance, lpIconNameLocal); 772 internal static winmdroot.UI.WindowsAndMessaging.HICON LoadIcon(winmdroot.Foundation.HINSTANCE hInstance, winmdroot.Foundation.PCWSTR lpIconName) 775 winmdroot.UI.WindowsAndMessaging.HICON __retVal = LocalExternFunction(hInstance, lpIconName); 780 static extern winmdroot.UI.WindowsAndMessaging.HICON LocalExternFunction(winmdroot.Foundation.HINSTANCE hInstance, winmdroot.Foundation.PCWSTR lpIconName);
Windows\Win32\Foundation\LRESULT.cs (2)
14public static explicit operator HICON(LRESULT value) => (HICON)value.Value;
Windows\Win32\PInvokeCore.CopyImage.cs (4)
9public static HICON CopyIcon<T>(T hImage, int cx, int cy, IMAGE_FLAGS flags = default) 10where T : IHandle<HICON> 12HICON result = (HICON)CopyImage(hImage.Handle, GDI_IMAGE_TYPE.IMAGE_ICON, cx, cy, flags);
Windows\Win32\PInvokeCore.DrawIcon.cs (1)
9where T : IHandle<HICON>
Windows\Win32\PInvokeCore.DrawIconEx.cs (2)
8/// <inheritdoc cref="DrawIconEx(HDC, int, int, HICON, int, int, uint, HBRUSH, DI_FLAGS)"/> 17where T : IHandle<HICON>
Windows\Win32\PInvokeCore.GetIconInfo.cs (2)
8/// <inheritdoc cref="GetIconInfo(HICON, ICONINFO*)"/> 10where T : IHandle<HICON>
Windows\Win32\System\Ole\OLE_HANDLE.cs (1)
10public static explicit operator HICON(OLE_HANDLE handle) => new((int)handle.Value);
Windows\Win32\UI\WindowsAndMessaging\HICON.cs (6)
6internal unsafe partial struct HICON : IHandle<HICON> 8HICON IHandle<HICON>.Handle => this; 9object? IHandle<HICON>.Wrapper => null; 11public static explicit operator HICON(HANDLE handle) => new((nint)handle); 12public static implicit operator HANDLE(HICON handle) => new((nint)handle);
System.Private.Windows.GdiPlus (9)
System\Drawing\IIcon.cs (1)
6internal interface IIcon : IHandle<HICON>
System\Drawing\IIconExtensions.cs (1)
21(HICON)PInvokeCore.CopyImage(
Windows.Win32.PInvokeGdiPlus.gdiplus.dll.g.cs (7)
908 /// <inheritdoc cref="GdipCreateBitmapFromHICON(winmdroot.UI.WindowsAndMessaging.HICON, winmdroot.Graphics.GdiPlus.GpBitmap**)"/> 909 internal static unsafe winmdroot.Graphics.GdiPlus.Status GdipCreateBitmapFromHICON(winmdroot.UI.WindowsAndMessaging.HICON hicon, ref winmdroot.Graphics.GdiPlus.GpBitmap* bitmap) 919 internal static extern unsafe winmdroot.Graphics.GdiPlus.Status GdipCreateBitmapFromHICON(winmdroot.UI.WindowsAndMessaging.HICON hicon, winmdroot.Graphics.GdiPlus.GpBitmap** bitmap); 1163 /// <inheritdoc cref="GdipCreateHICONFromBitmap(winmdroot.Graphics.GdiPlus.GpBitmap*, winmdroot.UI.WindowsAndMessaging.HICON*)"/> 1164 internal static unsafe winmdroot.Graphics.GdiPlus.Status GdipCreateHICONFromBitmap(ref winmdroot.Graphics.GdiPlus.GpBitmap bitmap, ref winmdroot.UI.WindowsAndMessaging.HICON hbmReturn) 1166 fixed (winmdroot.UI.WindowsAndMessaging.HICON* hbmReturnLocal = &hbmReturn) 1177 internal static extern unsafe winmdroot.Graphics.GdiPlus.Status GdipCreateHICONFromBitmap(winmdroot.Graphics.GdiPlus.GpBitmap* bitmap, winmdroot.UI.WindowsAndMessaging.HICON* hbmReturn);
System.Windows.Forms (19)
System\Windows\Forms\Controls\ImageList\ImageList.cs (2)
353int index = PInvoke.ImageList.ReplaceIcon(this, -1, new HandleRef<HICON>(icon, (HICON)icon.Handle));
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogIcon.cs (3)
190HICON handle = HICON.Null; 193handle = (HICON)bitmap.GetHicon();
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogPage.cs (2)
648iconUnion.hMainIcon = (HICON)icon.IconHandle; 673iconUnion.hFooterIcon = (HICON)icon.IconHandle;
System\Windows\Forms\ErrorProvider\ErrorProvider.IconRegion.cs (3)
13internal class IconRegion : IHandle<HICON> 26public HICON Handle => (HICON)_icon.Handle;
System\Windows\Forms\Input\Cursor.cs (7)
20public sealed class Cursor : IDisposable, ISerializable, IHandle<HICON>, IHandle<HANDLE>, IHandle<HCURSOR> 214HICON IHandle<HICON>.Handle => (HICON)Handle; 375private Size GetIconSize(HICON iconHandle) 418HICON cursorHandle = (HICON)oleHandle;
System\Windows\Forms\MDI\MDIControlStrip.cs (2)
80HICON hIcon = (HICON)PInvokeCore.SendMessage(GetSafeHandle(_target), PInvokeCore.WM_GETICON, (WPARAM)PInvoke.ICON_SMALL);
System.Windows.Forms.Primitives (7)
System\Drawing\ImageExtensions.cs (1)
27return (Image)(Icon.FromHandle((HICON)handle).Clone());
Windows.Win32.PInvoke.COMCTL32.dll.g.cs (1)
331 internal static extern int ImageList_ReplaceIcon(winmdroot.UI.Controls.HIMAGELIST himl, int i, winmdroot.UI.WindowsAndMessaging.HICON hicon);
Windows.Win32.TASKDIALOGCONFIG.g.cs (2)
176 internal winmdroot.UI.WindowsAndMessaging.HICON hMainIcon; 187 internal winmdroot.UI.WindowsAndMessaging.HICON hFooterIcon;
Windows.Win32.WNDCLASSW.g.cs (1)
64 internal winmdroot.UI.WindowsAndMessaging.HICON hIcon;
Windows\Win32\PInvoke.ImageList.cs (2)
100/// <inheritdoc cref="ImageList_ReplaceIcon(HIMAGELIST, int, HICON)"/> 104THICON hicon) where THIML : IHandle<HIMAGELIST> where THICON : IHandle<HICON>
System.Windows.Forms.Primitives.TestUtilities (1)
Win32\WindowClass.cs (1)
41HICON icon = default,
System.Windows.Forms.Tests (18)
System\Windows\Forms\FormTests.cs (16)
199HICON hSmallIcon = (HICON)PInvokeCore.SendMessage(form, PInvokeCore.WM_GETICON, (WPARAM)PInvoke.ICON_SMALL); 202HICON hLargeIcon = (HICON)PInvokeCore.SendMessage(form, PInvokeCore.WM_GETICON, (WPARAM)PInvoke.ICON_BIG); 1082HICON hSmallIcon = (HICON)PInvokeCore.SendMessage(form, PInvokeCore.WM_GETICON, (WPARAM)PInvoke.ICON_SMALL); 1083HICON hLargeIcon = (HICON)PInvokeCore.SendMessage(form, PInvokeCore.WM_GETICON, (WPARAM)PInvoke.ICON_BIG); 1283HICON hSmallIcon = (HICON)PInvokeCore.SendMessage(control, PInvokeCore.WM_GETICON, (WPARAM)PInvoke.ICON_SMALL); 1285HICON hLargeIcon = (HICON)PInvokeCore.SendMessage(control, PInvokeCore.WM_GETICON, (WPARAM)PInvoke.ICON_BIG); 1290hSmallIcon = (HICON)PInvokeCore.SendMessage(control, PInvokeCore.WM_GETICON, (WPARAM)PInvoke.ICON_SMALL); 1292hLargeIcon = (HICON)PInvokeCore.SendMessage(control, PInvokeCore.WM_GETICON, (WPARAM)PInvoke.ICON_BIG); 1297hSmallIcon = (HICON)PInvokeCore.SendMessage(control, PInvokeCore.WM_GETICON, (WPARAM)PInvoke.ICON_SMALL); 1299hLargeIcon = (HICON)PInvokeCore.SendMessage(control, PInvokeCore.WM_GETICON, (WPARAM)PInvoke.ICON_BIG);
System\Windows\Forms\MdiControlStripTests.cs (2)
331HICON hicon = (HICON)new Bitmap(256, 256).GetHicon();