Files
SabreTools.Serialization/SabreTools.Data.Models/PortableExecutable/Resource/Entries/MenuItemExtended.cs
Matt Nadareski 7689c6dd07 Libraries
This change looks dramatic, but it's just separating out the already-split namespaces into separate top-level folders. In theory, every single one could be built into their own Nuget package. `SabreTools.Serialization` still builds the normal Nuget package that is used by all other projects and includes all namespaces.
2026-03-21 16:26:56 -04:00

45 lines
1.5 KiB
C#

using System.Runtime.InteropServices;
namespace SabreTools.Data.Models.PortableExecutable.Resource.Entries
{
/// <summary>
/// Defines a menu item in an extended menu template. This structure definition is for
/// explanation only; it is not present in any standard header file.
/// </summary>
/// <see href="https://learn.microsoft.com/en-us/windows/win32/menurc/menuex-template-item"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class MenuItemExtended : MenuItem
{
/// <summary>
/// Describes the menu item.
/// </summary>
[MarshalAs(UnmanagedType.U4)]
public MenuFlags ItemType;
/// <summary>
/// Describes the menu item.
/// </summary>
[MarshalAs(UnmanagedType.U4)]
public MenuFlags State;
/// <summary>
/// A numeric expression that identifies the menu item that is passed in the
/// WM_COMMAND message.
/// </summary>
public uint ID;
/// <summary>
/// A set of bit flags that specify the type of menu item.
/// </summary>
[MarshalAs(UnmanagedType.U4)]
public MenuFlags Flags;
/// <summary>
/// A null-terminated Unicode string that contains the text for this menu item.
/// There is no fixed limit on the size of this string.
/// </summary>
[MarshalAs(UnmanagedType.LPWStr)]
public string MenuText = string.Empty;
}
}