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)
10
public static explicit operator HICON(OLE_HANDLE handle) =>
new
((int)handle.Value);
Windows\Win32\UI\WindowsAndMessaging\HICON.cs (1)
11
public static explicit operator HICON(HANDLE handle) =>
new
((nint)handle);
121 references to HICON
System.Drawing.Common (21)
System\Drawing\Bitmap.cs (2)
137
PInvokeGdiPlus.GdipCreateBitmapFromHICON((
HICON
)hicon, &bitmap).ThrowIfFailed();
181
HICON
hicon;
System\Drawing\Icon.cs (11)
35
private
HICON
_handle;
40
internal Icon(
HICON
handle) : this(handle, false)
44
internal Icon(
HICON
handle, bool takeOwnership)
172
HICON
hIcon;
187
HICON
IHandle<
HICON
>.Handle => (
HICON
)Handle;
253
_handle =
HICON
.Null;
398
return new Icon((
HICON
)handle);
871
HICON
hicon =
HICON
.Null;
System\Drawing\SystemIcons.cs (1)
104
HICON
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)
15
public
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)
14
public static explicit operator
HICON
(LRESULT value) => (
HICON
)value.Value;
Windows\Win32\PInvokeCore.CopyImage.cs (4)
9
public static
HICON
CopyIcon<T>(T hImage, int cx, int cy, IMAGE_FLAGS flags = default)
10
where T : IHandle<
HICON
>
12
HICON
result = (
HICON
)CopyImage(hImage.Handle, GDI_IMAGE_TYPE.IMAGE_ICON, cx, cy, flags);
Windows\Win32\PInvokeCore.DrawIcon.cs (1)
9
where T : IHandle<
HICON
>
Windows\Win32\PInvokeCore.DrawIconEx.cs (2)
8
/// <inheritdoc cref="DrawIconEx(HDC, int, int,
HICON
, int, int, uint, HBRUSH, DI_FLAGS)"/>
17
where T : IHandle<
HICON
>
Windows\Win32\PInvokeCore.GetIconInfo.cs (2)
8
/// <inheritdoc cref="GetIconInfo(
HICON
, ICONINFO*)"/>
10
where T : IHandle<
HICON
>
Windows\Win32\System\Ole\OLE_HANDLE.cs (1)
10
public static explicit operator
HICON
(OLE_HANDLE handle) => new((int)handle.Value);
Windows\Win32\UI\WindowsAndMessaging\HICON.cs (6)
6
internal unsafe partial struct HICON : IHandle<
HICON
>
8
HICON
IHandle<
HICON
>.Handle => this;
9
object? IHandle<
HICON
>.Wrapper => null;
11
public static explicit operator
HICON
(HANDLE handle) => new((nint)handle);
12
public static implicit operator HANDLE(
HICON
handle) => new((nint)handle);
System.Private.Windows.GdiPlus (9)
System\Drawing\IIcon.cs (1)
6
internal 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)
353
int index = PInvoke.ImageList.ReplaceIcon(this, -1, new HandleRef<
HICON
>(icon, (
HICON
)icon.Handle));
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogIcon.cs (3)
190
HICON
handle =
HICON
.Null;
193
handle = (
HICON
)bitmap.GetHicon();
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogPage.cs (2)
648
iconUnion.hMainIcon = (
HICON
)icon.IconHandle;
673
iconUnion.hFooterIcon = (
HICON
)icon.IconHandle;
System\Windows\Forms\ErrorProvider\ErrorProvider.IconRegion.cs (3)
13
internal class IconRegion : IHandle<
HICON
>
26
public
HICON
Handle => (
HICON
)_icon.Handle;
System\Windows\Forms\Input\Cursor.cs (7)
20
public sealed class Cursor : IDisposable, ISerializable, IHandle<
HICON
>, IHandle<HANDLE>, IHandle<HCURSOR>
214
HICON
IHandle<
HICON
>.Handle => (
HICON
)Handle;
375
private Size GetIconSize(
HICON
iconHandle)
418
HICON
cursorHandle = (
HICON
)oleHandle;
System\Windows\Forms\MDI\MDIControlStrip.cs (2)
80
HICON
hIcon = (
HICON
)PInvokeCore.SendMessage(GetSafeHandle(_target), PInvokeCore.WM_GETICON, (WPARAM)PInvoke.ICON_SMALL);
System.Windows.Forms.Primitives (7)
System\Drawing\ImageExtensions.cs (1)
27
return (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
)"/>
104
THICON hicon) where THIML : IHandle<HIMAGELIST> where THICON : IHandle<
HICON
>
System.Windows.Forms.Primitives.TestUtilities (1)
Win32\WindowClass.cs (1)
41
HICON
icon = default,
System.Windows.Forms.Tests (18)
System\Windows\Forms\FormTests.cs (16)
199
HICON
hSmallIcon = (
HICON
)PInvokeCore.SendMessage(form, PInvokeCore.WM_GETICON, (WPARAM)PInvoke.ICON_SMALL);
202
HICON
hLargeIcon = (
HICON
)PInvokeCore.SendMessage(form, PInvokeCore.WM_GETICON, (WPARAM)PInvoke.ICON_BIG);
1082
HICON
hSmallIcon = (
HICON
)PInvokeCore.SendMessage(form, PInvokeCore.WM_GETICON, (WPARAM)PInvoke.ICON_SMALL);
1083
HICON
hLargeIcon = (
HICON
)PInvokeCore.SendMessage(form, PInvokeCore.WM_GETICON, (WPARAM)PInvoke.ICON_BIG);
1283
HICON
hSmallIcon = (
HICON
)PInvokeCore.SendMessage(control, PInvokeCore.WM_GETICON, (WPARAM)PInvoke.ICON_SMALL);
1285
HICON
hLargeIcon = (
HICON
)PInvokeCore.SendMessage(control, PInvokeCore.WM_GETICON, (WPARAM)PInvoke.ICON_BIG);
1290
hSmallIcon = (
HICON
)PInvokeCore.SendMessage(control, PInvokeCore.WM_GETICON, (WPARAM)PInvoke.ICON_SMALL);
1292
hLargeIcon = (
HICON
)PInvokeCore.SendMessage(control, PInvokeCore.WM_GETICON, (WPARAM)PInvoke.ICON_BIG);
1297
hSmallIcon = (
HICON
)PInvokeCore.SendMessage(control, PInvokeCore.WM_GETICON, (WPARAM)PInvoke.ICON_SMALL);
1299
hLargeIcon = (
HICON
)PInvokeCore.SendMessage(control, PInvokeCore.WM_GETICON, (WPARAM)PInvoke.ICON_BIG);
System\Windows\Forms\MdiControlStripTests.cs (2)
331
HICON
hicon = (
HICON
)new Bitmap(256, 256).GetHicon();