/// <summary>The variable that receives information about the results of a hit test.</summary>
[Flags]
publicenumHeaderHitTestFlag:uint
{
/// <summary>The point is above the header control's bounding rectangle.</summary>
HHT_ABOVE=0x0100,
/// <summary>The point is below the header control's bounding rectangle.</summary>
HHT_BELOW=0x0200,
/// <summary>The point is inside the header control's bounding rectangle but is not over a header item.</summary>
HHT_NOWHERE=0x0001,
/// <summary>The point is on the divider between two header items.</summary>
HHT_ONDIVIDER=0x0004,
/// <summary>
/// The point is on the divider of an item that has a width of zero. Dragging the divider reveals the item instead of resizing the item to the left
/// of the divider.
/// </summary>
HHT_ONDIVOPEN=0x0008,
/// <summary>The point is within the split button of the item. The style HDF_SPLITBUTTON must be set on the item.</summary>
HHT_ONDROPDOWN=0x2000,
/// <summary>The point is over the filter area.</summary>
HHT_ONFILTER=0x0010,
/// <summary>The point is on the filter button.</summary>
HHT_ONFILTERBUTTON=0x0020,
/// <summary>The point is to the left of the header control's bounding rectangle.</summary>
HHT_ONHEADER=0x0002,
/// <summary>The point is within the state icon of the item. If style HDS_CHECKBOXES is specified, the point is within the checkbox of the item.</summary>
HHT_ONITEMSTATEICON=0x1000,
/// <summary>The point is within the overflow button of the header control. The style HDS_OVERFLOW must be set on the header control.</summary>
HHT_ONOVERFLOW=0x4000,
/// <summary>The point is to the left of the header control's bounding rectangle.</summary>
HHT_TOLEFT=0x0800,
/// <summary>The point is to the right of the header control's bounding rectangle.</summary>
HHT_TORIGHT=0x0400,
}
/// <summary>The type of filter specified by <see cref="HDITEM.pvFilter"/>.</summary>
publicenumHeaderItemFilterType
{
/// <summary>String data.</summary>
HDFT_ISSTRING=0,
/// <summary>Numerical data.</summary>
HDFT_ISNUMBER=1,
/// <summary>Date data. The pvFilter member is a pointer to a SYSTEMTIME structure.</summary>
HDFT_ISDATE=2,
/// <summary>Ignore pvFilter.</summary>
HDFT_HASNOVALUE=0x8000
}
/// <summary>Flags that specify an <see cref="HDITEM"/> format.</summary>
[Flags]
publicenumHeaderItemFormat:uint
{
/// <summary>The item's contents are left-aligned.</summary>
HDF_LEFT=0x0000,
/// <summary>The item's contents are right-aligned.</summary>
HDF_RIGHT=0x0001,
/// <summary>The item's contents are centered.</summary>
HDF_CENTER=0x0002,
/// <summary>Isolate the bits corresponding to the three justification flags listed in the preceding table.</summary>
HDF_JUSTIFYMASK=0x0003,
/// <summary>
/// Typically, windows displays text left-to-right (LTR). Windows can be mirrored to display languages such as Hebrew or Arabic that read
/// right-to-left (RTL). Usually, header text is read in the same direction as the text in its parent window. If HDF_RTLREADING is set, header text
/// will read in the opposite direction from the text in the parent window.
/// </summary>
HDF_RTLREADING=0x0004,
/// <summary>The item displays a checkbox. The flag is only valid when the HDS_CHECKBOXES style is first set on the header control.</summary>
HDF_CHECKBOX=0x0040,
/// <summary>The item displays a checked checkbox. The flag is only valid when HDF_CHECKBOX is also set.</summary>
HDF_CHECKED=0x0080,
/// <summary>The width of the item cannot be modified by a user action to resize it.</summary>
HDF_FIXEDWIDTH=0x0100,
/// <summary>The header control's owner draws the item.</summary>
HDF_OWNERDRAW=0x8000,
/// <summary>The item displays a string.</summary>
HDF_STRING=0x4000,
/// <summary>The item displays a bitmap.</summary>
HDF_BITMAP=0x2000,
/// <summary>The bitmap appears to the right of text.</summary>
HDF_BITMAP_ON_RIGHT=0x1000,
/// <summary>
/// Display an image from an image list. Specify the image list by sending an HDM_SETIMAGELIST message. Specify the index of the image in the iImage
/// member of this structure.
/// </summary>
HDF_IMAGE=0x0800,
/// <summary>
/// Draws an up-arrow on this item. This is typically used to indicate that information in the current window is sorted on this column in ascending
/// order. This flag cannot be combined with HDF_IMAGE or HDF_BITMAP.
/// </summary>
HDF_SORTUP=0x0400,
/// <summary>
/// Draws a down-arrow on this item. This is typically used to indicate that information in the current window is sorted on this column in descending
/// order. This flag cannot be combined with HDF_IMAGE or HDF_BITMAP.
/// </summary>
HDF_SORTDOWN=0x0200,
/// <summary>The item displays a split button. The HDN_DROPDOWN notification is sent when the split button is clicked.</summary>
HDF_SPLITBUTTON=0x1000000
}
[Flags]
publicenumHeaderItemImageDisplay
{
None,
Bitmap=0x2000,
ImageListItem=0x0800,
DownArrow=0x0200,
UpArrow=0x0400,
}
/// <summary>Flags indicating which <see cref="HDITEM"/> structure members contain valid data or must be filled in.</summary>
[Flags]
publicenumHeaderItemMask:uint
{
/// <summary>The <see cref="HDITEM.hbm"/> member is valid.</summary>
HDI_BITMAP=0x0010,
/// <summary>
/// While handling the message HDM_GETITEM, the header control may not have all the values needed to complete the request. In this case, the control
/// must call the application back for the values via the HDN_GETDISPINFO notification. If HDI_DI_SETITEM has been passed in the HDM_GETITEM message,
/// the control will cache any values returned from HDN_GETDISPINFO (otherwise the values remain unset.)
/// </summary>
HDI_DI_SETITEM=0x0040,
/// <summary>
/// The <see cref="HDITEM.type"/> and <see cref="HDITEM.pvFilter"/> members are valid. This is used to filter out the values specified in the type member.
/// </summary>
HDI_FILTER=0x0100,
/// <summary>The <see cref="HDITEM.fmt"/> member is valid.</summary>
HDI_FORMAT=0x0004,
/// <summary>The same as HDI_WIDTH.</summary>
HDI_HEIGHT=HDI_WIDTH,
/// <summary>The <see cref="HDITEM.iImage"/> member is valid and specifies the image to be displayed with the item.</summary>
HDI_IMAGE=0x0020,
/// <summary>The <see cref="HDITEM.lParam"/> member is valid.</summary>
HDI_LPARAM=0x0008,
/// <summary>The <see cref="HDITEM.iOrder"/> member is valid and specifies the item's order value.</summary>
HDI_ORDER=0x0080,
/// <summary>The <see cref="HDITEM.state"/> member is valid.</summary>
HDI_STATE=0x0200,
/// <summary>The <see cref="HDITEM.pszText"/> and <see cref="HDITEM.cchTextMax"/> members are valid.</summary>
HDI_TEXT=0x0002,
/// <summary>The <see cref="HDITEM.cxy"/> member is valid and specifies the item's width.</summary>
HDI_WIDTH=0x0001,
/// <summary>All <see cref="HDITEM"/> members are valid.</summary>
HDI_ALL=0x03FF,
}
/// <summary>Valid entries for <see cref="HDITEM.state"/>.</summary>
publicenumHeaderItemState
{
/// <summary>No state value.</summary>
None=0,
/// <summary>The item has keyboard focus.</summary>
/// Sent to the owner of a header control when the control needs information about a callback header item. This notification code is sent as a
/// <c>WM_NOTIFY</c> message.
/// </summary>
/// <param name="lParam">
/// A pointer to an <c>NMHDDISPINFO</c> structure. On input, the fields of the structure specify what information is required and the item of interest.
/// Notifies a header control's parent window that the user clicked the control. This notification code is sent in the form of a <c>WM_NOTIFY</c> message.
/// </summary>
/// <param name="lParam">
/// A pointer to an <c>NMHEADER</c> structure that identifies the header control and specifies the index of the header item that was clicked and the
/// mouse button used to click the item. The <c>pItem</c> member is set to <c>NULL</c>.
/// Notifies a header control's parent window that the user clicked an item's state icon. This notification code is sent in the form of a
/// <c>WM_NOTIFY</c> message.
/// </summary>
/// <param name="lParam">A pointer to an <c>NMHEADER</c> structure that contains additional information about the state icon that was clicked on.</param>
/// Sent by a header control to its parent when the header's overflow button is clicked. This notification code is sent in the form of an
/// <c>WM_NOTIFY</c> message.
/// </summary>
/// <param name="lParam">
/// <para>
/// A pointer to a <c>NMHEADER</c> structure that describes the notification code. The calling process is responsible for allocating this structure,
/// including the contained <c>NMHDR</c> structure. Set the members of the <c>NMHDR</c> structure, including the code member that must be set to HDN_OVERFLOWCLICK.
/// </para>
/// <para>
/// Set the <c>iItem</c> member of the <c>NMHEADER</c> structure to the index of the first header item that is not visible and thus should be
/// Header controls have a number of styles, described in this section, that determine the control's appearance and behavior. You set the initial styles when you create the header control.
/// <summary>Each item in the control looks and behaves like a push button. This style is useful if an application carries out a task when the user clicks an item in the header control. For example, an application could sort information in the columns differently depending on which item the user clicks.</summary>
HDS_BUTTONS=0x0002,
/// <summary>Allows drag-and-drop reordering of header items.</summary>
HDS_DRAGDROP=0x0040,
/// <summary>Include a filter bar as part of the standard header control. This bar allows users to conveniently apply a filter to the display. Calls to HDM_LAYOUT will yield a new size for the control and cause the list view to update.</summary>
HDS_FILTERBAR=0x0100,
/// <summary>Version 6.0 and later. Causes the header control to be drawn flat when the operating system is running in classic mode.
/// <note>Comctl32.dll version 6 is not redistributable but it is included in Windows. To use Comctl32.dll version 6, specify it in a manifest. For more information on manifests, see Enabling Visual Styles.</note></summary>
HDS_FLAT=0x0200,
/// <summary>Causes the header control to display column contents even while the user resizes a column.</summary>
HDS_FULLDRAG=0x0080,
/// <summary>Indicates a header control that is intended to be hidden. This style does not hide the control. Instead, when you send the HDM_LAYOUT message to a header control with the HDS_HIDDEN style, the control returns zero in the cy member of the WINDOWPOS structure. You would then hide the control by setting its height to zero. This can be useful when you want to use the control as an information container instead of a visual control.</summary>
HDS_HIDDEN=0x0008,
/// <summary>Creates a header control with a horizontal orientation.</summary>
HDS_HORZ=0x0000,
/// <summary>Enables hot tracking.</summary>
HDS_HOTTRACK=0x0004,
/// <summary>Version 6.00 and later. Allows the placing of checkboxes on header items. For more information, see the fmt member of HDITEM.</summary>
HDS_CHECKBOXES=0x0400,
/// <summary>Version 6.00 and later. The user cannot drag the divider on the header control.</summary>
HDS_NOSIZING=0x0800,
/// <summary>Version 6.00 and later. A button is displayed when not all items can be displayed within the header control's rectangle. When clicked, this button sends an HDN_OVERFLOWCLICK notification.</summary>
/// <summary>Contains information about a hit test. This structure is used with the HDM_HITTEST message and it supersedes the HD_HITTESTINFO structure.</summary>
if(value!=null&&value.Length>Kernel32.MAX_PATH)thrownewArgumentOutOfRangeException(nameof(Text),@"A header control will only display the first 260 characters.");
/// Contains information used to set the size and position of a header control. HDLAYOUT is used with the HDM_LAYOUT message. This structure supersedes
/// <summary>Structure that contains the coordinates of a rectangle that the header control will occupy.</summary>
publicIntPtrprc;
/// <summary>Structure that receives information about the appropriate size and position of the header control.</summary>
publicIntPtrpwpos;
/// <summary>Initializes a new instance of the <see cref="HDLAYOUT"/> class setting the prc member and allocating memory for the pwpos member.</summary>
/// <param name="rc">The coordinates of the header.</param>