<PackageReference Include="System.Drawing.Common" Version="9.0.8" />

HBITMAP

using System; using System.CodeDom.Compiler; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Windows.Win32.Graphics.Gdi { [DebuggerDisplay("{Value}")] [GeneratedCode("Microsoft.Windows.CsWin32", "0.3.106+a37a0b4b70")] internal readonly struct HBITMAP : IDisposable, IEquatable<HBITMAP> { internal readonly IntPtr Value; internal static readonly HBITMAP HBMMENU_CALLBACK = (HBITMAP)(IntPtr)(-1); internal static readonly HBITMAP HBMMENU_SYSTEM = (HBITMAP)(IntPtr)1; internal static readonly HBITMAP HBMMENU_MBAR_RESTORE = (HBITMAP)(IntPtr)2; internal static readonly HBITMAP HBMMENU_MBAR_MINIMIZE = (HBITMAP)(IntPtr)3; internal static readonly HBITMAP HBMMENU_MBAR_CLOSE = (HBITMAP)(IntPtr)5; internal static readonly HBITMAP HBMMENU_MBAR_CLOSE_D = (HBITMAP)(IntPtr)6; internal static readonly HBITMAP HBMMENU_MBAR_MINIMIZE_D = (HBITMAP)(IntPtr)7; internal static readonly HBITMAP HBMMENU_POPUP_CLOSE = (HBITMAP)(IntPtr)8; internal static readonly HBITMAP HBMMENU_POPUP_RESTORE = (HBITMAP)(IntPtr)9; internal static readonly HBITMAP HBMMENU_POPUP_MAXIMIZE = (HBITMAP)(IntPtr)10; internal static readonly HBITMAP HBMMENU_POPUP_MINIMIZE = (HBITMAP)(IntPtr)11; internal static HBITMAP Null => default(HBITMAP); internal bool IsNull => Value == (IntPtr)0; public void Dispose() { if (!IsNull) PInvokeCore.DeleteObject(this); } internal HBITMAP(IntPtr value) { Value = value; } public static implicit operator IntPtr(HBITMAP value) { return value.Value; } public static explicit operator HBITMAP(IntPtr value) { return new HBITMAP(value); } public static bool operator ==(HBITMAP left, HBITMAP right) { return left.Value == right.Value; } public static bool operator !=(HBITMAP left, HBITMAP right) { return !(left == right); } public bool Equals(HBITMAP other) { return Value == other.Value; } public override bool Equals(object obj) { if (obj is HBITMAP) { HBITMAP other = (HBITMAP)obj; return Equals(other); } return false; } public override int GetHashCode() { return Value.GetHashCode(); } public override string ToString() { DefaultInterpolatedStringHandler defaultInterpolatedStringHandler = new DefaultInterpolatedStringHandler(2, 1); defaultInterpolatedStringHandler.AppendLiteral("0x"); defaultInterpolatedStringHandler.AppendFormatted(Value, "x"); return defaultInterpolatedStringHandler.ToStringAndClear(); } public static implicit operator HGDIOBJ(HBITMAP value) { return new HGDIOBJ(value.Value); } } }