File: Windows.Win32.MENUITEMINFOW.g.cs
Project: src\src\System.Windows.Forms.Primitives\src\System.Windows.Forms.Primitives.csproj (System.Windows.Forms.Primitives)
// ------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
// ------------------------------------------------------------------------------

#pragma warning disable CS1591,CS1573,CS0465,CS0649,CS8019,CS1570,CS1584,CS1658,CS0436,CS8981
using global::System;
using global::System.Diagnostics;
using global::System.Diagnostics.CodeAnalysis;
using global::System.Runtime.CompilerServices;
using global::System.Runtime.InteropServices;
using global::System.Runtime.Versioning;
using winmdroot = global::Windows.Win32;
namespace Windows.Win32
{
	namespace UI.WindowsAndMessaging
	{
		/// <summary>Contains information about a menu item. (MENUITEMINFOW)</summary>
		/// <remarks>
		/// <para>The <b>MENUITEMINFO</b> structure is used with the <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-getmenuiteminfoa">GetMenuItemInfo</a>, <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-insertmenuitema">InsertMenuItem</a>, and <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-setmenuiteminfoa">SetMenuItemInfo</a> functions. The menu can display items using text, bitmaps, or both.</para>
		/// <para>> [!NOTE] > The winuser.h header defines MENUITEMINFO as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see [Conventions for Function Prototypes](/windows/win32/intl/conventions-for-function-prototypes).</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/ns-winuser-menuiteminfow#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[global::System.CodeDom.Compiler.GeneratedCode("Microsoft.Windows.CsWin32", "0.3.151+58e949951d.RR")]
		internal partial struct MENUITEMINFOW
		{
			/// <summary>
			/// <para>Type: <b>UINT</b> The size of the structure, in bytes. The caller must set this member to <c>sizeof(MENUITEMINFO)</c>.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/ns-winuser-menuiteminfow#members">Read more on docs.microsoft.com</see>.</para>
			/// </summary>
			internal uint cbSize;

			/// <summary>Type: <b>UINT</b></summary>
			internal winmdroot.UI.WindowsAndMessaging.MENU_ITEM_MASK fMask;

			/// <summary>Type: <b>UINT</b></summary>
			internal winmdroot.UI.WindowsAndMessaging.MENU_ITEM_TYPE fType;

			/// <summary>
			/// <para>Type: <b>UINT</b> The menu item state. This member can be one or more of these values. Set <b>fMask</b> to <b>MIIM_STATE</b> to use <b>fState</b>. </para>
			/// <para>This doc was truncated.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/ns-winuser-menuiteminfow#members">Read more on docs.microsoft.com</see>.</para>
			/// </summary>
			internal winmdroot.UI.WindowsAndMessaging.MENU_ITEM_STATE fState;

			/// <summary>
			/// <para>Type: <b>UINT</b> An application-defined value that identifies the menu item. Set <b>fMask</b>  to <b>MIIM_ID</b>  to use <b>wID</b>.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/ns-winuser-menuiteminfow#members">Read more on docs.microsoft.com</see>.</para>
			/// </summary>
			internal uint wID;

			/// <summary>
			/// <para>Type: <b>HMENU</b> A handle to the drop-down menu or submenu associated with the menu item. If the menu item is not an item that opens a drop-down menu or submenu, this member is <b>NULL</b>. Set <b>fMask</b>  to <b>MIIM_SUBMENU</b>  to use <b>hSubMenu</b>.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/ns-winuser-menuiteminfow#members">Read more on docs.microsoft.com</see>.</para>
			/// </summary>
			internal winmdroot.UI.WindowsAndMessaging.HMENU hSubMenu;

			/// <summary>
			/// <para>Type: <b>HBITMAP</b> A handle to the bitmap to display next to the item if it is selected. If this member is <b>NULL</b>, a default bitmap is used. If the <b>MFT_RADIOCHECK</b> type value is specified, the default bitmap is a bullet. Otherwise, it is a check mark. Set <b>fMask</b> to <b>MIIM_CHECKMARKS</b> to use <b>hbmpChecked</b>.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/ns-winuser-menuiteminfow#members">Read more on docs.microsoft.com</see>.</para>
			/// </summary>
			internal winmdroot.Graphics.Gdi.HBITMAP hbmpChecked;

			/// <summary>
			/// <para>Type: <b>HBITMAP</b> A handle to the bitmap to display next to the item if it is not selected. If this member is <b>NULL</b>, no bitmap is used. Set <b>fMask</b> to <b>MIIM_CHECKMARKS</b> to use <b>hbmpUnchecked</b>.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/ns-winuser-menuiteminfow#members">Read more on docs.microsoft.com</see>.</para>
			/// </summary>
			internal winmdroot.Graphics.Gdi.HBITMAP hbmpUnchecked;

			/// <summary>
			/// <para>Type: <b>ULONG_PTR</b> An application-defined value associated with the menu item. Set <b>fMask</b> to <b>MIIM_DATA</b> to use <b>dwItemData</b>.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/ns-winuser-menuiteminfow#members">Read more on docs.microsoft.com</see>.</para>
			/// </summary>
			internal nuint dwItemData;

			/// <summary>
			/// <para>Type: <b>LPTSTR</b> The contents of the menu item. The meaning of this member depends on the value of <b>fType</b> and is used only if the <b>MIIM_TYPE</b> flag is set in the <b>fMask</b> member. To retrieve a menu item of type <b>MFT_STRING</b>, first find the size of the string by setting the <b>dwTypeData</b> member of <b>MENUITEMINFO</b>  to <b>NULL</b> and then calling <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-getmenuiteminfoa">GetMenuItemInfo</a>. The value of <b>cch</b>+1 is the size needed. Then allocate a buffer of this size, place the pointer to the buffer in <b>dwTypeData</b>, increment <b>cch</b>, and call <b>GetMenuItemInfo</b> once again to fill the buffer with the string. If the retrieved menu item is of some other type, then <b>GetMenuItemInfo</b> sets the <b>dwTypeData</b> member to a value whose type is specified by the <b>fType</b> member. When using with the <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-setmenuiteminfoa">SetMenuItemInfo</a> function, this member should contain a value whose type is specified by the <b>fType</b> member. <b>dwTypeData</b> is used only if the <b>MIIM_STRING</b> flag is set in the <b>fMask</b> member</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/ns-winuser-menuiteminfow#members">Read more on docs.microsoft.com</see>.</para>
			/// </summary>
			internal winmdroot.Foundation.PWSTR dwTypeData;

			/// <summary>
			/// <para>Type: <b>UINT</b> The length of the menu item text, in characters, when information is received about a menu item of the <b>MFT_STRING</b> type. However, <b>cch</b> is used only if the <b>MIIM_TYPE</b> flag is set in the <b>fMask</b> member and is zero otherwise. Also, <b>cch</b> is ignored when the content of a menu item is set by calling <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-setmenuiteminfoa">SetMenuItemInfo</a>. Note that, before calling <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-getmenuiteminfoa">GetMenuItemInfo</a>, the application must set <b>cch</b> to the length of the buffer pointed to by the <b>dwTypeData</b> member. If the retrieved menu item is of type <b>MFT_STRING</b> (as indicated by the <b>fType</b> member), then <b>GetMenuItemInfo</b> changes <b>cch</b> to the length of the menu item text. If the retrieved menu item is of some other type, <b>GetMenuItemInfo</b> sets the <b>cch</b> field to zero. The <b>cch</b> member is used when the <b>MIIM_STRING</b> flag is set in the <b>fMask</b> member.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/ns-winuser-menuiteminfow#members">Read more on docs.microsoft.com</see>.</para>
			/// </summary>
			internal uint cch;

			/// <summary>
			/// <para>Type: <b>HBITMAP</b> A handle to the bitmap to be displayed, or it can be one of the values in the following table. It is used when the <b>MIIM_BITMAP</b> flag is set in the <b>fMask</b> member. </para>
			/// <para>This doc was truncated.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/ns-winuser-menuiteminfow#members">Read more on docs.microsoft.com</see>.</para>
			/// </summary>
			internal winmdroot.Graphics.Gdi.HBITMAP hbmpItem;
		}
	}
}