/// <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>
/// <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.");
/// <summary>Gets or sets a value indicating whether this header requests a callback message to retrieve the text.
/// <note>Setting this value to either true or false will remove any previously set value for the <see cref="Text"/> property or <see cref="pszText"/> field.</note></summary>
/// <value><c>true</c> if using text callback; otherwise, <c>false</c>.</value>
/// 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>