diff --git a/PInvoke/ComCtl32/CommCtrl.Header.cs b/PInvoke/ComCtl32/CommCtrl.Header.cs index 68693bd5..5654f2a9 100644 --- a/PInvoke/ComCtl32/CommCtrl.Header.cs +++ b/PInvoke/ComCtl32/CommCtrl.Header.cs @@ -228,8 +228,6 @@ namespace Vanara.PInvoke HDIS_FOCUSED = 1 } -#pragma warning disable CS1572 // XML comment has a param tag, but there is no parameter by that name - /// Header Control Messages // https://docs.microsoft.com/en-us/windows/win32/controls/bumper-header-control-reference-messages [PInvokeData("Commctrl.h", MSDNShortId = "bumper-header-control-reference-messages")] @@ -238,36 +236,53 @@ namespace Vanara.PInvoke /// /// Clears the filter for a given header control. You can send this message explicitly or use the Header_ClearFilter macro. /// - /// A column value indicating which filter to clear. - /// Must be zero. - /// Returns an integer. The LRESULT is cast to an integer that indicates TRUE(1) or FALSE(0). + /// Parameters + /// wParam + /// A column value indicating which filter to clear. + /// lParam + /// Must be zero. + /// Returns + /// Returns an integer. The LRESULT is cast to an integer that indicates TRUE(1) or FALSE(0). /// /// If the column value is specified as -1, all the filters are cleared, and the HDN_FILTERCHANGE notification is sent only once. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/hdm-clearfilter HDM_CLEARFILTER = HDM_FIRST + 24, // int, 0 /// /// Creates a semi-transparent version of an item's image for use as a dragging image. You can send this message explicitly or /// use the Header_CreateDragImage macro. /// - /// + /// Parameters + /// wParam + /// /// The zero-based index of the item within the header control. The image assigned to this item is the basis for the transparent image. - /// - /// Must be zero. - /// Returns a handle to an image list that contains the new image as its only element. + /// + /// lParam + /// Must be zero. + /// Returns + /// Returns a handle to an image list that contains the new image as its only element. + // https://docs.microsoft.com/en-us/windows/win32/controls/hdm-createdragimage HDM_CREATEDRAGIMAGE = HDM_FIRST + 16, // int, 0 /// /// Deletes an item from a header control. You can send this message explicitly or use the Header_DeleteItem macro. /// - /// An index of the item to delete. - /// Must be zero. - /// Returns TRUE if successful, or FALSE otherwise. + /// Parameters + /// wParam + /// An index of the item to delete. + /// lParam + /// Must be zero. + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/hdm-deleteitem HDM_DELETEITEM = HDM_FIRST + 2, // int, 0 /// Moves the input focus to the edit box when a filter button has the focus. - /// A value specifying the column to edit. - /// + /// Parameters + /// wParam + /// A value specifying the column to edit. + /// lParam /// /// A flag that specifies how to handle the user's editing changes. Use this flag to specify what to do if the user is in the /// process of editing the filter when the message is sent. @@ -278,44 +293,56 @@ namespace Vanara.PInvoke /// Meaning /// /// - /// TRUE + /// TRUE /// Discard the changes made by the user. /// /// - /// FALSE + /// FALSE /// Accept the changes made by the user. /// /// - /// - /// Returns an integer. The LRESULT is cast to an integer that indicates TRUE(1) or FALSE(0). + /// Returns + /// Returns an integer. The LRESULT is cast to an integer that indicates TRUE(1) or FALSE(0). + // https://docs.microsoft.com/en-us/windows/win32/controls/hdm-editfilter HDM_EDITFILTER = HDM_FIRST + 23, // int, bool /// /// Gets the width of the bitmap margin for a header control. You can send this message explicitly or use the /// Header_GetBitmapMargin macro. /// - /// Must be zero. - /// Must be zero. - /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// /// Returns the width of the bitmap margin in pixels. If the bitmap margin was not previously specified, the default value of 3* /// GetSystemMetrics (SM_CXEDGE) is returned. - /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/hdm-getbitmapmargin HDM_GETBITMAPMARGIN = HDM_FIRST + 21, // 0,0 /// /// Gets the item in a header control that has the focus. Send this message explicitly or by using the /// Header_GetFocusedItem macro. /// - /// Not used. Must be zero. - /// Not used. Must be zero. - /// Returns the index of the item in focus. + /// Parameters + /// wParam + /// Not used. Must be zero. + /// lParam + /// Not used. Must be zero. + /// Returns + /// Returns the index of the item in focus. + // https://docs.microsoft.com/en-us/windows/win32/controls/hdm-getfocuseditem HDM_GETFOCUSEDITEM = HDM_FIRST + 27, // 0,0 /// /// Gets the handle to the image list that has been set for an existing header control. You can send this message explicitly or /// use the Header_GetImageList or Header_GetStateImageList macro. /// - /// + /// Parameters + /// *wParam* /// One of the following values: /// /// @@ -323,149 +350,200 @@ namespace Vanara.PInvoke /// Meaning /// /// - /// HDSIL_NORMAL + /// HDSIL_NORMAL /// Indicates that this is a normal image list. /// /// - /// HDSIL_STATE + /// HDSIL_STATE /// Indicates that this is a state image list. /// /// - /// - /// Must be zero. - /// Returns a handle to the image list set for the header control. + /// lParam + /// Must be zero. + /// Returns + /// Returns a handle to the image list set for the header control. + // https://docs.microsoft.com/en-us/windows/win32/controls/hdm-getimagelist HDM_GETIMAGELIST = HDM_FIRST + 9, // 0, 0 /// /// Gets information about an item in a header control. You can send this message explicitly or use the Header_GetItem macro. /// - /// The index of the item for which information is to be retrieved. - /// + /// Parameters + /// wParam + /// The index of the item for which information is to be retrieved. + /// lParam + /// /// A pointer to an HDITEM structure. When the message is sent, the mask member indicates the type of information /// being requested. When the message returns, the other members receive the requested information. If the mask member /// specifies zero, the message returns TRUE but copies no information to the structure. - /// - /// Returns TRUE if successful, or FALSE otherwise. + /// + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. /// /// If the HDI_TEXT flag is set in the mask member of the HDITEM structure, the control may change the /// pszText member of the structure to point to the new text instead of filling the buffer with the requested text. /// Applications should not assume that the text will always be placed in the requested buffer. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/hdm-getitem HDM_GETITEM = HDM_FIRST + 11, // int, HDITEM /// /// Gets a count of the items in a header control. You can send this message explicitly or use the Header_GetItemCount macro. /// - /// Must be zero. - /// Must be zero. - /// Returns the number of items if successful, or -1 otherwise. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns the number of items if successful, or -1 otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/hdm-getitemcount HDM_GETITEMCOUNT = HDM_FIRST + 0, // 0, 0 /// /// Gets the bounding rectangle of the split button for a header item with style HDF_SPLITBUTTON. Send this message /// explicitly or by using the Header_GetItemDropDownRect macro. /// - /// The zero-based index of the header control item for which to retrieve the bounding rectangle. - /// + /// Parameters + /// wParam + /// The zero-based index of the header control item for which to retrieve the bounding rectangle. + /// lParam + /// /// A pointer to a RECT structure that receives the bounding rectangle information. The message sender is responsible for /// allocating this structure. The coordinates returned in the RECT structure are expressed relative to the header control parent. - /// - /// Returns TRUE if successful, or FALSE otherwise. + /// + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. /// The header item must have style HDF_SPLITBUTTON. + // https://docs.microsoft.com/en-us/windows/win32/controls/hdm-getitemdropdownrect HDM_GETITEMDROPDOWNRECT = HDM_FIRST + 25, // int, RECT /// /// Gets the bounding rectangle for a given item in a header control. You can send this message explicitly or use the /// Header_GetItemRect macro. /// - /// The zero-based index of the header control item for which to retrieve the bounding rectangle. - /// + /// Parameters + /// wParam + /// The zero-based index of the header control item for which to retrieve the bounding rectangle. + /// lParam + /// /// A pointer to a RECT structure that receives the bounding rectangle information. The message sender is responsible for /// allocating this structure. The coordinates returned in the RECT structure are expressed relative to the header control parent. - /// - /// Returns nonzero if successful, or zero otherwise. + /// + /// Returns + /// Returns nonzero if successful, or zero otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/hdm-getitemrect HDM_GETITEMRECT = HDM_FIRST + 7, // int, RECT* /// /// Gets the current left-to-right order of items in a header control. You can send this message explicitly or use the /// Header_GetOrderArray macro. /// - /// + /// Parameters + /// wParam + /// /// The number of integer elements that lParam can hold. This value must be equal to the number of items in the control (see HDM_GETITEMCOUNT). - /// - /// A pointer to an array of integers that receive the index values for items in the header. - /// + /// + /// lParam + /// A pointer to an array of integers that receive the index values for items in the header. + /// Returns + /// /// Returns nonzero if successful, and the buffer at lParam receives the item number for each item in the header control in the /// order in which they appear from left to right. Otherwise, the message returns zero. - /// + /// /// /// - /// The number of elements in lParam is specified in wParam and must be equal to the number of items in the control. For - /// example, the following code fragment will reserve enough memory to hold the index values. + /// The number of elements in lParam is specified in wParam and must be equal to the number of items in the control. For example, + /// the following code fragment will reserve enough memory to hold the index values. /// /// /// int iItems, *lpiArray; // Get memory for buffer. (iItems = SendMessage(hwndHD, HDM_GETITEMCOUNT, 0,0))!=-1) if(!(lpiArray = calloc(iItems,sizeof(int)))) MessageBox(hwnd, "Out of memory.","Error", MB_OK); /// /// + // https://docs.microsoft.com/en-us/windows/win32/controls/hdm-getorderarray HDM_GETORDERARRAY = HDM_FIRST + 17, // iCount, lpArray /// /// Gets the bounding rectangle of the overflow button when the HDS_OVERFLOW style is set on the header control and the /// overflow button is visible. Send this message explicitly or by using the Header_GetOverflowRect macro. /// - /// Not used. Must be zero. - /// + /// Parameters + /// wParam + /// Not used. Must be zero. + /// lParam + /// /// A pointer to a RECT structure to receive the bounding rectangle information. The message sender is responsible for /// allocating this structure. The coordinates returned in the RECT structure are expressed as screen coordinates. - /// - /// Returns TRUE if successful; otherwise, FALSE. + /// + /// Returns + /// Returns TRUE if successful; otherwise, FALSE. /// The header control must have style HDF_SPLITBUTTON. + // https://docs.microsoft.com/en-us/windows/win32/controls/hdm-getoverflowrect HDM_GETOVERFLOWRECT = HDM_FIRST + 26, // 0, RECT* /// /// Gets the Unicode character format flag for the control. You can send this message explicitly or use the /// Header_GetUnicodeFormat macro. /// - /// Must be zero. - /// Must be zero. - /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// /// Returns the Unicode format flag for the control. If this value is nonzero, the control is using Unicode characters. If this /// value is zero, the control is using ANSI characters. - /// + /// /// See the remarks for CCM_GETUNICODEFORMAT for a discussion of this message. + // https://docs.microsoft.com/en-us/windows/win32/controls/hdm-getunicodeformat HDM_GETUNICODEFORMAT = 0X2006, // CCM_GETUNICODEFORMAT, /// Tests a point to determine which header item, if any, is at the specified point. - /// Must be zero. - /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// /// A pointer to an HDHITTESTINFO structure that contains the position to test and receives information about the results /// of the test. - /// - /// Returns the index of the item at the specified position, if any, or 1 otherwise. + /// + /// Returns + /// Returns the index of the item at the specified position, if any, or 1 otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/hdm-hittest HDM_HITTEST = HDM_FIRST + 6, // 0, HDHITTEST /// /// Inserts a new item into a header control. You can send this message explicitly or use the Header_InsertItem macro. /// - /// + /// Parameters + /// wParam + /// /// The index of the item after which the new item is to be inserted. The new item is inserted at the end of the header control /// if wParam is greater than or equal to the number of items in the control. If wParam is zero, the new item is inserted at the /// beginning of the header control. - /// - /// A pointer to an HDITEM structure that contains information about the new item. - /// Returns the index of the new item if successful, or -1 otherwise. + /// + /// lParam + /// A pointer to an HDITEM structure that contains information about the new item. + /// Returns + /// Returns the index of the new item if successful, or -1 otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/hdm-insertitem HDM_INSERTITEM = HDM_FIRST + 10, // int, HDITEM /// /// Retrieves information used to set the size and position of the header control within the target rectangle of the parent /// window. You can send this message explicitly or use the Header_Layout macro. /// - /// Must be zero. - /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// /// A pointer to an HDLAYOUT structure. The prc member specifies the coordinates of a rectangle, and the /// pwpos member receives the size and position for the header control within the rectangle. - /// - /// Returns TRUE if successful, or FALSE otherwise. + /// + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. /// /// /// The pwpos member of the lParam structure receives size and position values appropriate for positioning the control @@ -478,55 +556,77 @@ namespace Vanara.PInvoke /// SetWindowPos function to set the new size, position, and visibility state. /// /// + // https://docs.microsoft.com/en-us/windows/win32/controls/hdm-layout HDM_LAYOUT = HDM_FIRST + 5, // 0, HDLAYOUT /// /// Retrieves an index value for an item based on its order in the header control. You can send this message explicitly or use /// the Header_OrderToIndex macro. /// - /// + /// Parameters + /// wParam + /// /// The order in which the item appears within the header control, from left to right. For example, the index value of the item /// in the far left column would be 0. The value for the next item to the right would be 1, and so on. - /// - /// Must be zero. - /// Returns INT that indicates the item index. If wParam is invalid (negative or too large), the return equals wParam. + /// + /// lParam + /// Must be zero. + /// Returns + /// Returns INT that indicates the item index. If wParam is invalid (negative or too large), the return equals wParam. + // https://docs.microsoft.com/en-us/windows/win32/controls/hdm-ordertoindex HDM_ORDERTOINDEX = HDM_FIRST + 15, // int, 0 /// /// Sets the width of the margin, specified in pixels, of a bitmap in an existing header control. You can send this message /// explicitly or use the Header_SetBitmapMargin macro. /// - /// The width, specified in pixels, of the margin that surrounds a bitmap within an existing header control. - /// Must be zero. - /// - /// Returns the width of the bitmap margin, in pixels. If the bitmap margin was not previously specified, the default value of - /// 3* GetSystemMetrics (SM_CXEDGE) is returned. - /// + /// Parameters + /// wParam + /// The width, specified in pixels, of the margin that surrounds a bitmap within an existing header control. + /// lParam + /// Must be zero. + /// Returns + /// + /// Returns the width of the bitmap margin, in pixels. If the bitmap margin was not previously specified, the default value of 3* + /// GetSystemMetrics (SM_CXEDGE) is returned. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/hdm-setbitmapmargin HDM_SETBITMAPMARGIN = HDM_FIRST + 20,// iWidth, 0 /// /// Sets the timeout interval between the time a change takes place in the filter attributes and the posting of an /// HDN_FILTERCHANGE notification. You can send this message explicitly or use the Header_SetFilterChangeTimeout macro. /// - /// Must be zero. - /// The timeout value, in milliseconds. - /// Returns the index of the filter control being modified. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// The timeout value, in milliseconds. + /// Returns + /// Returns the index of the filter control being modified. + // https://docs.microsoft.com/en-us/windows/win32/controls/hdm-setfilterchangetimeout HDM_SETFILTERCHANGETIMEOUT = HDM_FIRST + 22, // 0, int /// /// Sets the focus to a specified item in a header control. Send this message explicitly or by using the /// Header_SetFocusedItem macro. /// - /// Not used. Must be zero. - /// The index of item. - /// Returns TRUE if successful, or FALSE otherwise. + /// Parameters + /// wParam + /// Not used. Must be zero. + /// lParam + /// The index of item. + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/hdm-setfocuseditem HDM_SETFOCUSEDITEM = HDM_FIRST + 28, // 0, int /// /// Changes the color of a divider between header items to indicate the destination of an external drag-and-drop operation. You /// can send this message explicitly or use the Header_SetHotDivider macro. /// - /// + /// Parameters + /// wParam /// The type of value represented by lParam. This value can be one of the following: /// /// @@ -534,36 +634,37 @@ namespace Vanara.PInvoke /// Meaning /// /// - /// TRUE - /// Indicates that lParam holds the client coordinates of the pointer. + /// TRUE + /// Indicates that lParam holds the client coordinates of the pointer. /// /// - /// FALSE - /// Indicates that lParam holds a divider index value. + /// FALSE + /// Indicates that lParam holds a divider index value. /// /// - /// - /// + /// lParam /// A value held in lParam is interpreted depending on the value of wParam. /// - /// If wParam is TRUE, lParam represents the x- and y-coordinates of the pointer. The x-coordinate is in the low word, - /// and the y-coordinate is in the high word. When the header control receives the message, it highlights the appropriate - /// divider based on the lParam coordinates. + /// If wParam is TRUE, lParam represents the x- and y-coordinates of the pointer. The x-coordinate is in the low word, and + /// the y-coordinate is in the high word. When the header control receives the message, it highlights the appropriate divider + /// based on the lParam coordinates. /// /// If wParam is FALSE, lParam represents the integer index of the divider to be highlighted. - /// - /// Returns a value equal to the index of the divider that the control highlighted. + /// Returns + /// Returns a value equal to the index of the divider that the control highlighted. /// /// This message creates an effect that a header control automatically produces when it has the HDS_DRAGDROP style. The /// HDM_SETHOTDIVIDER message is intended to be used when the owner of the control handles drag-and-drop operations manually. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/hdm-sethotdivider HDM_SETHOTDIVIDER = HDM_FIRST + 19, // bool, int /// /// Assigns an image list to an existing header control. You can send this message explicitly or use the /// Header_SetImageList or Header_SetStateImageList macro. /// - /// + /// Parameters + /// *wParam* /// One of the following values: /// /// @@ -571,47 +672,59 @@ namespace Vanara.PInvoke /// Meaning /// /// - /// HDSIL_NORMAL + /// HDSIL_NORMAL /// Indicates that this is a normal image list. /// /// - /// HDSIL_STATE + /// HDSIL_STATE /// Indicates that this is a state image list. /// /// - /// - /// A handle to an image list. - /// + /// lParam + /// A handle to an image list. + /// Returns + /// /// Returns the handle to the image list previously associated with the control. Returns NULL upon failure or if no image /// list was set previously. - /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/hdm-setimagelist HDM_SETIMAGELIST = HDM_FIRST + 8, // HDSIL_, hImageList /// /// Sets the attributes of the specified item in a header control. You can send this message explicitly or use the /// Header_SetItem macro. /// - /// The current index of the item whose attributes are to be changed. - /// + /// Parameters + /// wParam + /// The current index of the item whose attributes are to be changed. + /// lParam + /// /// A pointer to an HDITEM structure that contains item information. When this message is sent, the mask member of /// the structure must be set to indicate which attributes are being set. - /// - /// Returns nonzero upon success, or zero otherwise. + /// + /// Returns + /// Returns nonzero upon success, or zero otherwise. /// /// The HDITEM structure that supports this message supports item order and image list information. By using these /// members, you can control the order in which items are displayed and specify images to appear with items. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/hdm-setitem HDM_SETITEM = HDM_FIRST + 12, // int, HDITEM /// /// Sets the left-to-right order of header items. You can send this message explicitly or use the Header_SetOrderArray macro. /// - /// The size of the buffer at lParam, in elements. This value must equal the value returned by HDM_GETITEMCOUNT. - /// + /// Parameters + /// wParam + /// The size of the buffer at lParam, in elements. This value must equal the value returned by HDM_GETITEMCOUNT. + /// lParam + /// /// A pointer to an array that specifies the order in which items should be displayed, from left to right. For example, if the /// contents of the array are {2,0,1}, the control displays item 2, item 0, and item 1, from left to right. - /// - /// Returns nonzero if successful, or zero otherwise. + /// + /// Returns + /// Returns nonzero if successful, or zero otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/hdm-setorderarray HDM_SETORDERARRAY = HDM_FIRST + 18, // iCount, lpArray /// @@ -619,13 +732,18 @@ namespace Vanara.PInvoke /// control at run time rather than having to re-create the control. You can send this message explicitly or use the /// Header_SetUnicodeFormat macro. /// - /// + /// Parameters + /// wParam + /// /// The character set that is used by the control. If this value is nonzero, the control will use Unicode characters. If this /// value is zero, the control will use ANSI characters. - /// - /// Must be zero. - /// Returns the previous Unicode format flag for the control. + /// + /// lParam + /// Must be zero. + /// Returns + /// Returns the previous Unicode format flag for the control. /// See the remarks for CCM_SETUNICODEFORMAT for a discussion of this message. + // https://docs.microsoft.com/en-us/windows/win32/controls/hdm-setunicodeformat HDM_SETUNICODEFORMAT = 0X2005, // CCM_SETUNICODEFORMAT, } @@ -634,193 +752,363 @@ namespace Vanara.PInvoke public enum HeaderNotification { /// + /// /// Sent by a header control when a drag operation has begun on one of its items. This notification code is sent only by header /// controls that are set to the HDS_DRAGDROP style. This notification code is sent in the form of a WM_NOTIFY message. + /// + /// + /// HDN_BEGINDRAG pNMHeader = (LPNMHEADER) lParam; + /// /// - /// - /// A pointer to an NMHEADER structure containing information about the header item that is being dragged. - /// - /// + /// Parameters + /// lParam + /// A pointer to an NMHEADER structure containing information about the header item that is being dragged. + /// Returns + /// /// To allow the header control to automatically manage drag-and-drop operations, return FALSE. If the owner of the /// control is manually performing drag-and-drop reordering, return TRUE. - /// + /// + /// + /// A header control defaults to automatically managing drag-and-drop reordering. Returning TRUE to indicate external + /// (manual) drag-and-drop management allows the owner of the control to provide custom services as part of the drag-and-drop process. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/hdn-begindrag HDN_BEGINDRAG = HDN_FIRST - 10, /// + /// /// Notifies a header control's parent window that a filter edit has begun. This notification code is sent in the form of a /// WM_NOTIFY message. + /// + /// + /// HDN_BEGINFILTEREDIT pNMHeader = (LPNMHEADER) lParam; + /// /// - /// - /// A pointer to an NMHEADER structure that contains additional information about the filter that is being edited. - /// - /// No return value. + /// Parameters + /// lParam + /// A pointer to an NMHEADER structure that contains additional information about the filter that is being edited. + /// Returns + /// No return value. + // https://docs.microsoft.com/en-us/windows/win32/controls/hdn-beginfilteredit HDN_BEGINFILTEREDIT = HDN_FIRST - 14, /// + /// /// Notifies a header control's parent window that the user has begun dragging a divider in the control (that is, the user has /// pressed the left mouse button while the mouse cursor is on a divider in the header control). This notification code is sent /// in the form of a WM_NOTIFY message. + /// + /// + /// HDN_BEGINTRACK pNMHeader = (LPNMHEADER) lParam; + /// /// - /// + /// Parameters + /// lParam + /// /// A pointer to an NMHEADER structure that contains information about the header control and the item whose divider is to /// be dragged. - /// - /// Returns FALSE to allow tracking of the divider, or TRUE to prevent tracking. + /// + /// Returns + /// Returns FALSE to allow tracking of the divider, or TRUE to prevent tracking. + // https://docs.microsoft.com/en-us/windows/win32/controls/hdn-begintrack HDN_BEGINTRACK = HDN_FIRST - 26, /// + /// /// Notifies a header control's parent window that the user double-clicked the divider area of the control. This notification /// code is sent in the form of a WM_NOTIFY message. + /// + /// + /// HDN_DIVIDERDBLCLICK pNMHeader = (LPNMHEADER) lParam; + /// /// - /// + /// Parameters + /// lParam + /// /// A pointer to an NMHEADER structure that contains information about the header control and the item whose divider was double-clicked. - /// - /// No return value. + /// + /// Returns + /// No return value. + // https://docs.microsoft.com/en-us/windows/win32/controls/hdn-dividerdblclick HDN_DIVIDERDBLCLICK = HDN_FIRST - 25, /// + /// /// Sent by a header control to its parent when the drop-down arrow on the header control is clicked. This notification code is /// sent in the form of a WM_NOTIFY message. + /// + /// + /// HDN_DROPDOWN pNMHeader = (LPNMHEADER) lParam; + /// /// - /// A pointer to an NMHEADER structure that contains information on the header control. - /// No return value. + /// Parameters + /// lParam + /// A pointer to an NMHEADER structure that contains information on the header control. + /// Returns + /// No return value. + /// + /// + /// The example in the Syntax section shows how the notification receiver casts LPARAM to retrieve the NMHEADER + /// structure. WPARAM contains the ID of the control that sends this message. + /// + /// This message is sent only if style HDF_SPLITBUTTON is set on the header item. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/hdn-dropdown HDN_DROPDOWN = HDN_FIRST - 18, /// + /// /// Sent by a header control when a drag operation has ended on one of its items. This notification code is sent as a /// WM_NOTIFY message. Only header controls that are set to the HDS_DRAGDROP style send this notification code. + /// + /// + /// HDN_ENDDRAG pNMHeader = (LPNMHEADER) lParam; + /// /// - /// - /// A pointer to an NMHEADER structure containing information about the header item that was being dragged. - /// - /// + /// Parameters + /// lParam + /// A pointer to an NMHEADER structure containing information about the header item that was being dragged. + /// Returns + /// /// To allow the control to automatically place and reorder the item, return FALSE. To prevent the item from being placed, /// return TRUE. - /// + /// + /// + /// If the owner is performing external (manual) drag-and-drop management, it must return FALSE. The owner then must + /// reorder header items manually by sending HDM_SETITEM or HDM_SETORDERARRAY. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/hdn-enddrag HDN_ENDDRAG = HDN_FIRST - 11, /// + /// /// Notifies a header control's parent window that a filter edit has ended. This notification code is sent in the form of a /// WM_NOTIFY message. + /// + /// + /// HDN_ENDFILTEREDIT pNMHeader = (LPNMHEADER) lParam; + /// /// - /// - /// A pointer to an NMHEADER structure that contains additional information about the filter that is being edited. - /// - /// No return value. + /// Parameters + /// lParam + /// A pointer to an NMHEADER structure that contains additional information about the filter that is being edited. + /// Returns + /// No return value. + // https://docs.microsoft.com/en-us/windows/win32/controls/hdn-endfilteredit HDN_ENDFILTEREDIT = HDN_FIRST - 15, /// + /// /// Notifies a header control's parent window that the user has finished dragging a divider. This notification code sent in the /// form of a WM_NOTIFY message. + /// + /// + /// HDN_ENDTRACK pNMHeader = (LPNMHEADER) lParam; + /// /// - /// + /// Parameters + /// lParam + /// /// A pointer to an NMHEADER structure that contains information about the header control and the item whose divider was dragged. - /// - /// No return value. + /// + /// Returns + /// No return value. + // https://docs.microsoft.com/en-us/windows/win32/controls/hdn-endtrack HDN_ENDTRACK = HDN_FIRST - 27, /// + /// /// Notifies the header control's parent window when the filter button is clicked or in response to an HDM_SETITEM /// message. This notification code sent in the form of a WM_NOTIFY message. + /// + /// + /// HDN_FILTERBTNCLICK pNMHDFilterBtnClk = (LPNMHDFILTERBTNCLICK) lParam; + /// /// - /// + /// Parameters + /// lParam + /// /// A pointer to an NMHDFILTERBTNCLICK structure that contains information about the header control and the header filter button. - /// - /// + /// + /// Returns + /// /// If you return TRUE, an HDN_FILTERCHANGE notification code will be sent to the header control's parent window. This /// notification code gives the parent window an opportunity to synchronize its user interface elements. Return FALSE if /// you do not want the notification sent. - /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/hdn-filterbtnclick HDN_FILTERBTNCLICK = HDN_FIRST - 13, /// + /// /// Notifies the header control's parent window that the attributes of a header control filter are being changed or edited. This /// notification code sent in the form of a WM_NOTIFY message. + /// + /// + /// HDN_FILTERCHANGE pNMHeader = (LPNMHEADER) lParam; + /// /// - /// + /// Parameters + /// lParam + /// /// A pointer to an NMHEADER structure that contains information about the header control and the header item, including /// the attributes that are about to change. - /// - /// No return value. + /// + /// Returns + /// No return value. + // https://docs.microsoft.com/en-us/windows/win32/controls/hdn-filterchange HDN_FILTERCHANGE = HDN_FIRST - 12, /// + /// /// 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 WM_NOTIFY message. + /// + /// + /// HDN_GETDISPINFO pNMHDDispInfo = (LPNMHDDISPINFO) lParam; + /// /// - /// + /// Parameters + /// lParam + /// /// A pointer to an NMHDDISPINFO structure. On input, the fields of the structure specify what information is required and /// the item of interest. - /// - /// Returns an LRESULT. + /// + /// Returns + /// Returns an LRESULT. + /// + /// Fill the appropriate members of the structure to return the requested information to the header control. If your message + /// handler sets the mask member of the NMHDDISPINFO structure to HDI_DI_SETITEM, the header control stores the + /// information and will not request it again. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/hdn-getdispinfo HDN_GETDISPINFO = HDN_FIRST - 29, /// + /// /// Notifies a header control's parent window that the attributes of a header item have changed. This notification code is sent /// in the form of a WM_NOTIFY message. + /// + /// + /// HDN_ITEMCHANGED pNMHeader = (LPNMHEADER) lParam; + /// /// - /// + /// Parameters + /// lParam + /// /// A pointer to an NMHEADER structure that contains information about the header control, including the attributes that /// have changed. - /// - /// No return value. + /// + /// Returns + /// No return value. + // https://docs.microsoft.com/en-us/windows/win32/controls/hdn-itemchanged HDN_ITEMCHANGED = HDN_FIRST - 21, /// + /// /// Notifies a header control's parent window that the attributes of a header item are about to change. This notification code is /// sent in the form of a WM_NOTIFY message. + /// + /// + /// HDN_ITEMCHANGING pNMHeader = (LPNMHEADER) lParam; + /// /// - /// + /// Parameters + /// lParam + /// /// A pointer to an NMHEADER structure that contains information about the header control and the header item, including /// the attributes that are about to change. - /// - /// Returns FALSE to allow the changes, or TRUE to prevent them. + /// + /// Returns + /// Returns FALSE to allow the changes, or TRUE to prevent them. + // https://docs.microsoft.com/en-us/windows/win32/controls/hdn-itemchanging HDN_ITEMCHANGING = HDN_FIRST - 20, /// + /// /// Notifies a header control's parent window that the user clicked the control. This notification code is sent in the form of a /// WM_NOTIFY message. + /// + /// + /// HDN_ITEMCLICK pNMHeader = (LPNMHEADER) lParam; + /// /// - /// + /// Parameters + /// lParam + /// /// A pointer to an NMHEADER 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 pItem member is set to NULL. - /// - /// No return value. + /// + /// Returns + /// No return value. + /// A header control sends this notification code after the user releases the left mouse button. + // https://docs.microsoft.com/en-us/windows/win32/controls/hdn-itemclick HDN_ITEMCLICK = HDN_FIRST - 22, /// + /// /// Notifies a header control's parent window that the user double-clicked the control. This notification code is sent in the /// form of a WM_NOTIFY message. Only header controls that are set to the HDS_BUTTONS style send this notification code. + /// + /// + /// HDN_ITEMDBLCLICK pNMHeader = (LPNMHEADER) lParam; + /// /// - /// A pointer to an NMHEADER structure that contains information about this notification code. - /// No return value. + /// Parameters + /// lParam + /// A pointer to an NMHEADER structure that contains information about this notification code. + /// Returns + /// No return value. + // https://docs.microsoft.com/en-us/windows/win32/controls/hdn-itemdblclick HDN_ITEMDBLCLICK = HDN_FIRST - 23, /// + /// /// Notifies a header control's parent window that a key has been pressed with an item selected. This notification code is sent /// in the form of a WM_NOTIFY message. + /// + /// + /// HDN_ITEMKEYDOWN pNMHeader = (LPNMHEADER) lParam; + /// /// - /// - /// A pointer to an NMHEADER structure that contains additional information about the key that is being pressed. - /// - /// No return value. + /// Parameters + /// lParam + /// A pointer to an NMHEADER structure that contains additional information about the key that is being pressed. + /// Returns + /// No return value. + // https://docs.microsoft.com/en-us/windows/win32/controls/hdn-itemkeydown HDN_ITEMKEYDOWN = HDN_FIRST - 17, /// + /// /// 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 WM_NOTIFY message. + /// + /// + /// HDN_ITEMSTATEICONCLICK pNMHeader = (LPNMHEADER) lParam; + /// /// - /// + /// Parameters + /// lParam + /// /// A pointer to an NMHEADER structure that contains additional information about the state icon that was clicked on. - /// - /// No return value. + /// + /// Returns + /// No return value. + // https://docs.microsoft.com/en-us/windows/win32/controls/hdn-itemstateiconclick HDN_ITEMSTATEICONCLICK = HDN_FIRST - 16, /// + /// /// 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 WM_NOTIFY message. + /// + /// + /// HDN_OVERFLOWCLICK pNMHeader = (LPNMHEADER) lParam; + /// /// - /// + /// Parameters + /// lParam /// /// A pointer to a NMHEADER structure that describes the notification code. The calling process is responsible for /// allocating this structure, including the contained NMHDR structure. Set the members of the NMHDR structure, @@ -830,24 +1118,39 @@ namespace Vanara.PInvoke /// Set the iItem member of the NMHEADER structure to the index of the first header item that is not visible and /// thus should be displayed on an overflow. /// - /// - /// No return value. + /// Returns + /// No return value. + /// + /// + /// The notification receiver casts LPARAM to retrieve the NMHEADER structure. WPARAM contains the ID of the + /// control that sends the notification. + /// + /// This message is sent only when style HDS_OVERFLOW is set on the header control. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/hdn-overflowclick HDN_OVERFLOWCLICK = HDN_FIRST - 19, /// + /// /// Notifies a header control's parent window that the user is dragging a divider in the header control. This notification code /// is sent in the form of a WM_NOTIFY message. + /// + /// + /// HDN_TRACK pNMHeader = (LPNMHEADER) lParam; + /// /// - /// + /// Parameters + /// lParam + /// /// A pointer to an NMHEADER structure that contains information about the header control and the item whose divider is /// being dragged. - /// - /// Returns FALSE to continue tracking the divider, or TRUE to end tracking. + /// + /// Returns + /// Returns FALSE to continue tracking the divider, or TRUE to end tracking. + // https://docs.microsoft.com/en-us/windows/win32/controls/hdn-track HDN_TRACK = HDN_FIRST - 28, } -#pragma warning restore CS1572 // XML comment has a param tag, but there is no parameter by that name - /// /// 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. diff --git a/PInvoke/ComCtl32/CommCtrl.IPAddress.cs b/PInvoke/ComCtl32/CommCtrl.IPAddress.cs index 00f15eeb..bfdab1ed 100644 --- a/PInvoke/ComCtl32/CommCtrl.IPAddress.cs +++ b/PInvoke/ComCtl32/CommCtrl.IPAddress.cs @@ -20,61 +20,93 @@ namespace Vanara.PInvoke public enum IPAddressMessage { /// Clears the contents of the IP address control. - /// Must be zero. - /// Must be zero. - /// The return value is not used. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// The return value is not used. + // https://docs.microsoft.com/en-us/windows/win32/controls/ipm-clearaddress IPM_CLEARADDRESS = WindowMessage.WM_USER + 100, /// Sets the address values for all four fields in the IP address control. - /// Must be zero. - /// - /// A DWORD value that contains the new address. The field 3 value is contained in bits 0 through 7. The field 2 value is + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// + /// A DWORD value that contains the new address. The field 3 value is contained in bits 0 through 7. The field 2 value is /// contained in bits 8 through 15. The field 1 value is contained in bits 16 through 23. The field 0 value is contained in bits - /// 24 through 31. The MAKEIPADDRESS macro can also be used to create the address information. - /// - /// The return value is not used. + /// 24 through 31. The MAKEIPADDRESS macro can also be used to create the address information. + /// + /// Returns + /// The return value is not used. + /// This message does not generate an IPN_FIELDCHANGED notification. + // https://docs.microsoft.com/en-us/windows/win32/controls/ipm-setaddress IPM_SETADDRESS = WindowMessage.WM_USER + 101, /// Gets the address values for all four fields in the IP address control. - /// Must be zero. - /// - /// A pointer to a DWORD value that receives the address. The field 3 value will be contained in bits 0 through 7. The field 2 - /// value will be contained in bits 8 through 15. The field 1 value will be contained in bits 16 through 23. The field 0 value - /// will be contained in bits 24 through 31. The FIRST_IPADDRESS, SECOND_IPADDRESS, THIRD_IPADDRESS, and FOURTH_IPADDRESS macros - /// can also be used to extract the address information. Zero will be returned as the address for any blank fields. - /// - /// Returns the number of nonblank fields. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// + /// A pointer to a DWORD value that receives the address. The field 3 value will be contained in bits 0 through 7. The + /// field 2 value will be contained in bits 8 through 15. The field 1 value will be contained in bits 16 through 23. The field 0 + /// value will be contained in bits 24 through 31. The FIRST_IPADDRESS, SECOND_IPADDRESS, THIRD_IPADDRESS, + /// and FOURTH_IPADDRESS macros can also be used to extract the address information. Zero will be returned as the address + /// for any blank fields. + /// + /// Returns + /// Returns the number of nonblank fields. + // https://docs.microsoft.com/en-us/windows/win32/controls/ipm-getaddress IPM_GETADDRESS = WindowMessage.WM_USER + 102, - /// ets the valid range for the specified field in the IP address control. + /// Sets the valid range for the specified field in the IP address control. + /// Parameters + /// wParam + /// A zero-based field index to which the range will be applied. + /// lParam + /// + /// A WORD value that contains the lower limit of the range in the low-order byte and the upper limit in the high-order + /// byte. Both of these values are inclusive. The MAKEIPRANGE macro can also be used to create the range. + /// + /// Returns + /// Returns nonzero if successful, or zero otherwise. /// /// If the user enters a value in the field that is outside of this range, the control will send the IPN_FIELDCHANGED /// notification with the entered value. If the value is still outside of the range after sending the notification, the control /// will attempt to change the entered value to the closest range limit. /// - /// A zero-based field index to which the range will be applied. - /// - /// A WORD value that contains the lower limit of the range in the low-order byte and the upper limit in the high-order byte. - /// Both of these values are inclusive. The MAKEIPRANGE macro can also be used to create the range. - /// - /// Returns nonzero if successful, or zero otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/ipm-setrange IPM_SETRANGE = WindowMessage.WM_USER + 103, /// /// Sets the keyboard focus to the specified field in the IP address control. All of the text in that field will be selected. /// - /// + /// Parameters + /// wParam + /// /// A zero-based field index to which the focus should be set. If this value is greater than the number of fields, focus is set /// to the first blank field. If all fields are nonblank, focus is set to the first field. - /// - /// Must be zero. - /// The return value is not used. + /// + /// lParam + /// Must be zero. + /// Returns + /// The return value is not used. + // https://docs.microsoft.com/en-us/windows/win32/controls/ipm-setfocus IPM_SETFOCUS = WindowMessage.WM_USER + 104, /// Determines if all fields in the IP address control are blank. - /// Must be zero. - /// Must be zero. - /// Returns nonzero if all fields are blank, or zero otherwise. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns nonzero if all fields are blank, or zero otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/ipm-isblank IPM_ISBLANK = WindowMessage.WM_USER + 105, } @@ -133,7 +165,7 @@ namespace Vanara.PInvoke [StructLayout(LayoutKind.Sequential)] public struct NMIPADDRESS { - /// An NMHDR structure that contains additional information about the notification. + /// An structure that contains additional information about the notification. public NMHDR hdr; /// The zero-based number of the field that was changed. diff --git a/PInvoke/ComCtl32/CommCtrl.ListView.cs b/PInvoke/ComCtl32/CommCtrl.ListView.cs index 4e5a72b5..63410df0 100644 --- a/PInvoke/ComCtl32/CommCtrl.ListView.cs +++ b/PInvoke/ComCtl32/CommCtrl.ListView.cs @@ -589,137 +589,3107 @@ namespace Vanara.PInvoke [PInvokeData("Commctrl.h", MSDNShortId = "bb761385")] public enum ListViewMessage : uint { -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + /// + /// Sets the UNICODE character format flag for the control. This message allows you to change the character set used by the + /// control at run time rather than having to re-create the control. You can send this message explicitly or use the + /// ListView_SetUnicodeFormat macro. + /// + /// Parameters + /// wParam + /// + /// Determines the character set that is used by the control. If this value is nonzero, the control will use Unicode characters. + /// If this value is zero, the control will use ANSI characters. + /// + /// lParam + /// Must be zero. + /// Returns + /// Returns the previous Unicode format flag for the control. + /// See the remarks for CCM_SETUNICODEFORMAT for a discussion of this message. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-setunicodeformat LVM_SETUNICODEFORMAT = 0X2005, // CCM_SETUNICODEFORMAT, + + /// + /// Retrieves the UNICODE character format flag for the control. You can send this message explicitly or use the + /// ListView_GetUnicodeFormat macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// + /// Returns the Unicode format flag for the control. If this value is nonzero, the control is using Unicode characters. If this + /// value is zero, the control is using ANSI characters. + /// + /// See the remarks for CCM_GETUNICODEFORMAT for a discussion of this message. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-getunicodeformat LVM_GETUNICODEFORMAT = 0X2006, // CCM_GETUNICODEFORMAT, + + /// + /// Gets the background color of a list-view control. You can send this message explicitly or by using the + /// ListView_GetBkColor macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns the background color of the list-view control. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-getbkcolor LVM_GETBKCOLOR = LVM_FIRST + 0, + + /// + /// Sets the background color of a list-view control. You can send this message explicitly or by using the + /// ListView_SetBkColor macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// + /// Background color to set or the CLR_NONE value for no background color. List-view controls with background colors redraw + /// themselves significantly faster than those without background colors. + /// + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-setbkcolor LVM_SETBKCOLOR = LVM_FIRST + 1, + + /// + /// Retrieves the handle to an image list used for drawing list-view items. You can send this message explicitly or by using the + /// ListView_GetImageList macro. + /// + /// Parameters + /// wParam + /// Image list to retrieve. This parameter can be one of the following values: + /// + /// + /// Value + /// Meaning + /// + /// + /// LVSIL_NORMAL + /// Image list with large icons. + /// + /// + /// LVSIL_SMALL + /// Image list with small icons. + /// + /// + /// LVSIL_STATE + /// Image list with state images. + /// + /// + /// LVSIL_GROUPHEADER + /// Image list for group header. + /// + /// + /// lParam + /// Must be zero. + /// Returns + /// Returns the handle to the specified image list if successful, or NULL otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-getimagelist LVM_GETIMAGELIST = LVM_FIRST + 2, + + /// + /// Assigns an image list to a list-view control. You can send this message explicitly or by using the + /// ListView_SetImageList macro. + /// + /// Parameters + /// wParam + /// Type of image list. This parameter can be one of the following values: + /// + /// + /// Value + /// Meaning + /// + /// + /// LVSIL_NORMAL + /// Image list with large icons. + /// + /// + /// LVSIL_SMALL + /// Image list with small icons. + /// + /// + /// LVSIL_STATE + /// Image list with state images. + /// + /// + /// LVSIL_GROUPHEADER + /// Image list for group header. + /// + /// + /// lParam + /// Handle to the image list to assign. + /// Returns + /// Returns the handle to the image list previously associated with the control if successful, or NULL otherwise. + /// + /// The current image list will be destroyed when the list-view control is destroyed unless the LVS_SHAREIMAGELISTS style + /// is set. If you use this message to replace one image list with another, your application must explicitly destroy all image + /// lists other than the current one. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-setimagelist LVM_SETIMAGELIST = LVM_FIRST + 3, + + /// + /// Retrieves the number of items in a list-view control. You can send this message explicitly or by using the + /// ListView_GetItemCount macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns the number of items. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-getitemcount LVM_GETITEMCOUNT = LVM_FIRST + 4, + + /// + /// Retrieves some or all of a list-view item's attributes. You can send this message explicitly or by using the + /// ListView_GetItem macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// + /// Pointer to an LVITEM structure that specifies the information to retrieve and receives information about the list-view item. + /// + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + /// + /// + /// When the LVM_GETITEM message is sent, the iItem and iSubItem members identify the item or subitem to + /// retrieve information about and the mask member specifies which attributes to retrieve. For a list of possible values, + /// see the description of the LVITEM structure. + /// + /// + /// If the LVIF_TEXT flag is set in the mask member of the LVITEM structure, the pszText member must point + /// to a valid buffer and the cchTextMax member must be set to the number of characters in that buffer. Applications + /// should not assume that the text will necessarily be placed in the specified buffer. The control may instead change the + /// pszText member of the structure to point to the new text, rather than place it in the buffer. + /// + /// + /// If the mask member specifies the LVIF_STATE value, the stateMask member must specify the item state bits to + /// retrieve. On output, the state member contains the values of the specified state bits. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-getitem LVM_GETITEM = LVM_FIRST + 75, + + /// + /// Sets some or all of a list-view item's attributes. You can also send LVM_SETITEM to set the text of a subitem. You can send + /// this message explicitly or by using the ListView_SetItem macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// + /// Pointer to an LVITEM structure that contains the new item attributes. The iItem and iSubItem members + /// identify the item or subitem, and the mask member specifies which attributes to set. If the mask member + /// specifies the LVIF_TEXT value, the pszText member is the address of a null-terminated string and the cchTextMax + /// member is ignored. If the mask member specifies the LVIF_STATE value, the stateMask member specifies which item + /// states to change and the state member contains the values for those states. + /// + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + /// + /// + /// To set the attributes of a list-view item, set the iItem member of the LVITEM structure to the index of the + /// item, and set the iSubItem member to zero. For an item, you can set the state, pszText, iImage, + /// and lParam members of the LVITEM structure. + /// + /// + /// To set the text of a subitem, set the iItem and iSubItem members to indicate the specific subitem, and use the + /// pszText member to specify the text. Alternatively, you can use the ListView_SetItemText macro to set the text + /// of a subitem. You cannot set the state or lParam members for subitems because subitems do not have these + /// attributes. In version 4.70 and later, you can set the iImage member for subitems. The subitem image will be displayed + /// if the list-view control has the LVS_EX_SUBITEMIMAGES extended style. Previous versions will ignore the subitem image. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-setitem LVM_SETITEM = LVM_FIRST + 76, + + /// + /// Inserts a new item in a list-view control. You can send this message explicitly or by using the ListView_InsertItem macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// + /// Pointer to an LVITEM structure that specifies the attributes of the list-view item. Use the iItem member to + /// specify the zero-based index at which the new item should be inserted. If this value is greater than the number of items + /// currently contained by the listview, the new item will be appended to the end of the list and assigned the correct index. + /// Examine the message's return value to determine the actual index assigned to the item. + /// + /// Returns + /// Returns the index of the new item if successful, or -1 otherwise. + /// + /// + /// You cannot use ListView_InsertItem or LVM_INSERTITEM to insert subitems. The iSubItem member of the + /// LVITEM structure must be zero. See LVM_SETITEM for information on setting subitems. + /// + /// + /// If a list-view control has the LVS_EX_CHECKBOXES style set, any value placed in bits 12 through 15 of the state + /// member of the LVITEM structure will be ignored. When an item is added with this style set, it will always be set to + /// the unchecked state. + /// + /// + /// If a list-view control has either the LVS_SORTASCENDING or LVS_SORTDESCENDING window style, an + /// LVM_INSERTITEM message will fail if you try to insert an item that has LPSTR_TEXTCALLBACK as the value for its + /// pszText member. + /// + /// + /// The LVM_INSERTITEM message will insert the new item in the proper position in the sort order if the following + /// conditions hold: + /// + /// + /// + /// You are using one of the LVS_SORTXXX styles. + /// + /// + /// You are not using the LVS_OWNERDRAW style. + /// + /// + /// The pszText member of the structure pointed to by pitem is not set to LPSTR_TEXTCALLBACK. + /// + /// + /// + /// If the LVITEM structure does not contain LVIF_GROUPID in the mask member, the value of the iGroupId + /// member is I_GROUPIDCALLBACK by default. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-insertitem LVM_INSERTITEM = LVM_FIRST + 77, + + /// + /// Removes an item from a list-view control. You can send this message explicitly or by using the ListView_DeleteItem macro. + /// + /// Parameters + /// wParam + /// The index of the list-view item to delete. + /// lParam + /// Must be zero. + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-deleteitem LVM_DELETEITEM = LVM_FIRST + 8, + + /// + /// Removes all items from a list-view control. You can send this message explicitly or by using the + /// ListView_DeleteAllItems macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + /// + /// When a list-view control receives the LVM_DELETEALLITEMS message, it sends the LVN_DELETEALLITEMS notification + /// code to its parent window. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-deleteallitems LVM_DELETEALLITEMS = LVM_FIRST + 9, + + /// + /// Gets the callback mask for a list-view control. You can send this message explicitly or by using the + /// ListView_GetCallbackMask macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns the callback mask. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-getcallbackmask LVM_GETCALLBACKMASK = LVM_FIRST + 10, + + /// + /// Changes the callback mask for a list-view control. You can send this message explicitly or by using the + /// ListView_SetCallbackMask macro. + /// + /// Parameters + /// wParam + /// + /// Value of the callback mask. The bits of the mask indicate the item states or images for which the application stores the + /// current state data. This value can be any combination of the following constants: + /// + /// + /// + /// Value + /// Meaning + /// + /// + /// LVIS_CUT + /// The item is marked for a cut-and-paste operation. + /// + /// + /// LVIS_DROPHILITED + /// The item is highlighted as a drag-and-drop target. + /// + /// + /// LVIS_FOCUSED + /// The item has the focus. + /// + /// + /// LVIS_SELECTED + /// The item is selected. + /// + /// + /// LVIS_OVERLAYMASK + /// The application stores the image list index of the current overlay image for each item. + /// + /// + /// LVIS_STATEIMAGEMASK + /// The application stores the image list index of the current state image for each item. + /// + /// + /// lParam + /// Must be zero. + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + /// + /// + /// The callback mask of a list-view control is a set of bit flags that specify the item states for which the application, rather + /// than the control, stores the current data. The callback mask applies to all of the control's items, unlike the callback item + /// designation, which applies to a specific item. The callback mask is zero by default, meaning that the list-view control + /// stores all item state information. After creating a list-view control and initializing its items, you can send the + /// LVM_SETCALLBACKMASK message to change the callback mask. To retrieve the current callback mask, send the + /// LVM_GETCALLBACKMASK message. + /// + /// For more information about overlay images and state images, see Adding List-View Image Lists. + /// For more information on list-view callbacks, see Callback Items and the Callback Mask. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-setcallbackmask LVM_SETCALLBACKMASK = LVM_FIRST + 11, + + /// + /// Searches for a list-view item that has the specified properties and bears the specified relationship to a specified item. You + /// can send this message explicitly or by using the ListView_GetNextItem macro. + /// + /// Parameters + /// wParam + /// + /// Index of the item to begin the search with, or -1 to find the first item that matches the specified flags. The specified item + /// itself is excluded from the search. + /// + /// lParam + /// Specifies the relationship to the item specified in wParam. This can be one or a combination of the following values: + /// + /// + /// Value + /// Meaning + /// + /// + /// Searches by index. + /// + /// + /// + /// LVNI_ALL + /// Searches for a subsequent item by index, the default value. + /// + /// + /// LVNI_PREVIOUS + /// + /// Windows Vista and later: Searches for an item that is ordered before the item specified in wParam. The + /// LVNI_PREVIOUS flag is not directional (LVNI_ABOVE will find the item positioned above, while LVNI_PREVIOUS will find the item + /// ordered before.) The LVNI_PREVIOUS flag basically reverses the logic of the search performed by the LVM_GETNEXTITEM or + /// LVM_GETNEXTITEMINDEX messages. + /// + /// + /// + /// Searches by physical relationship to the index of the item where the search is to begin. + /// + /// + /// + /// LVNI_ABOVE + /// Searches for an item that is above the specified item. + /// + /// + /// LVNI_BELOW + /// Searches for an item that is below the specified item. + /// + /// + /// LVNI_TOLEFT + /// Searches for an item to the left of the specified item. + /// + /// + /// LVNI_TORIGHT + /// Searches for an item to the right of the specified item. + /// + /// + /// LVNI_DIRECTIONMASK + /// + /// Windows Vista and later: A directional flag mask with value as follows: LVNI_ABOVE | LVNI_BELOW | LVNI_TOLEFT | LVNI_TORIGHT. + /// + /// + /// + /// The state of the item to find can be specified with one or a combination of the following values: + /// + /// + /// + /// LVNI_CUT + /// The item has the LVIS_CUT state flag set. + /// + /// + /// LVNI_DROPHILITED + /// The item has the LVIS_DROPHILITED state flag set + /// + /// + /// LVNI_FOCUSED + /// The item has the LVIS_FOCUSED state flag set. + /// + /// + /// LVNI_SELECTED + /// The item has the LVIS_SELECTED state flag set. + /// + /// + /// LVNI_STATEMASK + /// + /// Windows Vista and later: A state flag mask with value as follows: LVNI_FOCUSED | LVNI_SELECTED | LVNI_CUT | LVNI_DROPHILITED. + /// + /// + /// + /// Searches by appearance of items or by group + /// + /// + /// + /// LVNI_VISIBLEORDER + /// Windows Vista and later: Search the visible order. + /// + /// + /// LVNI_VISIBLEONLY + /// Windows Vista and later: Search the visible items. + /// + /// + /// LVNI_SAMEGROUPONLY + /// Windows Vista and later: Search the current group. + /// + /// + /// If an item does not have all of the specified state flags set, the search continues with the next item. + /// + /// + /// + /// Returns + /// Returns the index of the next item if successful, or -1 otherwise. + /// + /// Note that the following flags, for use only with Windows Vista, are mutually exclusive of any other flags in use: + /// LVNI_VISIBLEONLY, LVNI_SAMEGROUPONLY, LVNI_VISIBLEORDER, LVNI_DIRECTIONMASK, and LVNI_STATEMASK. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-getnextitem LVM_GETNEXTITEM = LVM_FIRST + 12, + + /// + /// Searches for a list-view item with the specified characteristics. You can send this message explicitly or by using the + /// ListView_FindItem macro. + /// + /// Parameters + /// wParam + /// + /// The index of the item to begin the search with or -1 to start from the beginning. The specified item is itself excluded from + /// the search. + /// + /// lParam + /// A pointer to an LVFINDINFO structure that contains information about what to search for. + /// Returns + /// Returns the index of the item if successful, or -1 otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-finditem LVM_FINDITEM = LVM_FIRST + 83, + + /// + /// Retrieves the bounding rectangle for all or part of an item in the current view. You can send this message explicitly or by + /// using the ListView_GetItemRect macro. + /// + /// Parameters + /// wParam + /// Index of the list-view item. + /// lParam + /// + /// Pointer to a RECT structure that receives the bounding rectangle. When the message is sent, the left member of + /// this structure is used to specify the portion of the list-view item from which to retrieve the bounding rectangle. It must be + /// set to one of the following values: + /// + /// + /// + /// Value + /// Meaning + /// + /// + /// LVIR_BOUNDS + /// Returns the bounding rectangle of the entire item, including the icon and label. + /// + /// + /// LVIR_ICON + /// Returns the bounding rectangle of the icon or small icon. + /// + /// + /// LVIR_LABEL + /// Returns the bounding rectangle of the item text. + /// + /// + /// LVIR_SELECTBOUNDS + /// Returns the union of the LVIR_ICON and LVIR_LABEL rectangles, but excludes columns in report view. + /// + /// + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-getitemrect LVM_GETITEMRECT = LVM_FIRST + 14, + + /// + /// Moves an item to a specified position in a list-view control (must be in icon or small icon view). You can send this message + /// explicitly or by using the ListView_SetItemPosition macro. + /// + /// Parameters + /// wParam + /// Index of the list-view item. + /// lParam + /// + /// The LOWORD specifies the new x-position of the item's upper-left corner, in view coordinates. The HIWORD + /// specifies the new y-position of the item's upper-left corner, in view coordinates. + /// + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + /// + /// + /// If the list-view control has the LVS_AUTOARRANGE style, the items in the list-view control are arranged after the + /// position of the item is set. + /// + /// + /// On Windows Vista, sending this message to a list-view control with the LVS_AUTOARRANGE style does nothing, and the + /// return value is FALSE. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-setitemposition LVM_SETITEMPOSITION = LVM_FIRST + 15, + + /// + /// Retrieves the position of a list-view item. You can send this message explicitly or by using the + /// ListView_GetItemPosition macro. + /// + /// Parameters + /// wParam + /// Index of the list-view item. + /// lParam + /// Pointer to a POINT structure that receives the position of the item's upper-left corner, in view coordinates. + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-getitemposition LVM_GETITEMPOSITION = LVM_FIRST + 16, + + /// + /// Determines the width of a specified string using the specified list-view control's current font. You can send this message + /// explicitly or by using the ListView_GetStringWidth macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Pointer to a null-terminated string. + /// Returns + /// Returns the string width if successful, or zero otherwise. + /// + /// The LVM_GETSTRINGWIDTH message returns the exact width, in pixels, of the specified string. If you use the returned string + /// width as the column width in the LVM_SETCOLUMNWIDTH message, the string will be truncated. To retrieve the column + /// width that can contain the string without truncating it, you must add padding to the returned string width. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-getstringwidth LVM_GETSTRINGWIDTH = LVM_FIRST + 87, + + /// + /// Determines which list-view item, if any, is at a specified position. You can send this message explicitly or by using the + /// ListView_HitTest macro. + /// + /// Parameters + /// wParam + /// + /// Must be 0. **Windows Vista.** Should be -1 if the **iGroup** and **iSubItem** members of the *lParam* structure are to be retrieved. + /// + /// lParam + /// + /// Pointer to an LVHITTESTINFO structure that contains the position to hit test and receives information about the + /// results of the hit test. + /// + /// Returns + /// Returns the index of the item at the specified position, if any, or -1 otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-hittest LVM_HITTEST = LVM_FIRST + 18, + + /// + /// Ensures that a list-view item is either entirely or partially visible, scrolling the list-view control if necessary. You can + /// send this message explicitly or by using the ListView_EnsureVisible macro. + /// + /// Parameters + /// wParam + /// The index of the list-view item. + /// lParam + /// + /// A value specifying whether the item must be entirely visible. If this parameter is TRUE, no scrolling occurs if the + /// item is at least partially visible. + /// + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + /// The message fails if the window style includes LVS_NOSCROLL. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-ensurevisible LVM_ENSUREVISIBLE = LVM_FIRST + 19, + + /// + /// Scrolls the content of a list-view control. You can send this message explicitly or by using the ListView_Scroll macro. + /// + /// Parameters + /// wParam + /// + /// Value of type int that specifies the amount of horizontal scrolling, in pixels, relative to the current position of + /// the list view content. If the list-view control is in list view, this value is rounded up to the nearest number of pixels + /// that form a whole column. + /// + /// lParam + /// + /// Value of type int that specifies the amount of vertical scrolling, in pixels, relative to the current position of the + /// list view content. + /// + /// Returns + /// Returns TRUE if successful; otherwise, FALSE. + /// + /// When the list-view control is in report view, the control can only be scrolled vertically in whole line increments. + /// Therefore, the lParam parameter will be rounded to the nearest number of pixels that form a whole line increment. For + /// example, if the height of a line is 16 pixels and 8 is passed for lParam, the list will be scrolled by 16 pixels (1 line). If + /// 7 is passed for lParam, the list will be scrolled 0 pixels (0 lines). + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-scroll LVM_SCROLL = LVM_FIRST + 20, + + /// + /// Forces a list-view control to redraw a range of items. You can send this message explicitly or by using the + /// ListView_RedrawItems macro. + /// + /// Parameters + /// wParam + /// Index of the first item to redraw. + /// lParam + /// Index of the last item to redraw. + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + /// + /// The specified items are not actually redrawn until the list-view window receives a WM_PAINT message to repaint. To + /// repaint immediately, call the UpdateWindow function after using this macro. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-redrawitems LVM_REDRAWITEMS = LVM_FIRST + 21, + + /// Arranges items in icon view. You can send this message explicitly or by using the ListView_Arrange macro. + /// Parameters + /// wParam + /// One of the following values that specifies alignment: + /// + /// + /// Value + /// Meaning + /// + /// + /// LVA_ALIGNLEFT + /// Not implemented. Apply the LVS_ALIGNLEFT style instead. + /// + /// + /// LVA_ALIGNTOP + /// Not implemented. Apply the LVS_ALIGNTOP style instead. + /// + /// + /// LVA_DEFAULT + /// Aligns items according to the list-view control's current alignment styles (the default value). + /// + /// + /// LVA_SNAPTOGRID + /// Snaps all icons to the nearest grid position. + /// + /// + /// lParam + /// Must be zero. + /// Returns + /// Returns TRUE if successful; otherwise, FALSE. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-arrange LVM_ARRANGE = LVM_FIRST + 22, + + /// + /// Begins in-place editing of the specified list-view item's text. The message implicitly selects and focuses the specified + /// item. You can send this message explicitly or by using the ListView_EditLabel macro. + /// + /// Parameters + /// wParam + /// The index of the list-view item. To cancel editing, set the index to -1. + /// lParam + /// Must be zero. + /// Returns + /// Returns the handle to the edit control that is used to edit the item text if successful, or NULL otherwise. + /// + /// + /// When the user completes or cancels editing, the edit control is destroyed and the handle is no longer valid. You can subclass + /// the edit control, but you should not destroy it. + /// + /// + /// The control must have the focus before you send this message to the control. Focus can be set using the SetFocus function. + /// + /// If wParam is -1, an LVN_ENDLABELEDIT notification code is sent. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-editlabel LVM_EDITLABEL = LVM_FIRST + 118, + + /// + /// Gets the handle to the edit control being used to edit a list-view item's text. You can send this message explicitly or by + /// using the ListView_GetEditControl macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns the handle to the edit control if successful, or NULL otherwise. + /// + /// + /// When label editing begins, an edit control is created, positioned, and initialized. Before it is displayed, the list-view + /// control sends its parent window an LVN_BEGINLABELEDIT notification code. + /// + /// + /// To customize label editing, implement a handler for LVN_BEGINLABELEDIT and have it send an LVM_GETEDITCONTROL message + /// to the list-view control. If a label is being edited, the return value will be a handle to the edit control. Use this handle + /// to customize the edit control by sending the usual EM_XXX messages. + /// + /// + /// When the user completes or cancels editing, the edit control is destroyed and the handle is no longer valid. You can subclass + /// the edit control, but you should not destroy it. To cancel editing, send the list-view control a WM_CANCELMODE message. + /// + /// + /// The list-view item being edited is the currently focused item that is, the item in the focused state. To find an item based + /// on its state, use the LVM_GETNEXTITEM message. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-geteditcontrol LVM_GETEDITCONTROL = LVM_FIRST + 24, + + /// + /// Gets the attributes of a list-view control's column. You can send this message explicitly or by using the + /// ListView_GetColumn macro. + /// + /// Parameters + /// wParam + /// The index of the column. + /// lParam + /// + /// A pointer to an LVCOLUMN structure that specifies the information to retrieve and receives information about the + /// column. The mask member specifies which column attributes to retrieve. If the mask member specifies the + /// LVCF_TEXT value, the pszText member must contain the address of the buffer that receives the item text and the + /// cchTextMax member must specify the size of the buffer. + /// + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-getcolumn LVM_GETCOLUMN = LVM_FIRST + 95, + + /// + /// Sets the attributes of a list-view column. You can send this message explicitly or by using the ListView_SetColumn macro. + /// + /// Parameters + /// wParam + /// Index of the column. + /// lParam + /// + /// Pointer to an LVCOLUMN structure that contains the new column attributes. The mask member specifies which + /// column attributes to set. If the mask member specifies the LVCF_TEXT value, the pszText member is the address + /// of a null-terminated string and the cchTextMax member is ignored. + /// + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-setcolumn LVM_SETCOLUMN = LVM_FIRST + 96, + + /// + /// Inserts a new column in a list-view control. You can send this message explicitly or by using the + /// ListView_InsertColumn macro. + /// + /// Parameters + /// wParam + /// Index of the new column. + /// lParam + /// Pointer to an LVCOLUMN structure that contains the attributes of the new column. + /// Returns + /// Returns the index of the new column if successful, or -1 otherwise. + /// Columns are visible only in report (details) view. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-insertcolumn LVM_INSERTCOLUMN = LVM_FIRST + 97, + + /// + /// Removes a column from a list-view control. You can send this message explicitly or by using the ListView_DeleteColumn macro. + /// + /// Parameters + /// wParam + /// The index of the column to delete. + /// lParam + /// Must be zero. + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + /// + /// Deleting column zero of a list-view control is supported only in ComCtl32.dll version 6 and later. Version 5 also supports + /// deleting column zero, but only after you use CCM_SETVERSION to set the version to 5 or later. In versions prior to + /// version 5, if you must delete column zero, insert a zero length dummy column zero and delete column one and above. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-deletecolumn LVM_DELETECOLUMN = LVM_FIRST + 28, + + /// + /// Gets the width of a column in report or list view. You can send this message explicitly or by using the + /// ListView_GetColumnWidth macro. + /// + /// Parameters + /// wParam + /// The index of the column. This parameter is ignored in list view. + /// lParam + /// Must be zero. + /// Returns + /// + /// Returns the column width if successful, or zero otherwise. If this message is sent to a list-view control with the + /// LVS_REPORT style and the specified column does not exist, the return value is undefined. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-getcolumnwidth LVM_GETCOLUMNWIDTH = LVM_FIRST + 29, + + /// + /// Changes the width of a column in report-view mode or the width of all columns in list-view mode. You can send this message + /// explicitly or use the ListView_SetColumnWidth macro. + /// + /// Parameters + /// wParam + /// Zero-based index of a valid column. For list-view mode, this parameter must be set to zero. + /// lParam + /// New width of the column, in pixels. For report-view mode, the following special values are supported: + /// + /// + /// Value + /// Meaning + /// + /// + /// LVSCW_AUTOSIZE + /// Automatically sizes the column. + /// + /// + /// LVSCW_AUTOSIZE_USEHEADER + /// + /// Automatically sizes the column to fit the header text. If you use this value with the last column, its width is set to fill + /// the remaining width of the list-view control. + /// + /// + /// + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + /// + /// Assume that you have a 2-column list-view control with a width of 500 pixels. If the width of column zero is set to 200 + /// pixels, and you send this message with wParam = 1 and lParam = LVSCW_AUTOSIZE_USEHEADER, the second (and last) column will be + /// 300 pixels wide. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-setcolumnwidth LVM_SETCOLUMNWIDTH = LVM_FIRST + 30, + + /// + /// Gets the handle to the header control used by the list-view control. You can send this message explicitly or use the + /// ListView_GetHeader macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns the handle to the header control. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-getheader LVM_GETHEADER = LVM_FIRST + 31, + + /// + /// Creates a drag image list for the specified item. You can send this message explicitly or by using the + /// ListView_CreateDragImage macro. + /// + /// Parameters + /// wParam + /// The index of the item. + /// lParam + /// + /// A pointer to a POINT structure that receives the initial location of the upper-left corner of the image, in view coordinates. + /// + /// Returns + /// Returns the handle to the drag image list if successful, or NULL otherwise. + /// Your application is responsible for destroying the image list when it is no longer needed. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-createdragimage LVM_CREATEDRAGIMAGE = LVM_FIRST + 33, + + /// + /// Retrieves the bounding rectangle of all items in the list-view control. The list view must be in icon or small icon view. You + /// can send this message explicitly or by using the ListView_GetViewRect macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// + /// Pointer to a RECT structure that receives the bounding rectangle. All coordinates are relative to the visible area of + /// the list-view control. + /// + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-getviewrect LVM_GETVIEWRECT = LVM_FIRST + 34, + + /// + /// Retrieves the text color of a list-view control. You can send this message explicitly or by using the + /// ListView_GetTextColor macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns the text color. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-gettextcolor LVM_GETTEXTCOLOR = LVM_FIRST + 35, + + /// + /// Sets the text color of a list-view control. You can send this message explicitly or by using the ListView_SetTextColor macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// A COLORREF that specifies the new text color. + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-settextcolor LVM_SETTEXTCOLOR = LVM_FIRST + 36, + + /// + /// Retrieves the text background color of a list-view control. You can send this message explicitly or by using the + /// ListView_GetTextBkColor macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns the background color of the text. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-gettextbkcolor LVM_GETTEXTBKCOLOR = LVM_FIRST + 37, + + /// + /// Sets the background color of text in a list-view control. You can send this message explicitly or by using the + /// ListView_SetTextBkColor macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// New text background color. This can be CLR_NONE for no background color. + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-settextbkcolor LVM_SETTEXTBKCOLOR = LVM_FIRST + 38, + + /// + /// Retrieves the index of the topmost visible item when in list or report view. You can send this message explicitly or by using + /// the ListView_GetTopIndex macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// + /// Returns the index of the item if successful. Returns zero if the list-view control is in icon or small icon view, or if the + /// list-view control is in details view with groups enabled. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-gettopindex LVM_GETTOPINDEX = LVM_FIRST + 39, + + /// + /// Calculates the number of items that can fit vertically in the visible area of a list-view control when in list or report + /// view. Only fully visible items are counted. You can send this message explicitly or by using the + /// ListView_GetCountPerPage macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// + /// Returns the number of fully visible items if successful. If the current view is icon or small icon view, the return value is + /// the total number of items in the list-view control. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-getcountperpage LVM_GETCOUNTPERPAGE = LVM_FIRST + 40, + + /// + /// Retrieves the current view origin for a list-view control. You can send this message explicitly or by using the + /// ListView_GetOrigin macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Pointer to a POINT structure that receives the view origin. + /// Returns + /// Returns TRUE if successful, or FALSE if the current view is list or report view. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-getorigin LVM_GETORIGIN = LVM_FIRST + 41, + + /// + /// Updates a list-view item. If the list-view control has the LVS_AUTOARRANGE style, this macro causes the list-view + /// control to be arranged. You can send this message explicitly or by using the ListView_Update macro. + /// + /// Parameters + /// wParam + /// Index of the item to update. + /// lParam + /// Must be zero. + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-update LVM_UPDATE = LVM_FIRST + 42, + + /// + /// Changes the state of an item in a list-view control. You can send this message explicitly or by using the + /// ListView_SetItemState macro. + /// + /// Parameters + /// wParam + /// Index of the list-view item. If this parameter is -1, then the state change is applied to all items. + /// lParam + /// + /// Pointer to an LVITEM structure. The stateMask member specifies which state bits to change, and the state + /// member contains the new values for those bits. The other members are ignored. + /// + /// Returns + /// If you send this message explicitly, it returns TRUE if successful or FALSE otherwise. + /// + /// An item's state value includes a set of bit flags that indicate the item's state. The state value can also include image list + /// indexes that indicate the item's state image and overlay image. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-setitemstate LVM_SETITEMSTATE = LVM_FIRST + 43, + + /// + /// Retrieves the state of a list-view item. You can send this message explicitly or by using the ListView_GetItemState macro. + /// + /// Parameters + /// wParam + /// Index of the list-view item. + /// lParam + /// State information to retrieve. This parameter can be a combination of the following values: + /// + /// + /// Value + /// Meaning + /// + /// + /// LVIS_CUT + /// The item is marked for a cut-and-paste operation. + /// + /// + /// LVIS_DROPHILITED + /// The item is highlighted as a drag-and-drop target. + /// + /// + /// LVIS_FOCUSED + /// + /// The item has the focus, so it is surrounded by a standard focus rectangle. Although more than one item may be selected, only + /// one item can have the focus. + /// + /// + /// + /// LVIS_SELECTED + /// + /// The item is selected. The appearance of a selected item depends on whether it has the focus and also on the system colors + /// used for selection. + /// + /// + /// + /// LVIS_OVERLAYMASK + /// Use this mask to retrieve the item's overlay image index. + /// + /// + /// LVIS_STATEIMAGEMASK + /// Use this mask to retrieve the item's state image index. + /// + /// + /// Returns + /// + /// Returns the current state for the specified item. The only valid bits in the return value are those that correspond to the + /// bits set in the lParam parameter. + /// + /// + /// An item's state information includes a set of bit flags as well as image list indexes that indicate the item's state image + /// and overlay image. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-getitemstate LVM_GETITEMSTATE = LVM_FIRST + 44, + + /// + /// Retrieves the text of a list-view item or subitem. You can send this message explicitly or by using the + /// ListView_GetItemText macro. + /// + /// Parameters + /// wParam + /// Index of the list-view item. + /// lParam + /// + /// Pointer to an LVITEM structure. To retrieve the item text, set iSubItem to zero. To retrieve the text of a + /// subitem, set iSubItem to the subitem's index. The pszText member points to a buffer that receives the text. The + /// cchTextMax member specifies the number of characters in the buffer. + /// + /// Returns + /// + /// If you send this message explicitly, it returns the number of characters in the pszText member of the LVITEM structure. + /// + /// + /// + /// You can also send this message by calling the ListView_GetItemText macro. However, this macro does not return the + /// string length. + /// + /// LVM_GETITEMTEXT is not supported under the LVS_OWNERDATA style. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-getitemtext LVM_GETITEMTEXT = LVM_FIRST + 115, + + /// + /// Changes the text of a list-view item or subitem. You can send this message explicitly or by using the + /// ListView_SetItemText macro. + /// + /// Parameters + /// wParam + /// Zero-based index of the list-view item. + /// lParam + /// + /// Pointer to an LVITEM structure. The iSubItem member is the index of the subitem, or it can be zero to set the + /// item label. The pszText member is the address of a null-terminated string containing the new text; it can also be + /// NULL. The pszText member can also be LPSTR_TEXTCALLBACK to indicate a callback item for which the parent window + /// stores the text. In this case, the list-view control sends the parent an LVN_GETDISPINFO notification code when it + /// needs the text. + /// + /// Returns + /// If you send this message explicitly, it returns TRUE if successful or FALSE otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-setitemtext LVM_SETITEMTEXT = LVM_FIRST + 116, + + /// + /// Causes the list-view control to allocate memory for the specified number of items or sets the virtual number of items in a + /// virtual list-view control. + /// + /// Parameters + /// wParam + /// Number of items that the list-view control will ultimately contain. + /// lParam + /// + /// Version 4.70. Values that specify the behavior of the list-view control after resetting the item count. This value can be a + /// combination of the following: + /// + /// + /// + /// Value + /// Meaning + /// + /// + /// LVSICF_NOINVALIDATEALL + /// The list-view control will not repaint unless affected items are currently in view. + /// + /// + /// LVSICF_NOSCROLL + /// The list-view control will not change the scroll position when the item count changes. + /// + /// + /// Returns + /// Returns nonzero if successful, or zero otherwise. + /// + /// + /// How the memory is allocated depends on how the list-view control was created. You can send this message explicitly or use the + /// ListView_SetItemCount or ListView_SetItemCountEx macros. For more information, see Virtual List-View Style. + /// + /// + /// If the list-view control was created without the LVS_OWNERDATA style, sending this message causes the control to + /// allocate its internal data structures for the specified number of items. This prevents the control from having to allocate + /// the data structures every time an item is added. + /// + /// + /// If the list-view control was created with the LVS_OWNERDATA style (a virtual list view), sending this message sets the + /// virtual number of items that the control contains. + /// + /// + /// The lParam parameter is intended only for list-view controls that use the LVS_OWNERDATA and LVS_REPORT or + /// LVS_LIST styles. + /// + /// + /// When the common control list-view is a virtualized list-view ( LVS_OWNERDATA), there is a 100,000,000 item limit on + /// the list-view. In this scenario, LVM_SETITEMCOUNT will return FALSE when it has a wParam of 100,000,001. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-setitemcount LVM_SETITEMCOUNT = LVM_FIRST + 47, + + /// + /// Uses an application-defined comparison function to sort the items of a list-view control. The index of each item changes to + /// reflect the new sequence. You can send this message explicitly or by using the ListView_SortItems macro. + /// + /// Parameters + /// wParam + /// Application-defined value that is passed to the comparison function. + /// lParam + /// + /// Pointer to the application-defined comparison function. The comparison function is called during the sort operation each time + /// the relative order of two list items needs to be compared. + /// + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + /// + /// The comparison function has the following form: + /// + /// int CALLBACK CompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort); + /// + /// + /// The lParam1 parameter is the value associated with the first item being compared, and the lParam2 parameter is the value + /// associated with the second item. These are the values that were specified in the lParam member of the items' + /// LVITEM structure when they were inserted into the list. The ListView_SortItems's wParam parameter is passed to + /// the callback function as its third parameter. + /// + /// + /// The comparison function must return a negative value if the first item should precede the second, a positive value if the + /// first item should follow the second, or zero if the two items are equivalent. + /// + /// + /// Note + /// + /// During the sorting process, the list-view contents are unstable. If the callback function sends any messages to the list-view + /// control aside from LVM_GETITEM ( ListView_GetItem), the results are unpredictable. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-sortitems LVM_SORTITEMS = LVM_FIRST + 48, + + /// + /// Moves an item to a specified position in a list-view control (must be in icon or small icon view). This message differs from + /// the LVM_SETITEMPOSITION message in that it uses 32-bit coordinates. You can send this message explicitly or by using + /// the ListView_SetItemPosition32 macro. + /// + /// Parameters + /// wParam + /// Index of the list-view item for which to set the position. + /// lParam + /// Pointer to a POINT structure that contains the new position of the item, in list-view coordinates. + /// Returns + /// No return value. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-setitemposition32 LVM_SETITEMPOSITION32 = LVM_FIRST + 49, + + /// + /// Determines the number of selected items in a list-view control. You can send this message explicitly or by using the + /// ListView_GetSelectedCount macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns the number of selected items. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-getselectedcount LVM_GETSELECTEDCOUNT = LVM_FIRST + 50, + + /// + /// Determines the spacing between items in a list-view control. You can send this message explicitly or by using the + /// ListView_GetItemSpacing macro. + /// + /// Parameters + /// wParam + /// + /// View for which to retrieve the item spacing. This parameter is TRUE for small icon view, or FALSE for icon view. + /// + /// lParam + /// Must be zero. + /// Returns + /// + /// Returns the amount of spacing between items. The horizontal spacing is contained in the LOWORD and the vertical + /// spacing is contained in the HIWORD. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-getitemspacing LVM_GETITEMSPACING = LVM_FIRST + 51, + + /// + /// Retrieves the incremental search string of a list-view control. You can send this message explicitly or by using the + /// ListView_GetISearchString macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// + /// Pointer to a buffer that receives the incremental search string. To just retrieve the length of the string, set lParam to NULL. + /// + /// Returns + /// + /// Returns the number of characters in the incremental search string, not including the terminating NULL character, or zero if + /// the list-view control is not in incremental search mode. + /// + /// + /// + /// Security Warning: Using this message incorrectly might compromise the security of your program. This message does not + /// provide a way for you to know the size of the buffer. If you use this message, first call the message passing NULL in + /// the lParam, this returns the number of characters, excluding NULL that are required. Then call the message a second + /// time to retrieve the string. You should review the Security Considerations: Microsoft Windows Controls before continuing. + /// + /// + /// The incremental search string is the character sequence that the user types while the list view has the input focus. Each + /// time the user types a character, the system appends the character to the search string and then searches for a matching item. + /// If the system finds a match, it selects the item and, if necessary, scrolls it into view. + /// + /// + /// A time-out period is associated with each character that the user types. If the time-out period elapses before the user types + /// another character, the incremental search string is reset. + /// + /// + /// Make sure that the buffer is large enough to hold the string and the terminating NULL character. If it is too small, an + /// immediate invalid page fault will result. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-getisearchstring LVM_GETISEARCHSTRING = LVM_FIRST + 117, + + /// + /// Sets the spacing between icons in list-view controls that have the LVS_ICON style. You can send this message + /// explicitly or by using the ListView_SetIconSpacing macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// + /// The LOWORD specifies the distance, in pixels, to set between icons on the x-axis. The HIWORD specifies the + /// distance, in pixels, to set between icons on the y-axis. See Remarks. + /// + /// Returns + /// + /// Returns a DWORD value that contains the previous x-axis distance in the low word, and the previous y-axis distance in + /// the high word. + /// + /// + /// + /// Values for lParam are relative to the upper-left corner of an icon bitmap. Therefore, to set spacing between icons that do + /// not overlap, the lParam values must include the size of the icon, plus the amount of empty space desired between icons. + /// Values that do not include the width of the icon will result in overlaps. + /// + /// + /// When defining the icon spacing, the lParam values must set to 4 or larger. Smaller values will not yield the desired layout. + /// To reset the icons to the default spacing, set the lParam values to -1. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-seticonspacing LVM_SETICONSPACING = LVM_FIRST + 53, + + /// + /// Sets extended styles in list-view controls. You can send this message explicitly or use the + /// ListView_SetExtendedListViewStyle or ListView_SetExtendedListViewStyleEx macro. + /// + /// Parameters + /// wParam + /// + /// DWORD value that specifies which styles in lParam are to be affected. This parameter can be a combination of + /// Extended List-View Styles. Only the extended styles in wParam will be changed. All other styles will be maintained as + /// they are. If this parameter is zero, all of the styles in lParam will be affected. + /// + /// lParam + /// + /// DWORD value that specifies the extended list-view control styles to set. This parameter can be a combination of + /// Extended List-View Styles. Styles that are not set, but that are specified in wParam, are removed. + /// + /// Returns + /// Returns a DWORD value that contains the previous extended list-view control styles. + /// + /// + /// The wParam parameter allows you to modify one or more extended styles without having to retrieve the existing styles first. + /// For example, if you pass LVS_EX_FULLROWSELECT for wParam and 0 for lParam, the LVS_EX_FULLROWSELECT style will + /// be cleared but all other styles will remain the same. + /// + /// + /// For backward compatibility reasons, the ListView_SetExtendedListViewStyle macro has not been updated to use wParam. To + /// use the wParam value, use the ListView_SetExtendedListViewStyleEx macro. + /// + /// + /// When you use this message to set the LVS_EX_CHECKBOXES style, any previously set state image index will be discarded. + /// All check boxes will be initialized to the unchecked state. The state image index is contained in bits 12 through 15 of the + /// state member of the LVITEM structure. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-setextendedlistviewstyle LVM_SETEXTENDEDLISTVIEWSTYLE = LVM_FIRST + 54, // OPTIONAL WPARAM == MASK + + /// + /// Gets the extended styles that are currently in use for a given list-view control. You can send this message explicitly or use + /// the ListView_GetExtendedListViewStyle macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// + /// Returns a DWORD that represents the styles currently in use for a given list-view control. This value can be a + /// combination of Extended List-View Styles. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-getextendedlistviewstyle LVM_GETEXTENDEDLISTVIEWSTYLE = LVM_FIRST + 55, + + /// + /// Retrieves information about the bounding rectangle for a subitem in a list-view control. You can send this message explicitly + /// or by using the ListView_GetSubItemRect macro (recommended). This message is intended to be used only with list-view + /// controls that use the LVS_REPORT style. + /// + /// Parameters + /// wParam + /// Index of the subitem's parent item. + /// lParam + /// + /// Pointer to a RECT structure that will receive the subitem bounding rectangle information. Its members must be + /// initialized according to the following member/value relationships: + /// + /// + /// + /// Value + /// Meaning + /// + /// + /// top + /// The one-based index of the subitem. + /// + /// + /// left + /// Flag value (see remarks). Indicates the portion of the list-view subitem for which to retrieve the bounding rectangle. + /// + /// + /// Returns + /// Returns nonzero if successful, or zero otherwise. + /// + /// Following are the flag values that may be set. + /// + /// + /// Requirement + /// Value + /// + /// + /// Flag Value + /// Meaning + /// + /// + /// LVIR_BOUNDS + /// Returns the bounding rectangle of the entire item, including the icon and label. + /// + /// + /// LVIR_ICON + /// Returns the bounding rectangle of the icon or small icon. + /// + /// + /// LVIR_LABEL + /// Returns the bounding rectangle of the entire item, including the icon and label. This is identical to LVIR_BOUNDS. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-getsubitemrect LVM_GETSUBITEMRECT = LVM_FIRST + 56, + + /// + /// Determines which list-view item or subitem is at a given position. You can send this message explicitly or by using the + /// ListView_SubItemHitTest macro. + /// + /// Parameters + /// wParam + /// Must be 0. **Windows Vista.** Should be -1 if the **iGroup** member of *lParam* is to be retrieved. + /// lParam + /// + /// Pointer to an LVHITTESTINFO structure. The POINT structure within LVHITTESTINFO should be set to the + /// client coordinates to be hit-tested. + /// + /// Returns + /// + /// Returns the index of the item or subitem tested, if any, or -1 otherwise. If an item or subitem is at the given coordinates, + /// the fields of the LVHITTESTINFO structure will be filled with the applicable hit information. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-subitemhittest LVM_SUBITEMHITTEST = LVM_FIRST + 57, + + /// + /// Sets the left-to-right order of columns in a list-view control. You can send this message explicitly or use the + /// ListView_SetColumnOrderArray macro. + /// + /// Parameters + /// wParam + /// Size, in elements, of the buffer at lParam. + /// lParam + /// + /// Pointer to an array that specifies the order in which columns should be displayed, from left to right. For example, if the + /// contents of the array are {2,0,1}, the control displays column 2, column 0, and column 1 in that order. + /// + /// Returns + /// Returns nonzero if successful, or zero otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-setcolumnorderarray LVM_SETCOLUMNORDERARRAY = LVM_FIRST + 58, + + /// + /// Gets the current left-to-right order of columns in a list-view control. You can send this message explicitly or use the + /// ListView_GetColumnOrderArray macro. + /// + /// Parameters + /// wParam + /// The number of columns in the list-view control. + /// lParam + /// + /// A pointer to an array of integers that receives the index values of the columns in the list-view control. The array must be + /// large enough to hold wParam elements. + /// + /// Returns + /// + /// If successful, returns nonzero, and the buffer at lParam receives the column index of each column in the control in the order + /// they appear from left to right. Otherwise, the return value is zero. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-getcolumnorderarray LVM_GETCOLUMNORDERARRAY = LVM_FIRST + 59, + + /// + /// Sets the hot item for a list-view control. You can send this message explicitly or use the ListView_SetHotItem macro. + /// + /// Parameters + /// wParam + /// Zero-based index of the item to be set as the hot item. + /// lParam + /// Must be zero. + /// Returns + /// Returns the index of the item that was previously hot. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-sethotitem LVM_SETHOTITEM = LVM_FIRST + 60, + + /// + /// Retrieves the index of the hot item. You can send this message explicitly or use the ListView_GetHotItem macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns the index of the item that is hot. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-gethotitem LVM_GETHOTITEM = LVM_FIRST + 61, + + /// + /// Sets the HCURSOR value that the list-view control uses when the pointer is over an item while hot tracking is enabled. You + /// can send this message explicitly or use the ListView_SetHotCursor macro. To check whether hot tracking is enabled, + /// call SystemParametersInfo. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Handle to the cursor to be set. + /// Returns + /// Returns an HCURSOR value that is the previous hot cursor. + /// A list-view control uses hot tracking and hover selection when the LVS_EX_TRACKSELECT style is set. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-sethotcursor LVM_SETHOTCURSOR = LVM_FIRST + 62, + + /// + /// Retrieves the HCURSOR value used when the pointer is over an item while hot tracking is enabled. You can send this message + /// explicitly or use the ListView_GetHotCursor macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns an HCURSOR value that is the handle to the cursor that the list-view control uses when hot tracking is enabled. + /// A list-view control uses hot tracking and hover selection when the LVS_EX_TRACKSELECT style is set. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-gethotcursor LVM_GETHOTCURSOR = LVM_FIRST + 63, + + /// + /// Calculates the approximate width and height required to display a given number of items. You can send this message explicitly + /// or use the ListView_ApproximateViewRect macro. + /// + /// Parameters + /// wParam + /// + /// The number of items to be displayed in the control. If this parameter is set to -1, the message uses the total number of + /// items in the control. + /// + /// lParam + /// + /// The LOWORD is the proposed x-dimension of the control, in pixels. This parameter can be set to -1 to allow the message + /// to use the current width value. + /// + /// + /// The HIWORD is the proposed y-dimension of the control, in pixels. This parameter can be set to -1 to allow the message + /// to use the current height value. + /// + /// Returns + /// + /// Returns a DWORD value that holds the approximate width (in the LOWORD) and height (in the HIWORD) needed + /// to display the items, in pixels. + /// + /// + /// Setting the size of the list-view control based on the dimensions provided by this message can optimize redraw and reduce flicker. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-approximateviewrect LVM_APPROXIMATEVIEWRECT = LVM_FIRST + 64, + + /// + /// Sets the working areas within a list-view control. You can send this message explicitly or use the + /// ListView_SetWorkAreas macro. + /// + /// Parameters + /// wParam + /// + /// The number of structures in the array at lprc. The maximum number of working areas allowed is defined by the LV_MAX_WORKAREAS value. + /// + /// lParam + /// + /// Pointer to an array of RECT structures that contain the new working areas of the list-view control. Values in these + /// structures are in client coordinates. If this parameter is NULL, the working area will be set to the client area of + /// the control. wParam specifies the number of structures in this array. + /// + /// Returns + /// The return value for this message is not used. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-setworkareas LVM_SETWORKAREAS = LVM_FIRST + 65, + + /// + /// Retrieves the working areas from a list-view control. You can send this message explicitly or use the + /// ListView_GetWorkAreas macro. + /// + /// Parameters + /// wParam + /// The number of RECT structures in the array at lParam. + /// lParam + /// + /// Pointer to an array of RECT structures that receive the current working areas of the list-view control. Values in + /// these structures are in client coordinates. wParam specifies the number of structures in this array. + /// + /// Returns + /// The return value for this message is not used. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-getworkareas LVM_GETWORKAREAS = LVM_FIRST + 70, + + /// + /// Retrieves the number of working areas in a list-view control. You can send this message explicitly or use the + /// ListView_GetNumberOfWorkAreas macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// + /// Pointer to a UINT value that receives the number of working areas in the list-view control. If zero is placed in this + /// variable, then no working areas are currently set. This value cannot be NULL. + /// + /// Returns + /// The return value for this message is not used. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-getnumberofworkareas LVM_GETNUMBEROFWORKAREAS = LVM_FIRST + 73, + + /// + /// Retrieves the selection mark from a list-view control. You can send this message explicitly or use the + /// ListView_GetSelectionMark macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns the zero-based selection mark, or -1 if there is no selection mark. + /// The selection mark is the item index from which a multiple selection starts. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-getselectionmark LVM_GETSELECTIONMARK = LVM_FIRST + 66, + + /// + /// Sets the selection mark in a list-view control. You can send this message explicitly or use the + /// ListView_SetSelectionMark macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Zero-based index of the new selection mark. If set to -1, the selection mark is removed. + /// Returns + /// Returns the previous selection mark, or -1 if there is no previous selection mark. + /// + /// The selection mark is the item index from which a multiple selection starts. This message does not affect the selection state + /// of the item. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-setselectionmark LVM_SETSELECTIONMARK = LVM_FIRST + 67, + + /// + /// Sets the amount of time which the mouse cursor must hover over an item before it is selected. You can send this message + /// explicitly or use the ListView_SetHoverTime macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// + /// The new amount of time, in milliseconds, that the mouse cursor must hover over an item before it is selected. If this value + /// is ( DWORD)-1, then the hover time is set to the default hover time. + /// + /// Returns + /// Returns the previous hover time. + /// + /// The hover time only affects list-view controls that have the LVS_EX_TRACKSELECT, LVS_EX_ONECLICKACTIVATE, or + /// LVS_EX_TWOCLICKACTIVATE extended list-view style. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-sethovertime LVM_SETHOVERTIME = LVM_FIRST + 71, + + /// + /// Retrieves the amount of time that the mouse cursor must hover over an item before it is selected. You can send this message + /// explicitly or use the ListView_GetHoverTime macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// + /// Returns the amount of time, in milliseconds, that the mouse cursor must hover over an item before it is selected. If the + /// return value is ( DWORD)-1, then the hover time is the default hover time. + /// + /// + /// The hover time only affects list-view controls that have the LVS_EX_TRACKSELECT, LVS_EX_ONECLICKACTIVATE, or + /// LVS_EX_TWOCLICKACTIVATE extended list-view style. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-gethovertime LVM_GETHOVERTIME = LVM_FIRST + 72, + + /// + /// Sets the tooltip control that the list-view control will use to display tooltips. You can send this message explicitly or use + /// the ListView_SetToolTips macro. + /// + /// Parameters + /// wParam + /// Handle to the tooltip control to be set. + /// lParam + /// Must be zero. + /// Returns + /// Returns the handle to the previous tooltip control. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-settooltips LVM_SETTOOLTIPS = LVM_FIRST + 74, + + /// + /// Retrieves the tooltip control that the list-view control uses to display tooltips. You can send this message explicitly or + /// use the ListView_GetToolTips macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns the handle of the tooltip control. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-gettooltips LVM_GETTOOLTIPS = LVM_FIRST + 78, + + /// + /// Uses an application-defined comparison function to sort the items of a list-view control. The index of each item changes to + /// reflect the new sequence. You can send this message explicitly or by using the ListView_SortItemsEx macro. + /// + /// Parameters + /// wParam + /// Application-defined value that is passed to the comparison function. + /// lParam + /// + /// Pointer to an application-defined comparison function. It is called during the sort operation each time the relative order of + /// two list items needs to be compared. + /// + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + /// + /// The comparison function has the following form: + /// + /// int CALLBACK CompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort); + /// + /// + /// This message is similar to LVM_SORTITEMS, except for the type of information passed to the comparison function. With + /// LVM_SORTITEMSEX, lParam1 is the current index of the first item, and lParam2 is the current index of the second item. + /// You can send an LVM_GETITEMTEXT message to retrieve more information on an item, if needed. + /// + /// + /// The comparison function must return a negative value if the first item should precede the second, a positive value if the + /// first item should follow the second, or zero if the two items are equivalent. + /// + /// + /// Note + /// + /// During the sorting process, the list-view contents are unstable. If the callback function sends any messages to the list-view + /// control aside from LVM_GETITEM ( ListView_GetItem), the results are unpredictable. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-sortitemsex LVM_SORTITEMSEX = LVM_FIRST + 81, + + /// + /// Sets the background image in a list-view control. You can send this message explicitly or by using the + /// ListView_SetBkImage macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Pointer to a LVBKIMAGE structure that contains the new background image information. + /// Returns + /// + /// Returns nonzero if successful, or zero otherwise. Returns zero if the ulFlags member of the LVBKIMAGE structure + /// is LVBKIF_SOURCE_NONE. + /// + /// + /// Because the list-view control uses OLE COM to manipulate the background images, the calling application must call + /// CoInitialize or OleInitialize before sending this message. It is best to call one of these functions when the + /// application is initialized and call either CoUninitialize or OleUninitialize when the application is terminating. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-setbkimage LVM_SETBKIMAGE = LVM_FIRST + 138, + + /// + /// Gets the background image in a list-view control. You can send this message explicitly or by using the + /// ListView_GetBkImage macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// A pointer to an LVBKIMAGE structure that will receive the background image information. + /// Returns + /// Returns nonzero if successful, or zero otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-getbkimage LVM_GETBKIMAGE = LVM_FIRST + 139, + + /// Sets the index of the selected column. + /// Parameters + /// wParam + /// Value of type **int** that specifies the column index. + /// lParam + /// Must be zero. + /// Returns + /// The return value is not used. + /// + /// The column indices are stored in an int array. See the puColumns member of LVITEM. + /// + /// Note + /// + /// To use this message, you must provide a manifest specifying Comclt32.dll version 6.0. For more information on manifests, see + /// Enabling Visual Styles. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-setselectedcolumn LVM_SETSELECTEDCOLUMN = LVM_FIRST + 140, + + /// Sets the view of a list-view control. + /// Parameters + /// wParam + /// **DWORD** that specifies the view. + /// lParam + /// Must be zero. + /// Returns + /// Returns 1 if successful, or -1 otherwise. For example, -1 is returned if the view is invalid. + /// + /// Following are the values for views. + /// + /// + /// LV_VIEW_DETAILS + /// + /// + /// LV_VIEW_ICON + /// + /// + /// LV_VIEW_LIST + /// + /// + /// LV_VIEW_SMALLICON + /// + /// + /// LV_VIEW_TILE + /// + /// + /// + /// Note + /// + /// To use this message, you must provide a manifest specifying Comctl32.dll version 6.0. For more information on manifests, see + /// Enabling Visual Styles. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-setview LVM_SETVIEW = LVM_FIRST + 142, + + /// Retrieves the current view of a list-view control. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns a DWORD that specifies the current view. + /// + /// Following are the values for views. + /// + /// + /// LV_VIEW_DETAILS + /// + /// + /// LV_VIEW_ICON + /// + /// + /// LV_VIEW_LIST + /// + /// + /// LV_VIEW_SMALLICON + /// + /// + /// LV_VIEW_TILE + /// + /// + /// + /// Note + /// + /// To use this message, you must provide a manifest specifying Comclt32.dll version 6.0. For more information on manifests, see + /// Enabling Visual Styles. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-getview LVM_GETVIEW = LVM_FIRST + 143, + + /// Inserts a group into a list-view control. + /// Parameters + /// wParam + /// Index where the group is to be added. If this is -1, the group is added at the end of the list. + /// lParam + /// Pointer to a + /// **LVGROUP** + /// structure that contains the group to add. + /// Returns + /// Returns the index of the item that the group was added to, or -1 if the operation failed. + /// + /// To turn on group mode, call LVM_ENABLEGROUPVIEW or ListView_EnableGroupView. + /// A group cannot be inserted into an empty list-view control. + /// + /// Be sure to set the iGroupId in the item(s) the group was added to. Otherwise after LVM_ENABLEGROUPVIEW message + /// processing with TRUE the listview control will not show any items. + /// + /// + /// Note + /// + /// To use this message, you must provide a manifest specifying Comclt32 version 6.0. For more information on manifests, see + /// Enabling Visual Styles. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-insertgroup LVM_INSERTGROUP = LVM_FIRST + 145, + + /// Sets group information. Send this message explicitly or by using the ListView_SetGroupInfo macro. + /// Parameters + /// wParam + /// ID that specifies the group whose information is to be set. + /// lParam + /// + /// Pointer to a [**LVGROUP**](windows/win32/api/commctrl/ns-commctrl-lvgroup) structure that contains the information to set. + /// + /// Returns + /// Returns the ID of the group if successful, or -1 otherwise. + /// + /// + /// To change a group ID of an existing group add LVGF_GROUPID to LVGROUP.mask and set LVGROUP.iGroupId to + /// the new ID. The call will fail if LVGROUP.iGroupId contains ID of an existing group. + /// + /// + /// To update other properties of an existing group (e.g. update an alignment of the header or footer text for the group, + /// uAlign) LVGROUP.mask must not contain LVGF_GROUPID, else the update will fail. + /// + /// + /// Note + /// + /// To use this message, you must provide a manifest specifying Comclt32.dll version 6.0. For more information on manifests, see + /// Enabling Visual Styles. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-setgroupinfo LVM_SETGROUPINFO = LVM_FIRST + 147, + + /// Gets group information. + /// Parameters + /// wParam + /// An ID that specifies the group whose information is retrieved. + /// lParam + /// A pointer an + /// **LVGROUP** + /// structure that receives the retrieved information. Set the **cbSize** member of this structure to sizeof(LVGROUP). + /// Returns + /// Returns the ID of the group if successful, or -1 otherwise. + /// + /// Before attempting to retrieve the header for a group, first ensure that the group does not have the LBGS_NOHEADER style. + /// + /// Note + /// + /// To use this message, you must provide a manifest specifying Comclt32.dll version 6.0. For more information on manifests, see + /// Enabling Visual Styles. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-getgroupinfo LVM_GETGROUPINFO = LVM_FIRST + 149, + + /// Removes a group from a list-view control. + /// Parameters + /// wParam + /// ID that specifies the group to remove. + /// lParam + /// Must be NULL. + /// Returns + /// Returns the index of the group if successful, or -1 otherwise. + /// + /// Note + /// + /// To use this message, you must provide a manifest specifying Comclt32.dll version 6.0. For more information on manifests, see + /// Enabling Visual Styles. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-removegroup LVM_REMOVEGROUP = LVM_FIRST + 150, + + /// This message is not implemented. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-movegroup LVM_MOVEGROUP = LVM_FIRST + 151, + + /// Gets the number of groups. + /// Parameters + /// wParam + /// Not used. Should be 0. + /// lParam + /// Not used. Should be 0. + /// Returns + /// Returns the number of groups. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-getgroupcount LVM_GETGROUPCOUNT = LVM_FIRST + 152, + + /// + /// Gets information on a specified group. Send this message explicitly or by using the ListView_GetGroupInfoByIndex macro. + /// + /// Parameters + /// wParam + /// The index of the group. + /// lParam + /// + /// A pointer to an LVGROUP structure to receive information on the group specified by wParam. The calling process is + /// responsible for allocating memory for the structure and any buffers in the structure, such as the one pointed to by the + /// pszHeader member. Set any contingent members of the structure, such as cchHeader the size of the buffer pointed + /// to by pszHeader in WCHARs including the terminating NULL. Set cbSize to sizeof(LVGROUP). + /// + /// The message receiver is responsible for setting the structure members with information for the group specified by wParam. + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-getgroupinfobyindex LVM_GETGROUPINFOBYINDEX = LVM_FIRST + 153, + + /// This message is not implemented. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-moveitemtogroup LVM_MOVEITEMTOGROUP = LVM_FIRST + 154, + + /// + /// Gets the rectangle for a specified group. Send this message explicitly or by using the ListView_GetGroupRect macro. + /// + /// Parameters + /// wParam + /// Specifies the group by iGroupId (see LVGROUP structure). + /// lParam + /// + /// A pointer to a RECT structure to receive information on the group specified by wParam. The message receiver is + /// responsible for setting the structure members with information for the group specified by wParam. + /// + /// + /// The calling process is responsible for allocating memory for the structure. Set the top member of the RECT to + /// one of the following flags to specify the coordinates of the rectangle to get. + /// + /// + /// + /// Value + /// Meaning + /// + /// + /// LVGGR_GROUP + /// Coordinates of the entire expanded group. + /// + /// + /// LVGGR_HEADER + /// Coordinates of the header only (collapsed group). + /// + /// + /// LVGGR_LABEL + /// Coordinates of the label only. + /// + /// + /// LVGGR_SUBSETLINK + /// + /// Coordinates of the subset link only (markup subset). A list-view control can limit the number of visible items displayed in + /// each group. A link is presented to the user to allow the user to expand the group. This flag will return the bounding + /// rectangle of the subset link if the group is a subset (group state of LVGS_SUBSETED, see structure LVGROUP, member + /// state). This flag is provided so that accessibility applications can located the link. + /// + /// + /// + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-getgrouprect LVM_GETGROUPRECT = LVM_FIRST + 98, + + /// Sets information about the display of groups. + /// Parameters + /// wParam + /// Must be **NULL**. + /// lParam + /// Pointer to an + /// **LVGROUPMETRICS** + /// structure that contains the metrics to set. + /// Returns + /// The return value is not used. + /// + /// Note + /// + /// To use this message, you must provide a manifest specifying Comclt32.dll version 6.0. For more information on manifests, see + /// Enabling Visual Styles. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-setgroupmetrics LVM_SETGROUPMETRICS = LVM_FIRST + 155, + + /// Gets information about the display of groups. + /// Parameters + /// wParam + /// Must be **NULL**. + /// lParam + /// A pointer to an + /// **LVGROUPMETRICS** + /// structure that receives the retrieved metrics. + /// Returns + /// The return value is not used. + /// + /// Note + /// + /// To use this message, you must provide a manifest specifying Comclt32.dll version 6.0. For more information on manifests, see + /// Enabling Visual Styles. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-getgroupmetrics LVM_GETGROUPMETRICS = LVM_FIRST + 156, + + /// Enables or disables whether the items in a list-view control display as a group. + /// Parameters + /// wParam + /// + /// A **BOOL** that indicates whether to enable a list-view control to group displayed items. Use **TRUE** to enable grouping, + /// **FALSE** to disable it. + /// + /// lParam + /// Must be **NULL**. + /// Returns + /// Returns one of the following values. + /// + /// + /// Return code + /// Description + /// + /// + /// 0 + /// The ability to display list-view items as a group is already enabled or disabled. + /// + /// + /// 1 + /// The state of the control was successfully changed. + /// + /// + /// -1 + /// The operation failed. + /// + /// + /// + /// LVM_ENABLEGROUPVIEW is not supported under the LVS_OWNERDATA style. + /// + /// Note + /// + /// To use this message, you must provide a manifest specifying Comclt32.dll version 6.0. For more information on manifests, see + /// Enabling Visual Styles. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-enablegroupview LVM_ENABLEGROUPVIEW = LVM_FIRST + 157, + + /// Uses an application-defined comparison function to sort groups by ID within a list-view control. + /// Parameters + /// wParam + /// Pointer to an application-defined comparison function, + /// LVGroupCompare + /// . + /// lParam + /// Void pointer to the application-defined information. + /// Returns + /// Returns 1 if successful, or 0 otherwise. + /// + /// Note + /// + /// To use this message, you must provide a manifest specifying Comclt32.dll version 6.0. For more information on manifests, see + /// Enabling Visual Styles. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-sortgroups LVM_SORTGROUPS = LVM_FIRST + 158, + + /// Inserts a group into an ordered list of groups. + /// Parameters + /// wParam + /// Pointer to an + /// LVINSERTGROUPSORTED + /// structure that contains the group to insert. + /// lParam + /// Must be **NULL**. + /// Returns + /// The return value is not used. + /// + /// + /// The ordering of the list is based on the ID of the group. The order is defined by the application-defined ordering function, + /// LVGroupCompare, that is passed in the LVINSERTGROUPSORTED structure by the wParam parameter. + /// + /// + /// Note + /// + /// To use this message, you must provide a manifest specifying Comclt32.dll version 6.0. For more information on manifests, see + /// Enabling Visual Styles. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-insertgroupsorted LVM_INSERTGROUPSORTED = LVM_FIRST + 159, + + /// Removes all groups from a list-view control. + /// Parameters + /// wParam + /// Must be **NULL**. + /// lParam + /// Must be **NULL**. + /// Returns + /// The return value is not used. + /// + /// Note + /// + /// To use this message, you must provide a manifest specifying Comclt32.dll version 6.0. For more information on manifests, see + /// Enabling Visual Styles. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-removeallgroups LVM_REMOVEALLGROUPS = LVM_FIRST + 160, + + /// Determines whether the list-view control has a specified group. + /// Parameters + /// wParam + /// ID of the group. + /// lParam + /// Must be **NULL**. + /// Returns + /// Returns TRUE if the list-view control has the specified group, or FALSE otherwise. + /// + /// Note + /// + /// To use this message, you must provide a manifest specifying Comclt32.dll version 6.0. For more information on manifests, see + /// Enabling Visual Styles. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-hasgroup LVM_HASGROUP = LVM_FIRST + 161, + + /// + /// Gets the state for a specified group. Send this message explicitly or by using the ListView_GetGroupState macro. + /// + /// Parameters + /// wParam + /// Specifies the group by iGroupId (see LVGROUP structure). + /// lParam + /// Specifies the state values to retrieve. This is a combination of the flags listed for the state member of LVGROUP. + /// Returns + /// + /// Returns the combination of state values that are set. For example, if lParam is LVGS_COLLAPSED and the value returned is + /// zero, the LVGS_COLLAPSED state is not set. Zero is returned if the group is not found. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-getgroupstate LVM_GETGROUPSTATE = LVM_FIRST + 92, + + /// + /// Gets the group that has the focus. Send this message explicitly or by using the ListView_GetFocusedGroup macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns the index of the group with state of LVGS_FOCUSED, or -1 if there is no group with state of LVGS_FOCUSED. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-getfocusedgroup LVM_GETFOCUSEDGROUP = LVM_FIRST + 93, + + /// Sets information that a list-view control uses in tile view. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Pointer to an + /// **LVTILEVIEWINFO** + /// structure that contains the information to set. + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + /// + /// To use this message, you must provide a manifest specifying Comclt32.dll version 6.0. For more information on manifests, see + /// Enabling Visual Styles. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-settileviewinfo LVM_SETTILEVIEWINFO = LVM_FIRST + 162, + + /// Retrieves information about a list-view control in tile view. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Pointer to an + /// **LVTILEVIEWINFO** + /// structure that receives the retrieved information. + /// Returns + /// Return value not used. + /// + /// Note + /// + /// To use this message, you must provide a manifest specifying Comclt32.dll version 6.0. For more information on manifests, see + /// Enabling Visual Styles. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-gettileviewinfo LVM_GETTILEVIEWINFO = LVM_FIRST + 163, + + /// Sets information for an existing tile of a list-view control. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Pointer to an + /// **LVTILEINFO** + /// structure that contains the information to set. + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + /// + /// LVM_SETTILEINFO is not supported under the LVS_OWNERDATA style. + /// + /// Note + /// + /// To use this message, you must provide a manifest specifying Comclt32.dll version 6.0. For more information on manifests, see + /// Enabling Visual Styles. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-settileinfo LVM_SETTILEINFO = LVM_FIRST + 164, + + /// Retrieves information about a tile in a list-view control. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Pointer to an + /// **LVTILEINFO** + /// structure that receives the retrieved information. + /// Returns + /// Return value not used. + /// + /// + /// Tile view is a new way of arranging and displaying items in a list-view control. The other views are icon, small icon, + /// details, and list. + /// + /// + /// Note + /// + /// To use this message, you must provide a manifest specifying Comclt32.dll version 6.0. For more information on manifests, see + /// Enabling Visual Styles. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-gettileinfo LVM_GETTILEINFO = LVM_FIRST + 165, + + /// Sets the insertion point to the defined position. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Pointer to a + /// LVINSERTMARK + /// structure that specifies where to set the insertion point. + /// Returns + /// + /// Returns TRUE if successful, or FALSE otherwise. FALSE is returned if the size in the cbSize + /// member of the LVINSERTMARK structure does not equal the actual size of the structure, or when an insertion point does + /// not apply in the current view. + /// + /// + /// + /// An insertion point can only appear if the list-view control is in icon view, small icon view, or tile view, and is not in + /// group-view mode. + /// + /// + /// Note + /// + /// To use this message, you must provide a manifest specifying Comclt32.dll version 6.0. For more information on manifests, see + /// Enabling Visual Styles. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-setinsertmark LVM_SETINSERTMARK = LVM_FIRST + 166, + + /// Retrieves the position of the insertion point. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Pointer to a + /// LVINSERTMARK + /// structure that receives the position of the insertion point. + /// Returns + /// + /// Returns TRUE if successful, or FALSE otherwise. FALSE is returned if the size in the cbSize + /// member of the LVINSERTMARK structure does not equal the actual size of the structure. + /// + /// + /// + /// An insertion point can appear only if the list-view control is in icon view, small icon view, or tile view, and is not in + /// group-view mode. + /// + /// + /// Note + /// + /// To use this message, you must provide a manifest specifying Comclt32.dll version 6.0. For more information on manifests, see + /// Enabling Visual Styles. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-getinsertmark LVM_GETINSERTMARK = LVM_FIRST + 167, + + /// Retrieves the insertion point closest to a specified point. + /// Parameters + /// wParam + /// Pointer to a **POINT** structure that contains the hit test coordinates. + /// lParam + /// Pointer to an + /// LVINSERTMARK + /// structure that specifies the insertion point closest to the coordinates defined by the *wParam* parameter. + /// Returns + /// + /// Returns TRUE if successful, or FALSE otherwise. FALSE is returned if the size in the cbSize + /// member of the LVINSERTMARK structure does not equal the actual size of the structure, or when an insertion point does + /// not apply in the current view. + /// + /// + /// + /// An insertion point can only appear if the list-view control is in icon view, small icon view, or tile view and is not in + /// group-view mode. + /// + /// + /// If insertion points do not apply for the view, the LVINSERTMARK structure contains a -1 in the iItem member. + /// + /// + /// Note + /// + /// To use this message, you must provide a manifest specifying Comclt32.dll version 6.0. For more information on manifests, see + /// Enabling Visual Styles. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-insertmarkhittest LVM_INSERTMARKHITTEST = LVM_FIRST + 168, + + /// Retrieves the rectangle that bounds the insertion point. + /// Parameters + /// wParam + /// Not used; must be zero. + /// lParam + /// Pointer to a + /// **RECT** + /// structure that contains the coordinates of a rectangle that bounds the insertion point. + /// Returns + /// Returns one of the following values. + /// + /// + /// Return code + /// Description + /// + /// + /// 0 + /// No insertion point found. + /// + /// + /// 1 + /// Insertion point found. + /// + /// + /// + /// Note + /// + /// To use this message, you must provide a manifest specifying Comclt32.dll version 6.0. For more information on manifests, see + /// Enabling Visual Styles. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-getinsertmarkrect LVM_GETINSERTMARKRECT = LVM_FIRST + 169, + + /// Sets the color of the insertion point. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// **COLORREF** structure that specifies the color to set the insertion point. + /// Returns + /// Returns COLORREF structure set to the previous color. + /// + /// Note + /// + /// To use this message, you must provide a manifest specifying Comclt32.dll version 6.0. For more information on manifests, see + /// Enabling Visual Styles. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-setinsertmarkcolor LVM_SETINSERTMARKCOLOR = LVM_FIRST + 170, + + /// Retrieves the color of the insertion point. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns a COLORREF structure that contains the color of the insertion point. + /// + /// Note + /// + /// To use this message, you must provide a manifest specifying Comclt32.dll version 6.0. For more information on manifests, see + /// Enabling Visual Styles. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-getinsertmarkcolor LVM_GETINSERTMARKCOLOR = LVM_FIRST + 171, + + /// Retrieves an integer that specifies the selected column. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns an UINT that specifies the selected column. + /// + /// Note + /// + /// To use this message, you must provide a manifest specifying Comclt32.dll version 6.0. For more information on manifests, see + /// Enabling Visual Styles. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-getselectedcolumn LVM_GETSELECTEDCOLUMN = LVM_FIRST + 174, + + /// Checks whether the list-view control has group view enabled. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns TRUE if group view is enabled, or FALSE otherwise. + /// + /// Note + /// + /// To use this message, you must provide a manifest specifying Comclt32.dll version 6.0. For more information on manifests, see + /// Enabling Visual Styles. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-isgroupviewenabled LVM_ISGROUPVIEWENABLED = LVM_FIRST + 175, + + /// + /// Retrieves the color of the border of a list-view control if the LVS_EX_BORDERSELECT extended window style is set. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns a COLORREF structure that contains the color of the border of a list-view control. + /// + /// Note + /// + /// To use this message, you must provide a manifest specifying Comclt32.dll version 6.0. For more information on manifests, see + /// Enabling Visual Styles. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-getoutlinecolor LVM_GETOUTLINECOLOR = LVM_FIRST + 176, + + /// + /// Sets the color of the border of a list-view control if the LVS_EX_BORDERSELECT extended window style is set. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// **COLORREF** structure that specifies the color to set the border. + /// Returns + /// Returns COLORREF structure that contains the outline color. + /// + /// Note + /// + /// To use this message, you must provide a manifest specifying Comclt32.dll version 6.0. For more information on manifests, see + /// Enabling Visual Styles. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-setoutlinecolor LVM_SETOUTLINECOLOR = LVM_FIRST + 177, + + /// Cancels an item text editing operation. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// + /// + /// Note + /// + /// To use this message, you must provide a manifest specifying Comclt32.dll version 6.0. For more information on manifests, see + /// Enabling Visual Styles. + /// + /// + /// This message causes a an LVN_ENDLABELEDIT notification to be sent. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-canceleditlabel LVM_CANCELEDITLABEL = LVM_FIRST + 179, - LVM_MAPINDEXTODD = LVM_FIRST + 180, + + /// Maps the index of an item to a unique ID. + /// Parameters + /// wParam + /// The index of an item. + /// lParam + /// Must be zero. + /// Returns + /// Returns a unique ID. + /// + /// + /// List-view controls internally track items by index. This can present problems because indexes can change during the control's lifetime. + /// + /// + /// The list-view control can tag an item with an ID when the item is created. You can use this ID to guarantee uniqueness during + /// the lifetime of the list-view control. + /// + /// + /// To uniquely identify an item, take the index that is returned from a call such as IComponent::GetDisplayInfo and call + /// LVM_MAPINDEXTOID. The return value is a unique ID. + /// + /// + /// Note + /// + /// In a multithreaded environment, the index is only guaranteed on the thread that hosts the list-view control, not on + /// background threads. + /// + /// + /// + /// Note + /// + /// To use this message, you must provide a manifest specifying Comclt32.dll version 6.0. For more information on manifests, see + /// Enabling Visual Styles. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-mapindextoid + LVM_MAPINDEXTOID = LVM_FIRST + 180, + + /// Maps the ID of an item to an index. + /// Parameters + /// wParam + /// The unique ID of an item. + /// lParam + /// Must be zero. + /// Returns + /// Returns the most current index. + /// + /// + /// List-view controls internally track items by index. This can present problems because indexes can change during the control's lifetime. + /// + /// + /// The list-view control can tag an item with an ID when the item is created. You can use this ID to guarantee uniqueness during + /// the lifetime of the list-view control. + /// + /// + /// To uniquely identify an item, take the index that is returned from a call such as IComponent::GetDisplayInfo and call + /// LVM_MAPINDEXTOID. The return value is a unique ID. + /// + /// + /// If you need the index of an item after an ID is created you can call LVM_MAPIDTOINDEX with the unique ID and it + /// returns the most current index. + /// + /// LVM_MAPIDTOINDEX is not supported under the LVS_OWNERDATA style. + /// + /// Note + /// + /// In a multithreaded environment, the index is only guaranteed on the thread that hosts the list-view control, not on + /// background threads. + /// + /// + /// + /// Note + /// + /// To use this message, you must provide a manifest specifying Comclt32.dll version 6.0. For more information on manifests, see + /// Enabling Visual Styles. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-mapidtoindex LVM_MAPIDTOINDEX = LVM_FIRST + 181, + + /// + /// Indicates if an item in the list-view control is visible. Send this message explicitly or by using the + /// ListView_IsItemVisible macro. + /// + /// Parameters + /// wParam + /// An index of the item in the list-view control. + /// lParam + /// Must be zero. + /// Returns + /// Returns TRUE if visible, or FALSE otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-isitemvisible LVM_ISITEMVISIBLE = LVM_FIRST + 182, + + /// LVM_GETACCVERSION = LVM_FIRST + 193, + + /// + /// Gets the text meant for display when the list-view control appears empty. Send this message explicitly or by using the + /// ListView_GetEmptyText macro. + /// + /// Parameters + /// wParam + /// The size of the buffer pointed to by lParam, including the terminating NULL. + /// lParam + /// + /// A pointer to a null-terminated, Unicode buffer of size specified by wParam to receive the text. The caller is responsible for + /// allocating the buffer. + /// + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-getemptytext LVM_GETEMPTYTEXT = LVM_FIRST + 204, + + /// + /// Retrieves the coordinates of the footer for a list-view control. Send this message explicitly or by using the + /// ListView_GetFooterRect macro. + /// + /// Parameters + /// wParam + /// Not used. Must be 0. + /// lParam + /// + /// A pointer to a RECT structure to receive the coordinates. The calling process is responsible for allocating this + /// structure. The coordinates received are expressed as client coordinates. + /// + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-getfooterrect LVM_GETFOOTERRECT = LVM_FIRST + 205, + + /// + /// Gets information about the footer of a list-view control. Send this message explicitly or by using the + /// ListView_GetFooterInfo macro. + /// + /// Parameters + /// wParam + /// Not used. Must be 0. + /// lParam + /// + /// A pointer to a LVFOOTERINFO structure to receive information depending on the value of the mask member. The + /// calling process is responsible for allocating this structure and setting the mask member. + /// + /// Returns + /// Returns TRUE. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-getfooterinfo LVM_GETFOOTERINFO = LVM_FIRST + 206, + + /// + /// Gets the coordinates of a footer for a specified item in a list-view control. Send this message explicitly or by using the + /// ListView_GetFooterItemRect macro. + /// + /// Parameters + /// wParam + /// The index of the item in the list-view control. + /// lParam + /// + /// A pointer to a RECT structure to receive the coordinates. The calling application is responsible for allocating this + /// structure. The coordinates received are expressed as client coordinates. + /// + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-getfooteritemrect LVM_GETFOOTERITEMRECT = LVM_FIRST + 207, + + /// + /// Gets information on a footer item in a list-view control. Send this message explicitly or by using the + /// ListView_GetFooterItem macro. + /// + /// Parameters + /// wParam + /// The index of the item. + /// lParam + /// + /// A pointer to a LVFOOTERITEM structure to receive a value for the state and/or pszText members according + /// to the value of the mask member. The calling process is responsible for allocating this structure and setting its + /// members to indicate to the receiver what information to return. For more information, see LVFOOTERITEM. + /// + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-getfooteritem LVM_GETFOOTERITEM = LVM_FIRST + 208, + + /// + /// Retrieves the bounding rectangle for all or part of a subitem in the current view of a list-view control. Send this message + /// explicitly or by using the ListView_GetItemIndexRect macro. + /// + /// Parameters + /// wParam + /// + /// A pointer to a LVITEMINDEX structure for the parent item of the subitem. The calling process is responsible for + /// allocating this structure and setting its members. wParam must not be NULL. + /// + /// lParam + /// + /// A pointer to a RECT structure to receive the coordinates. The calling process is responsible for allocating this + /// structure. lParam must not be NULL. Set the top member to the index of the subitem. Set the left member + /// to one of the following values, indicating the part of the subitem for which the bounding rectangle is to be retrieved. + /// + /// + /// + /// Value + /// Meaning + /// + /// + /// LVIR_BOUNDS + /// Returns the bounding rectangle of the entire subitem, including the icon and label. + /// + /// + /// LVIR_ICON + /// Returns the bounding rectangle of the icon or small icon of the subitem. + /// + /// + /// LVIR_LABEL + /// Returns the bounding rectangle of the subitem text. + /// + /// + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-getitemindexrect LVM_GETITEMINDEXRECT = LVM_FIRST + 209, + + /// + /// Sets the state of a list-view item. Send this message explicitly or by using the ListView_SetItemIndexState macro. + /// + /// Parameters + /// wParam + /// + /// A pointer to an LVITEMINDEX structure for the item. The calling process is responsible for allocating this structure + /// and setting the members. + /// + /// lParam + /// + /// A pointer to an LVITEM structure. The calling process is responsible for allocating memory for the structure. Set the + /// state member to one or more (as a bitwise combination) of the List-View Item States flags. Set the stateMask + /// member of the structure to indicate the valid bits of the state member. For more information, see the stateMask + /// member of the LVITEM structure. + /// + /// Returns + /// Returns one of the following values of type HRESULT. + /// + /// + /// Return code + /// Description + /// + /// + /// E_FAIL + /// The state could not be set. + /// + /// + /// E_UNEXPECTED + /// The list-view control was not ready for the operation. + /// + /// + /// S_OK + /// The operation was successful. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-setitemindexstate LVM_SETITEMINDEXSTATE = LVM_FIRST + 210, + + /// + /// Retrieves the index of an item in a specified list-view control that matches the specified properties and relationship to + /// another item. Send this message explicitly or by using the ListView_GetNextItemIndex macro. + /// + /// Parameters + /// wParam + /// + /// A pointer to the LVITEMINDEX structure for the item to begin the search with, or -1 to find the first item that + /// matches the specified flags. The calling process is responsible for allocating this structure and setting its members. + /// + /// lParam + /// + /// Specifies the relationship to the item listed in parameter wParam. This can be one or a combination of the following values: + /// + /// + /// + /// Value + /// Meaning + /// + /// + /// Searches by index. + /// + /// + /// + /// LVNI_ALL + /// Searches for a subsequent item by index, the default value. + /// + /// + /// Searches by physical relationship to the index of the item where the search is to begin. + /// + /// + /// + /// LVNI_ABOVE + /// Searches for an item that is above the specified item. + /// + /// + /// LVNI_BELOW + /// Searches for an item that is below the specified item. + /// + /// + /// LVNI_TOLEFT + /// Searches for an item to the left of the specified item. + /// + /// + /// LVNI_PREVIOUS + /// + /// Windows Vista and later: Searches for an item that is ordered before the item specified in wParam. The + /// LVNI_PREVIOUS flag is not directional (LVNI_ABOVE will find the item positioned above, while LVNI_PREVIOUS will find the item + /// ordered before.) The LVNI_PREVIOUS flag basically reverses the logic of the search performed by the LVM_GETNEXTITEM or + /// LVM_GETNEXTITEMINDEX messages. + /// + /// + /// + /// LVNI_TORIGHT + /// Searches for an item to the right of the specified item. + /// + /// + /// LVNI_DIRECTIONMASK + /// + /// Windows Vista and later: A directional flag mask with value as follows: LVNI_ABOVE | LVNI_BELOW | LVNI_TOLEFT | LVNI_TORIGHT. + /// + /// + /// + /// The state of the item to find can be specified with one or a combination of the following values: + /// + /// + /// + /// LVNI_CUT + /// The item has the LVIS_CUT state flag set. + /// + /// + /// LVNI_DROPHILITED + /// The item has the LVIS_DROPHILITED state flag set + /// + /// + /// LVNI_FOCUSED + /// The item has the LVIS_FOCUSED state flag set. + /// + /// + /// LVNI_SELECTED + /// The item has the LVIS_SELECTED state flag set. + /// + /// + /// LVNI_STATEMASK + /// + /// Windows Vista and later: A state flag mask with value as follows: LVNI_FOCUSED | LVNI_SELECTED | LVNI_CUT | LVNI_DROPHILITED. + /// + /// + /// + /// Searches by appearance of items or by group. + /// + /// + /// + /// LVNI_VISIBLEORDER + /// Windows Vista and later: Search the visible order. + /// + /// + /// LVNI_VISIBLEONLY + /// Windows Vista and later: Search the visible items. + /// + /// + /// LVNI_SAMEGROUPONLY + /// Windows Vista and later: Search the current group. + /// + /// + /// If an item does not have all of the specified state flags set, the search continues with the next item. + /// + /// + /// + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + /// + /// Note that the following flags, for use only with Windows Vista, are mutually exclusive of any other flags in use: + /// LVNI_PREVIOUS, LVNI_VISIBLEONLY, LVNI_SAMEGROUPONLY, LVNI_VISIBLEORDER, LVNI_DIRECTIONMASK, and LVNI_STATEMASK. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvm-getnextitemindex LVM_GETNEXTITEMINDEX = LVM_FIRST + 211, + + /// LVM_SETPRESERVEALPHA = LVM_FIRST + 212, + /*LVM_SetBkImage = SETBKIMAGEW, LVM_GetBkImage = GETBKIMAGEW,*/ -#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member } /// Specifies the relationship to the item listed in parameter wParam in LVM_GETNEXTITEMINDEX. @@ -742,9 +3712,7 @@ namespace Vanara.PInvoke /// The item has the LVIS_DROPHILITED state flag set LVNI_DROPHILITED = 0X0008, - /// - /// Windows Vista and later: A state flag mask with value as follows: LVNI_FOCUSED | LVNI_SELECTED | LVNI_CUT | LVNI_DROPHILITED. - /// + /// Windows Vista and later: A state flag mask with value as follows: LVNI_FOCUSED | LVNI_SELECTED | LVNI_CUT | LVNI_DROPHILITED. LVNI_STATEMASK = LVNI_FOCUSED | LVNI_SELECTED | LVNI_CUT | LVNI_DROPHILITED, /// Windows Vista and later: Search the visible order. @@ -785,49 +3753,1113 @@ namespace Vanara.PInvoke [PInvokeData("Commctrl.h", MSDNShortId = "bb761385")] public enum ListViewNotification { -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - LVN_BEGINDRAG = (LVN_FIRST - 9), + /// + /// + /// Notifies a list-view control's parent window that a drag-and-drop operation involving the left mouse button is being + /// initiated. This notification code is sent in the form of a WM_NOTIFY message. + /// + /// + /// LVN_BEGINDRAG pnmv = (LPNMLISTVIEW) lParam; + /// + /// + /// Parameters + /// lParam + /// + /// Pointer to an NMLISTVIEW structure. The iItem member identifies the item being dragged, and the other members + /// are zero. + /// + /// Returns + /// No return value. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvn-begindrag + LVN_BEGINDRAG = LVN_FIRST - 9, + + /// + /// + /// Notifies a list-view control's parent window about the start of label editing for an item. This notification code is sent in + /// the form of a WM_NOTIFY message. + /// + /// + /// LVN_BEGINLABELEDIT pdi = (LPNMLVDISPINFO) lParam; + /// + /// + /// Parameters + /// lParam + /// + /// Pointer to an NMLVDISPINFO structure. The item member of this structure is an LVITEM structure whose + /// iItem member identifies the item being edited. Note that subitems cannot be edited; the iSubItem member is + /// always set to zero. + /// + /// Returns + /// To allow the user to edit the label, return FALSE. + /// To prevent the user from editing the label, return TRUE. + /// + /// + /// When label editing begins, an edit control is created, positioned, and initialized. Before it is displayed, the list-view + /// control sends its parent window an LVN_BEGINLABELEDIT notification code. + /// + /// + /// To customize label editing, implement a handler for LVN_BEGINLABELEDIT and have it send an LVM_GETEDITCONTROL message + /// to the list-view control. If a label is being edited, the return value will be a handle to the edit control. Use this handle + /// to customize the edit control by sending the usual EM_XXX messages. + /// + /// When the user cancels or completes the editing, the parent window receives an LVN_ENDLABELEDIT notification code. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvn-beginlabeledit LVN_BEGINLABELEDIT = LVN_BEGINLABELEDITW, - LVN_BEGINLABELEDITA = (LVN_FIRST - 5), - LVN_BEGINLABELEDITW = (LVN_FIRST - 75), - LVN_BEGINRDRAG = (LVN_FIRST - 11), - LVN_BEGINSCROLL = (LVN_FIRST - 80), - LVN_COLUMNCLICK = (LVN_FIRST - 8), - LVN_COLUMNDROPDOWN = (LVN_FIRST - 64), - LVN_COLUMNOVERFLOWCLICK = (LVN_FIRST - 66), - LVN_DELETEALLITEMS = (LVN_FIRST - 4), - LVN_DELETEITEM = (LVN_FIRST - 3), + + /// + /// + /// Notifies a list-view control's parent window about the start of label editing for an item. This notification code is sent in + /// the form of a WM_NOTIFY message. + /// + /// + /// LVN_BEGINLABELEDIT pdi = (LPNMLVDISPINFO) lParam; + /// + /// + /// Parameters + /// lParam + /// + /// Pointer to an NMLVDISPINFO structure. The item member of this structure is an LVITEM structure whose + /// iItem member identifies the item being edited. Note that subitems cannot be edited; the iSubItem member is + /// always set to zero. + /// + /// Returns + /// To allow the user to edit the label, return FALSE. + /// To prevent the user from editing the label, return TRUE. + /// + /// + /// When label editing begins, an edit control is created, positioned, and initialized. Before it is displayed, the list-view + /// control sends its parent window an LVN_BEGINLABELEDIT notification code. + /// + /// + /// To customize label editing, implement a handler for LVN_BEGINLABELEDIT and have it send an LVM_GETEDITCONTROL message + /// to the list-view control. If a label is being edited, the return value will be a handle to the edit control. Use this handle + /// to customize the edit control by sending the usual EM_XXX messages. + /// + /// When the user cancels or completes the editing, the parent window receives an LVN_ENDLABELEDIT notification code. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvn-beginlabeledit + LVN_BEGINLABELEDITA = LVN_FIRST - 5, + + /// + /// + /// Notifies a list-view control's parent window about the start of label editing for an item. This notification code is sent in + /// the form of a WM_NOTIFY message. + /// + /// + /// LVN_BEGINLABELEDIT pdi = (LPNMLVDISPINFO) lParam; + /// + /// + /// Parameters + /// lParam + /// + /// Pointer to an NMLVDISPINFO structure. The item member of this structure is an LVITEM structure whose + /// iItem member identifies the item being edited. Note that subitems cannot be edited; the iSubItem member is + /// always set to zero. + /// + /// Returns + /// To allow the user to edit the label, return FALSE. + /// To prevent the user from editing the label, return TRUE. + /// + /// + /// When label editing begins, an edit control is created, positioned, and initialized. Before it is displayed, the list-view + /// control sends its parent window an LVN_BEGINLABELEDIT notification code. + /// + /// + /// To customize label editing, implement a handler for LVN_BEGINLABELEDIT and have it send an LVM_GETEDITCONTROL message + /// to the list-view control. If a label is being edited, the return value will be a handle to the edit control. Use this handle + /// to customize the edit control by sending the usual EM_XXX messages. + /// + /// When the user cancels or completes the editing, the parent window receives an LVN_ENDLABELEDIT notification code. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvn-beginlabeledit + LVN_BEGINLABELEDITW = LVN_FIRST - 75, + + /// + /// + /// Notifies a list-view control's parent window that a drag-and-drop operation involving the right mouse button is being + /// initiated. This notification code is sent in the form of a WM_NOTIFY message. + /// + /// + /// LVN_BEGINRDRAG pnmv = (LPNMLISTVIEW) lParam; + /// + /// + /// Parameters + /// lParam + /// + /// Pointer to an NMLISTVIEW structure. The iItem member identifies the item being dragged, and the other members + /// are zero. + /// + /// Returns + /// No return value. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvn-beginrdrag + LVN_BEGINRDRAG = LVN_FIRST - 11, + + /// + /// + /// Notifies a list-view control's parent window when a scrolling operation starts. This notification code is sent in the form of + /// a WM_NOTIFY message. + /// + /// + /// LVN_BEGINSCROLL pnmLVScroll = (LPNMLVSCROLL) lParam; + /// + /// + /// Parameters + /// lParam + /// + /// Pointer to a NMLVSCROLL structure that contains the horizontal or vertical position of where the scroll operation starts. + /// + /// Returns + /// Return value not used. + /// + /// Note + /// + /// To use this notification code, you must provide a manifest specifying Comclt32.dll version 6.0. For more information on + /// manifests, see Enabling Visual Styles. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvn-beginscroll + LVN_BEGINSCROLL = LVN_FIRST - 80, + + /// + /// + /// Notifies a list-view control's parent window that a column header was clicked while the list-view control was in report mode. + /// This notification code is sent in the form of a WM_NOTIFY message. + /// + /// + /// LVN_COLUMNCLICK pnmv = (LPNMLISTVIEW) lParam; + /// + /// + /// Parameters + /// lParam + /// + /// Pointer to an NMLISTVIEW structure. The iItem member is -1, and the iSubItem member identifies the + /// column. All other members are zero. + /// + /// Returns + /// No return value. + /// + /// Using header control formats such as HDF_CHECKBOX to modify the format of column headers in a list-view control causes the + /// control to send the HDN_ITEMSTATEICONCLICK notification code instead of LVN_COLUMNCLICK when a header item is clicked. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvn-columnclick + LVN_COLUMNCLICK = LVN_FIRST - 8, + + /// + /// + /// Sent by a list-view control when the list-view's drop-down button is pressed. This notification code is sent in the form of a + /// WM_NOTIFY message. + /// + /// + /// LVN_COLUMNDROPDOWN pnmv = (LPNMLISTVIEW) lParam; + /// + /// + /// Parameters + /// lParam + /// + /// Pointer to a NMLISTVIEW structure that describes the notification code. The caller is responsible for allocating this + /// structure, including the contained NMHDR structure. Set the members of the NMHDR structure. The code + /// member must be set to LVN_COLUMNDROPDOWN. + /// + /// + /// Set the iItem member of the NMLISTVIEW structure to -1. Set the iSubItem member to the index of the + /// subitem. Set the uNewState, uOldState, and lParam members to zero. The remaining members of the + /// NMLISTVIEW structure are not used. + /// + /// Returns + /// No return value. + /// + /// + /// The notification receiver casts lParam to retrieve the NMLISTVIEW structure. The wParam parameter contains the ID of + /// the control that sends the notification code. + /// + /// + /// If a header control is a child of the list-view, the header control should send this notidication code to the list-view + /// control when the header control receives the HDN_DROPDOWN notification code. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvn-columndropdown + LVN_COLUMNDROPDOWN = LVN_FIRST - 64, + + /// + /// + /// Sent by a list-view control when its overflow button is clicked. This notification code is sent in the form of a + /// WM_NOTIFY message. + /// + /// + /// LVN_COLUMNOVERFLOWCLICK pnmv = (LPNMLISTVIEW) lParam; + /// + /// + /// Parameters + /// lParam + /// + /// Pointer to a NMLISTVIEW structure that describes the notification code. The caller is responsible for allocating this + /// structure, including the contained NMHDR structure. Set the members of the NMHDR structure. The code + /// member must be set to LVN_COLUMNOVERFLOWCLICK. + /// + /// + /// Set the iItem member of the NMLISTVIEW structure to -1. Set the iSubItem member to the index of the + /// subitem. Set the uNewState, uOldState, and lParam members to zero. The remaining members of the + /// NMLISTVIEW structure are not used. + /// + /// Returns + /// No return value. + /// + /// + /// The notification receiver casts lParam to retrieve the NMLISTVIEW structure. The wParam parameter contains the ID of + /// the control that sends the notification code. + /// + /// + /// If a header control is a child of the listview, the header control should send this notification code to the listview control + /// when the header control receives the HDN_OVERFLOWCLICK notification code. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvn-columnoverflowclick + LVN_COLUMNOVERFLOWCLICK = LVN_FIRST - 66, + + /// + /// + /// Notifies a list-view control's parent window that all items in the control are about to be deleted. This notification code is + /// sent in the form of a WM_NOTIFY message. + /// + /// + /// LVN_DELETEALLITEMS pnmv = (LPNMLISTVIEW) lParam; + /// + /// + /// Parameters + /// lParam + /// Pointer to an NMLISTVIEW structure. The iItem member is -1, and the other members are zero. + /// Returns + /// To suppress subsequent LVN_DELETEITEM notification codes, return TRUE. + /// To receive subsequent LVN_DELETEITEM notification codes, return FALSE. + /// + /// + /// A list-view control sends the LVM_DELETEALLITEMS notification code when it is destroyed or when it receives the + /// LVM_DELETEALLITEMS message. If LVM_DELETEALLITEMS does not return TRUE, the control will also send an + /// LVN_DELETEITEM notification code as each item is deleted. + /// + /// + /// If the LVM_DELETEALLITEMS message handler is in a dialog box procedure, return TRUE from the dialog box + /// procedure, and use the SetWindowLong function with DWL_MSGRESULT to set the message return value. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvn-deleteallitems + LVN_DELETEALLITEMS = LVN_FIRST - 4, + + /// + /// + /// Notifies a list-view control's parent window that an item is about to be deleted. This notification code is sent in the form + /// of a WM_NOTIFY message. + /// + /// + /// LVN_DELETEITEM pnmv = (LPNMLISTVIEW) lParam; + /// + /// + /// Parameters + /// lParam + /// + /// Pointer to an NMLISTVIEW structure. The iItem member identifies the item being deleted. If the control does not + /// have the LVS_OWNERDATA style, then the lParam is the application-defined data associated with the item. All other + /// members of this structure are zero. + /// + /// Returns + /// No return value. + /// Do not add, delete, or rearrange items in the list view while processing this notification code. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvn-deleteitem + LVN_DELETEITEM = LVN_FIRST - 3, + + /// + /// + /// Notifies a list-view control's parent window about the end of label editing for an item. This notification code is sent in + /// the form of a WM_NOTIFY message. + /// + /// + /// LVN_ENDLABELEDIT pdi = (LPNMLVDISPINFO) lParam; + /// + /// + /// Parameters + /// lParam + /// + /// Pointer to an NMLVDISPINFO structure. The item member of this structure is an LVITEM structure whose + /// iItem member identifies the item being edited. The pszText member of item contains a valid value when + /// the LVN_ENDLABELEDIT notification code is sent, regardless of whether the LVIF_TEXT flag is set in the mask member of + /// the LVITEM structure. If the user cancels editing, the pszText member of the LVITEM structure is + /// NULL; otherwise, pszText is the address of the edited text. + /// + /// Returns + /// + /// If the pszText member of the LVITEM structure is non- NULL, return TRUE to set the item's label + /// to the edited text. Return FALSE to reject the edited text and revert to the original label. + /// + /// If the pszText member of the LVITEM structure is NULL, the return value is ignored. + /// + /// + /// The return value of the dialog procedure is whether the message was handled. The second return value must be set by calling + /// SetwindowLongPtr with DWLP_MSGRESULT. + /// + /// + /// When the user begins editing an item label, the parent window of the list-view control receives an LVN_BEGINLABELEDIT + /// notification code. When the user cancels or completes the editing, the parent window receives an LVN_ENDLABELEDIT + /// notification code. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvn-endlabeledit LVN_ENDLABELEDIT = LVN_ENDLABELEDITW, - LVN_ENDLABELEDITA = (LVN_FIRST - 6), - LVN_ENDLABELEDITW = (LVN_FIRST - 76), - LVN_ENDSCROLL = (LVN_FIRST - 81), + + /// + /// + /// Notifies a list-view control's parent window about the end of label editing for an item. This notification code is sent in + /// the form of a WM_NOTIFY message. + /// + /// + /// LVN_ENDLABELEDIT pdi = (LPNMLVDISPINFO) lParam; + /// + /// + /// Parameters + /// lParam + /// + /// Pointer to an NMLVDISPINFO structure. The item member of this structure is an LVITEM structure whose + /// iItem member identifies the item being edited. The pszText member of item contains a valid value when + /// the LVN_ENDLABELEDIT notification code is sent, regardless of whether the LVIF_TEXT flag is set in the mask member of + /// the LVITEM structure. If the user cancels editing, the pszText member of the LVITEM structure is + /// NULL; otherwise, pszText is the address of the edited text. + /// + /// Returns + /// + /// If the pszText member of the LVITEM structure is non- NULL, return TRUE to set the item's label + /// to the edited text. Return FALSE to reject the edited text and revert to the original label. + /// + /// If the pszText member of the LVITEM structure is NULL, the return value is ignored. + /// + /// + /// The return value of the dialog procedure is whether the message was handled. The second return value must be set by calling + /// SetwindowLongPtr with DWLP_MSGRESULT. + /// + /// + /// When the user begins editing an item label, the parent window of the list-view control receives an LVN_BEGINLABELEDIT + /// notification code. When the user cancels or completes the editing, the parent window receives an LVN_ENDLABELEDIT + /// notification code. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvn-endlabeledit + LVN_ENDLABELEDITA = LVN_FIRST - 6, + + /// + /// + /// Notifies a list-view control's parent window about the end of label editing for an item. This notification code is sent in + /// the form of a WM_NOTIFY message. + /// + /// + /// LVN_ENDLABELEDIT pdi = (LPNMLVDISPINFO) lParam; + /// + /// + /// Parameters + /// lParam + /// + /// Pointer to an NMLVDISPINFO structure. The item member of this structure is an LVITEM structure whose + /// iItem member identifies the item being edited. The pszText member of item contains a valid value when + /// the LVN_ENDLABELEDIT notification code is sent, regardless of whether the LVIF_TEXT flag is set in the mask member of + /// the LVITEM structure. If the user cancels editing, the pszText member of the LVITEM structure is + /// NULL; otherwise, pszText is the address of the edited text. + /// + /// Returns + /// + /// If the pszText member of the LVITEM structure is non- NULL, return TRUE to set the item's label + /// to the edited text. Return FALSE to reject the edited text and revert to the original label. + /// + /// If the pszText member of the LVITEM structure is NULL, the return value is ignored. + /// + /// + /// The return value of the dialog procedure is whether the message was handled. The second return value must be set by calling + /// SetwindowLongPtr with DWLP_MSGRESULT. + /// + /// + /// When the user begins editing an item label, the parent window of the list-view control receives an LVN_BEGINLABELEDIT + /// notification code. When the user cancels or completes the editing, the parent window receives an LVN_ENDLABELEDIT + /// notification code. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvn-endlabeledit + LVN_ENDLABELEDITW = LVN_FIRST - 76, + + /// + /// + /// Notifies a list-view control's parent window when a scrolling operation ends. This notification code is sent in the form of a + /// WM_NOTIFY message. + /// + /// + /// LVN_ENDSCROLL pnmLVScroll = (LPNMLVSCROLL) lParam; + /// + /// + /// Parameters + /// lParam + /// + /// Pointer to a NMLVSCROLL structure that contains the horizontal or vertical position of where the scroll operation ends. + /// + /// Returns + /// Return value not used. + /// + /// Note + /// + /// To use this notification code, you must provide a manifest specifying Comclt32.dll version 6.0. For more information on + /// manifests, see Enabling Visual Styles. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvn-endscroll + LVN_ENDSCROLL = LVN_FIRST - 81, + + /// + /// + /// Sent by a list-view control to its parent window. It is a request for the parent window to provide information needed to + /// display or sort a list-view item. This notification code is sent in the form of a WM_NOTIFY message. + /// + /// + /// LVN_GETDISPINFO pdi = (NMLVDISPINFO*) lParam + /// + /// + /// Parameters + /// lParam + /// + /// Pointer to an NMLVDISPINFO structure. On input, the LVITEM structure contained in this structure specifies the + /// type of information required and identifies the item or subitem of interest. Use the LVITEM structure to return the + /// requested information to the control. If your message handler sets the LVIF_DI_SETITEM flag in the mask member of the + /// LVITEM structure, the list-view control stores the requested information and will not ask for it again. + /// + /// Returns + /// No return value. + /// + /// + /// The notification receiver casts lParam to retrieve the NMLVDISPINFO structure. The wParam parameter contains the + /// notification code. + /// + /// + /// A list-view control sends the LVN_GETDISPINFO notification code to retrieve item information that is stored by the + /// application rather than the control. The information can be text or icon information for an item. It can also be item state + /// information. See the LVM_SETCALLBACKMASK message for more information on implementing item state on a callback basis. + /// + /// For more information on list-view callbacks, see Callback Items and the Callback Mask. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvn-getdispinfo LVN_GETDISPINFO = LVN_GETDISPINFOW, - LVN_GETDISPINFOA = (LVN_FIRST - 50), - LVN_GETDISPINFOW = (LVN_FIRST - 77), - LVN_GETEMPTYMARKUP = (LVN_FIRST - 87), + + /// + /// + /// Sent by a list-view control to its parent window. It is a request for the parent window to provide information needed to + /// display or sort a list-view item. This notification code is sent in the form of a WM_NOTIFY message. + /// + /// + /// LVN_GETDISPINFO pdi = (NMLVDISPINFO*) lParam + /// + /// + /// Parameters + /// lParam + /// + /// Pointer to an NMLVDISPINFO structure. On input, the LVITEM structure contained in this structure specifies the + /// type of information required and identifies the item or subitem of interest. Use the LVITEM structure to return the + /// requested information to the control. If your message handler sets the LVIF_DI_SETITEM flag in the mask member of the + /// LVITEM structure, the list-view control stores the requested information and will not ask for it again. + /// + /// Returns + /// No return value. + /// + /// + /// The notification receiver casts lParam to retrieve the NMLVDISPINFO structure. The wParam parameter contains the + /// notification code. + /// + /// + /// A list-view control sends the LVN_GETDISPINFO notification code to retrieve item information that is stored by the + /// application rather than the control. The information can be text or icon information for an item. It can also be item state + /// information. See the LVM_SETCALLBACKMASK message for more information on implementing item state on a callback basis. + /// + /// For more information on list-view callbacks, see Callback Items and the Callback Mask. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvn-getdispinfo + LVN_GETDISPINFOA = LVN_FIRST - 50, + + /// + /// + /// Sent by a list-view control to its parent window. It is a request for the parent window to provide information needed to + /// display or sort a list-view item. This notification code is sent in the form of a WM_NOTIFY message. + /// + /// + /// LVN_GETDISPINFO pdi = (NMLVDISPINFO*) lParam + /// + /// + /// Parameters + /// lParam + /// + /// Pointer to an NMLVDISPINFO structure. On input, the LVITEM structure contained in this structure specifies the + /// type of information required and identifies the item or subitem of interest. Use the LVITEM structure to return the + /// requested information to the control. If your message handler sets the LVIF_DI_SETITEM flag in the mask member of the + /// LVITEM structure, the list-view control stores the requested information and will not ask for it again. + /// + /// Returns + /// No return value. + /// + /// + /// The notification receiver casts lParam to retrieve the NMLVDISPINFO structure. The wParam parameter contains the + /// notification code. + /// + /// + /// A list-view control sends the LVN_GETDISPINFO notification code to retrieve item information that is stored by the + /// application rather than the control. The information can be text or icon information for an item. It can also be item state + /// information. See the LVM_SETCALLBACKMASK message for more information on implementing item state on a callback basis. + /// + /// For more information on list-view callbacks, see Callback Items and the Callback Mask. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvn-getdispinfo + LVN_GETDISPINFOW = LVN_FIRST - 77, + + /// + /// + /// Sent by list-view control to its parent window when the control has no items. The LVN_GETEMPTYMARKUP notification code is a + /// request for the parent window to provide markup text. This notification code is sent in the form of a WM_NOTIFY message. + /// + /// + /// LVN_GETEMPTYMARKUP pnmMarkup = (NMLVEMPTYMARKUP*) lParam; + /// + /// + /// Parameters + /// lParam + /// + /// Pointer to a NMLVEMPTYMARKUP structure. Set the members of this structure to provide markup text for the list-view control. + /// + /// Returns + /// Return TRUE to set the markup text in the list-view control, or FALSE otherwise. + /// + /// The notification receiver casts lParam to retrieve the NMLVEMPTYMARKUP structure. The wParam parameter contains the ID + /// of the control that sends this message. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvn-getemptymarkup + LVN_GETEMPTYMARKUP = LVN_FIRST - 87, + + /// + /// + /// Sent by a large icon view list-view control that has the LVS_EX_INFOTIP extended style. This notification code is sent + /// when the list-view control is requesting additional text information to be displayed in a tooltip. It is sent in the form of + /// a WM_NOTIFY message. + /// + /// + /// LVN_GETINFOTIP pGetInfoTip = (LPNMLVGETINFOTIP) lParam; + /// + /// + /// Parameters + /// lParam + /// Pointer to an NMLVGETINFOTIP structure that contains information about this notification code. + /// Returns + /// The return value for this notification is not used. + /// + /// This notification code is only sent by list-view controls that have the LVS_EX_INFOTIP extended style. The + /// LVN_GETINFOTIP notification code is sent only for subitem 0. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvn-getinfotip LVN_GETINFOTIP = LVN_GETINFOTIPW, - LVN_GETINFOTIPA = (LVN_FIRST - 57), - LVN_GETINFOTIPW = (LVN_FIRST - 58), - LVN_HOTTRACK = (LVN_FIRST - 21), + + /// + /// + /// Sent by a large icon view list-view control that has the LVS_EX_INFOTIP extended style. This notification code is sent + /// when the list-view control is requesting additional text information to be displayed in a tooltip. It is sent in the form of + /// a WM_NOTIFY message. + /// + /// + /// LVN_GETINFOTIP pGetInfoTip = (LPNMLVGETINFOTIP) lParam; + /// + /// + /// Parameters + /// lParam + /// Pointer to an NMLVGETINFOTIP structure that contains information about this notification code. + /// Returns + /// The return value for this notification is not used. + /// + /// This notification code is only sent by list-view controls that have the LVS_EX_INFOTIP extended style. The + /// LVN_GETINFOTIP notification code is sent only for subitem 0. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvn-getinfotip + LVN_GETINFOTIPA = LVN_FIRST - 57, + + /// + /// + /// Sent by a large icon view list-view control that has the LVS_EX_INFOTIP extended style. This notification code is sent + /// when the list-view control is requesting additional text information to be displayed in a tooltip. It is sent in the form of + /// a WM_NOTIFY message. + /// + /// + /// LVN_GETINFOTIP pGetInfoTip = (LPNMLVGETINFOTIP) lParam; + /// + /// + /// Parameters + /// lParam + /// Pointer to an NMLVGETINFOTIP structure that contains information about this notification code. + /// Returns + /// The return value for this notification is not used. + /// + /// This notification code is only sent by list-view controls that have the LVS_EX_INFOTIP extended style. The + /// LVN_GETINFOTIP notification code is sent only for subitem 0. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvn-getinfotip + LVN_GETINFOTIPW = LVN_FIRST - 58, + + /// + /// + /// Sent by a list-view control when the user moves the mouse over an item. This notification code is only sent by list-view + /// controls that have the LVS_EX_TRACKSELECT extended list-view style. It is sent in the form of a WM_NOTIFY message. + /// + /// + /// LVN_HOTTRACK lpnmlv = (LPNMLISTVIEW) lParam; + /// + /// + /// Parameters + /// lParam + /// + /// Pointer to an NMLISTVIEW structure that contains information about this notification code. The iItem, + /// iSubItem, and ptAction members of this structure contain information about the item. The receiving application + /// can modify the iItem member to specify the item that will be selected. If iItem is set to -1, no item will be selected. + /// + /// Returns + /// + /// Return zero to allow the list view to perform its normal track select processing. If the application returns nonzero, the + /// item will not be selected. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvn-hottrack + LVN_HOTTRACK = LVN_FIRST - 21, + + /// + /// + /// Notifies a list-view control's parent window that an incremental search has started. This notification code is sent in the + /// form of a WM_NOTIFY message. + /// + /// + /// LVN_INCREMENTALSEARCH pnmv = (LPNMLVFINDITEM) lParam; + /// + /// + /// Parameters + /// lParam + /// + /// Pointer to a NMLVFINDITEM structure that describes the notification code. The caller is responsible for allocating + /// this structure, including the contained NMHDR and LVFINDINFO structures. Set the members of the NMHDR + /// structure. The code member must be set to LVN_INCREMENTALSEARCH. + /// + /// Returns + /// No return value. + /// + /// + /// The notification receiver casts lParam to retrieve the NMLVFINDITEM structure. The wParam parameter contains the ID of + /// the control that sends this notification code. + /// + /// + /// This notification code gives an application (or the notification receiver) the opportunity to customize an incremental + /// search. For example, if the search items are numeric, the application can perform a numerical search instead of a string search. + /// + /// + /// The application sets the lParam member of the LVFINDINFO structure contained in NMLVFINDITEM structure + /// to the result of the search, or to another application defined value to fail the search and indicate to the control how to proceed. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvn-incrementalsearch LVN_INCREMENTALSEARCH = LVN_INCREMENTALSEARCHW, - LVN_INCREMENTALSEARCHA = (LVN_FIRST - 62), - LVN_INCREMENTALSEARCHW = (LVN_FIRST - 63), - LVN_INSERTITEM = (LVN_FIRST - 2), - LVN_ITEMACTIVATE = (LVN_FIRST - 14), - LVN_ITEMCHANGED = (LVN_FIRST - 1), - LVN_ITEMCHANGING = (LVN_FIRST - 0), - LVN_KEYDOWN = (LVN_FIRST - 55), - LVN_LINKCLICK = (LVN_FIRST - 84), - LVN_MARQUEEBEGIN = (LVN_FIRST - 56), - LVN_ODCACHEHINT = (LVN_FIRST - 13), + + /// + /// + /// Notifies a list-view control's parent window that an incremental search has started. This notification code is sent in the + /// form of a WM_NOTIFY message. + /// + /// + /// LVN_INCREMENTALSEARCH pnmv = (LPNMLVFINDITEM) lParam; + /// + /// + /// Parameters + /// lParam + /// + /// Pointer to a NMLVFINDITEM structure that describes the notification code. The caller is responsible for allocating + /// this structure, including the contained NMHDR and LVFINDINFO structures. Set the members of the NMHDR + /// structure. The code member must be set to LVN_INCREMENTALSEARCH. + /// + /// Returns + /// No return value. + /// + /// + /// The notification receiver casts lParam to retrieve the NMLVFINDITEM structure. The wParam parameter contains the ID of + /// the control that sends this notification code. + /// + /// + /// This notification code gives an application (or the notification receiver) the opportunity to customize an incremental + /// search. For example, if the search items are numeric, the application can perform a numerical search instead of a string search. + /// + /// + /// The application sets the lParam member of the LVFINDINFO structure contained in NMLVFINDITEM structure + /// to the result of the search, or to another application defined value to fail the search and indicate to the control how to proceed. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvn-incrementalsearch + LVN_INCREMENTALSEARCHA = LVN_FIRST - 62, + + /// + /// + /// Notifies a list-view control's parent window that an incremental search has started. This notification code is sent in the + /// form of a WM_NOTIFY message. + /// + /// + /// LVN_INCREMENTALSEARCH pnmv = (LPNMLVFINDITEM) lParam; + /// + /// + /// Parameters + /// lParam + /// + /// Pointer to a NMLVFINDITEM structure that describes the notification code. The caller is responsible for allocating + /// this structure, including the contained NMHDR and LVFINDINFO structures. Set the members of the NMHDR + /// structure. The code member must be set to LVN_INCREMENTALSEARCH. + /// + /// Returns + /// No return value. + /// + /// + /// The notification receiver casts lParam to retrieve the NMLVFINDITEM structure. The wParam parameter contains the ID of + /// the control that sends this notification code. + /// + /// + /// This notification code gives an application (or the notification receiver) the opportunity to customize an incremental + /// search. For example, if the search items are numeric, the application can perform a numerical search instead of a string search. + /// + /// + /// The application sets the lParam member of the LVFINDINFO structure contained in NMLVFINDITEM structure + /// to the result of the search, or to another application defined value to fail the search and indicate to the control how to proceed. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvn-incrementalsearch + LVN_INCREMENTALSEARCHW = LVN_FIRST - 63, + + /// + /// + /// Notifies a list-view control's parent window that a new item was inserted. This notification code is sent in the form of a + /// WM_NOTIFY message. + /// + /// + /// LVN_INSERTITEM pnmv = (LPNMLISTVIEW) lParam; + /// + /// + /// Parameters + /// lParam + /// + /// Pointer to an NMLISTVIEW structure. The iItem member identifies the new item, and the other members are zero. + /// + /// Returns + /// No return value. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvn-insertitem + LVN_INSERTITEM = LVN_FIRST - 2, + + /// + /// + /// Sent by a list-view control when the user activates an item. This notification code is sent in the form of a WM_NOTIFY message. + /// + /// + /// LVN_ITEMACTIVATE #if (_WIN32_IE >= 0x0400) lpnmia = (LPNMITEMACTIVATE)lParam; #else lpnm = (LPNMHDR)lParam; #endif + /// + /// + /// Parameters + /// lParam + /// Version 4.71. Pointer to an NMITEMACTIVATE structure that contains information about this notification code. + /// Version 4.70 and earlier. Pointer to an NMHDR structure that contains information about this notification code. + /// Returns + /// The application receiving this notification code must return zero. + /// + /// To obtain the items being activated, the receiving application should use the LVM_GETSELECTEDCOUNT message to retrieve + /// the number of items that are selected and then send the LVM_GETNEXTITEM message with LVNI_SELECTED until all of + /// the items have been retrieved. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvn-itemactivate + LVN_ITEMACTIVATE = LVN_FIRST - 14, + + /// + /// + /// Notifies a list-view control's parent window that an item has changed. This notification code is sent in the form of a + /// WM_NOTIFY message. + /// + /// + /// LVN_ITEMCHANGED pnmv = (LPNMLISTVIEW) lParam; + /// + /// + /// Parameters + /// lParam + /// + /// Pointer to an NMLISTVIEW structure that identifies the item and specifies which of its attributes have changed. If the + /// iItem member of the structure pointed to by lParam is -1, the change has been applied to all items in the list view. + /// + /// Returns + /// No return value. + /// + /// If a list-view control has the LVS_OWNERDATA style, and the user selects a range of items by holding down the SHIFT + /// key and clicking the mouse, LVN_ITEMCHANGED notification codes are not sent for each selected or deselected item. Instead, + /// you will receive a single LVN_ODSTATECHANGED notification code, indicating that a range of items has changed state. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvn-itemchanged + LVN_ITEMCHANGED = LVN_FIRST - 1, + + /// + /// + /// Notifies a list-view control's parent window that an item is changing. This notification code is sent in the form of a + /// WM_NOTIFY message. + /// + /// + /// LVN_ITEMCHANGING pnmv = (LPNMLISTVIEW) lParam; + /// + /// + /// Parameters + /// lParam + /// Pointer to an NMLISTVIEW structure that identifies the item and specifies which of its attributes are changing. + /// Returns + /// Returns TRUE to prevent the change, or FALSE to allow the change. + /// If the list-view control has the LVS_OWNERDATA style, LVN_ITEMCHANGING notification codes are not sent. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvn-itemchanging + LVN_ITEMCHANGING = LVN_FIRST - 0, + + /// + /// + /// Notifies a list-view control's parent window that a key has been pressed. This notification code is sent in the form of a + /// WM_NOTIFY message. + /// + /// + /// LVN_KEYDOWN pnkd = (LPNMLVKEYDOWN) lParam; + /// + /// + /// Parameters + /// lParam + /// Pointer to an NMLVKEYDOWN structure. + /// Returns + /// No return value. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvn-keydown + LVN_KEYDOWN = LVN_FIRST - 55, + + /// + /// + /// Notifies a list-view control's parent window that a link has been clicked on. This notification code is sent in the form of a + /// WM_NOTIFY message. + /// + /// + /// LVN_LINKCLICK pLinkInfo = (NMLVLINK*) lParam; + /// + /// + /// Parameters + /// lParam + /// + /// Pointer to an NMLVLINK structure. The identifier of the group containing the link is in the iSubItem member. + /// + /// Returns + /// No return value. + /// + /// + /// The following example shows how an application might respond to this notification code in its WM_NOTIFY message + /// handler. The example toggles the collapsed state of the group and sets the appropriate link text. + /// + /// + /// case LVN_LINKCLICK: { NMLVLINK* pLinkInfo = (NMLVLINK*)lParam; HWND hList = pLinkInfo->hdr.hwndFrom; LVGROUP groupInfo; groupInfo.cbSize = sizeof(groupInfo); groupInfo.mask = LVGF_TASK; int groupIndex = pLinkInfo->iSubItem; if (ListView_GetGroupState(hList, groupIndex, LVGS_COLLAPSED)) { ListView_SetGroupState(hList, groupIndex, LVGS_COLLAPSED, 0); groupInfo.pszTask = L"Hide"; } else { ListView_SetGroupState(hList, groupIndex, LVGS_COLLAPSED, LVGS_COLLAPSED); groupInfo.pszTask = L"Show"; } ListView_SetGroupInfo(hList, groupIndex, &groupInfo); break; } + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvn-linkclick + LVN_LINKCLICK = LVN_FIRST - 84, + + /// + /// + /// Notifies a list-view control's parent window that a bounding box (marquee) selection has begun. This notification code is + /// sent in the form of a WM_NOTIFY message. + /// + /// + /// LVN_MARQUEEBEGIN pnmv = (LPNMLISTVIEW) lParam; + /// + /// + /// Parameters + /// lParam + /// Pointer to an NMHDR structure. + /// Returns + /// To accept the notification code, return zero. To quit the bounding box selection, return nonzero. + /// + /// A bounding box selection is the process of clicking the list-view window's client area and dragging to select multiple items simultaneously. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvn-marqueebegin + LVN_MARQUEEBEGIN = LVN_FIRST - 56, + + /// + /// + /// Sent by a virtual list-view control when the contents of its display area have changed. For example, a list-view control + /// sends this notification code when the user scrolls the control's display. The LVN_ODCACHEHINT notification code is sent in + /// the form of a WM_NOTIFY message. + /// + /// + /// LVN_ODCACHEHINT pCachehint = (NMLVCACHEHINT *) lParam; + /// + /// + /// Parameters + /// lParam + /// Pointer to an NMLVCACHEHINT structure containing information about the range of items to be cached. + /// Returns + /// The application receiving this notification code must return zero. + /// + /// + /// Handling this message allows the application to update the item information held in cache so that it is readily available + /// when an LVN_GETDISPINFO notification code is sent. + /// + /// + /// Note that this notification code is not always an exact representation of the items that will be requested by + /// LVN_GETDISPINFO. Therefore, if the requested item is not cached while handling LVN_GETDISPINFO, the application must be + /// prepared to supply the requested information from a source outside the cache. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvn-odcachehint + LVN_ODCACHEHINT = LVN_FIRST - 13, + + /// + /// + /// Sent by a virtual list-view control when it needs the owner to find a particular callback item. For example, the control will + /// send this notification code when it receives shortcut keyboard input or when it receives an LVM_FINDITEM message. The + /// LVN_ODFINDITEM notification code is sent in the form of a WM_NOTIFY message. + /// + /// + /// LVN_ODFINDITEM pFindInfo = (PNMLVFINDITEM) lParam; + /// + /// + /// Parameters + /// lParam + /// Pointer to an NMLVFINDITEM structure that includes information to be used for the search. + /// Returns + /// Return the index of the item found, or -1 if no item is found. + /// + /// Search information is sent in the form of an LVFINDINFO structure, which is a member of the NMLVFINDITEM structure. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvn-odfinditem LVN_ODFINDITEM = LVN_ODFINDITEMW, - LVN_ODFINDITEMA = (LVN_FIRST - 52), - LVN_ODFINDITEMW = (LVN_FIRST - 79), - LVN_ODSTATECHANGED = (LVN_FIRST - 15), + + /// + /// + /// Sent by a virtual list-view control when it needs the owner to find a particular callback item. For example, the control will + /// send this notification code when it receives shortcut keyboard input or when it receives an LVM_FINDITEM message. The + /// LVN_ODFINDITEM notification code is sent in the form of a WM_NOTIFY message. + /// + /// + /// LVN_ODFINDITEM pFindInfo = (PNMLVFINDITEM) lParam; + /// + /// + /// Parameters + /// lParam + /// Pointer to an NMLVFINDITEM structure that includes information to be used for the search. + /// Returns + /// Return the index of the item found, or -1 if no item is found. + /// + /// Search information is sent in the form of an LVFINDINFO structure, which is a member of the NMLVFINDITEM structure. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvn-odfinditem + LVN_ODFINDITEMA = LVN_FIRST - 52, + + /// + /// + /// Sent by a virtual list-view control when it needs the owner to find a particular callback item. For example, the control will + /// send this notification code when it receives shortcut keyboard input or when it receives an LVM_FINDITEM message. The + /// LVN_ODFINDITEM notification code is sent in the form of a WM_NOTIFY message. + /// + /// + /// LVN_ODFINDITEM pFindInfo = (PNMLVFINDITEM) lParam; + /// + /// + /// Parameters + /// lParam + /// Pointer to an NMLVFINDITEM structure that includes information to be used for the search. + /// Returns + /// Return the index of the item found, or -1 if no item is found. + /// + /// Search information is sent in the form of an LVFINDINFO structure, which is a member of the NMLVFINDITEM structure. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvn-odfinditem + LVN_ODFINDITEMW = LVN_FIRST - 79, + + /// + /// + /// Sent by a list-view control when the state of an item or range of items has changed. This notification code is sent in the + /// form of a WM_NOTIFY message. + /// + /// + /// LVN_ODSTATECHANGED lpStateChange = (LPNMLVODSTATECHANGE) lParam; + /// + /// + /// Parameters + /// lParam + /// Pointer to an NMLVODSTATECHANGE structure that contains information about the item or items that have changed. + /// Returns + /// The application receiving this notification code must return zero. + // https://docs.microsoft.com/en-us/windows/win32/controls/lvn-odstatechanged + LVN_ODSTATECHANGED = LVN_FIRST - 15, + + /// + /// + /// Notifies a list-view control's parent window that it must update the information it maintains for an item. This notification + /// code is sent in the form of a WM_NOTIFY message. + /// + /// + /// LVN_SETDISPINFO pdi = (NMLVDISPINFO*) lParam + /// + /// + /// Parameters + /// lParam + /// + /// Pointer to an NMLVDISPINFO structure that specifies information for the changed item. The item member of this + /// structure is an LVITEM structure that contains information about the item that was changed. The pszText member + /// of item contains a valid value, regardless of whether the LVIF_TEXT flag is set in the mask member of this structure. + /// + /// Returns + /// No return value. + /// + /// The notification receiver casts lParam to retrieve the NMLVDISPINFO structure. The wParam parameter contains the + /// message code. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvn-setdispinfo LVN_SETDISPINFO = LVN_SETDISPINFOW, - LVN_SETDISPINFOA = (LVN_FIRST - 51), - LVN_SETDISPINFOW = (LVN_FIRST - 78), -#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member + + /// + /// + /// Notifies a list-view control's parent window that it must update the information it maintains for an item. This notification + /// code is sent in the form of a WM_NOTIFY message. + /// + /// + /// LVN_SETDISPINFO pdi = (NMLVDISPINFO*) lParam + /// + /// + /// Parameters + /// lParam + /// + /// Pointer to an NMLVDISPINFO structure that specifies information for the changed item. The item member of this + /// structure is an LVITEM structure that contains information about the item that was changed. The pszText member + /// of item contains a valid value, regardless of whether the LVIF_TEXT flag is set in the mask member of this structure. + /// + /// Returns + /// No return value. + /// + /// The notification receiver casts lParam to retrieve the NMLVDISPINFO structure. The wParam parameter contains the + /// message code. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvn-setdispinfo + LVN_SETDISPINFOA = LVN_FIRST - 51, + + /// + /// + /// Notifies a list-view control's parent window that it must update the information it maintains for an item. This notification + /// code is sent in the form of a WM_NOTIFY message. + /// + /// + /// LVN_SETDISPINFO pdi = (NMLVDISPINFO*) lParam + /// + /// + /// Parameters + /// lParam + /// + /// Pointer to an NMLVDISPINFO structure that specifies information for the changed item. The item member of this + /// structure is an LVITEM structure that contains information about the item that was changed. The pszText member + /// of item contains a valid value, regardless of whether the LVIF_TEXT flag is set in the mask member of this structure. + /// + /// Returns + /// No return value. + /// + /// The notification receiver casts lParam to retrieve the NMLVDISPINFO structure. The wParam parameter contains the + /// message code. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/lvn-setdispinfo + LVN_SETDISPINFOW = LVN_FIRST - 78, } /// The following window styles are specific to list-view controls. diff --git a/PInvoke/ComCtl32/CommCtrl.Messages.cs b/PInvoke/ComCtl32/CommCtrl.Messages.cs index 10ded544..2e7f3180 100644 --- a/PInvoke/ComCtl32/CommCtrl.Messages.cs +++ b/PInvoke/ComCtl32/CommCtrl.Messages.cs @@ -9,7 +9,6 @@ [PInvokeData("Commctrl.h")] public enum CommonControlMessage { -#pragma warning disable CS1572 // XML comment has a param tag, but there is no parameter by that name /// CCM_SETBKCOLOR = CCM_FIRST + 1, // lParam is bkColor @@ -26,34 +25,48 @@ /// Sets the Unicode character format flag for the control. This message enables you to change the character set used by the /// control at run time rather than having to re-create the control. /// - /// + /// Parameters + /// wParam + /// /// A value that determines the character set that is used by the control. If this value is TRUE, the control will use /// Unicode characters. If this value is FALSE, the control will use ANSI characters. - /// - /// Must be zero. - /// Returns the previous Unicode format flag for the control. + /// + /// lParam + /// Must be zero. + /// Returns + /// Returns the previous Unicode format flag for the control. + // https://docs.microsoft.com/en-us/windows/win32/controls/ccm-setunicodeformat CCM_SETUNICODEFORMAT = CCM_FIRST + 5, /// Gets the Unicode character format flag for the control. - /// Must be zero. - /// Must be zero. - /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// /// Returns the Unicode format flag for the control. If this value is nonzero, the control is using Unicode characters. If this /// value is zero, the control is using ANSI characters. - /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/ccm-getunicodeformat CCM_GETUNICODEFORMAT = CCM_FIRST + 6, /// This message is used to inform the control that you are expecting a behavior associated with a particular version. - /// The version number. - /// Must be zero. - /// + /// Parameters + /// wParam + /// The version number. + /// lParam + /// Must be zero. + /// Returns + /// /// Returns the version specified in the previous CCM_SETVERSION message. If wParam is set to a value greater than the /// current DLL version, it returns -1. - /// + /// /// /// - /// In a few cases, a control may behave differently, depending on the version. This primarily applies to bugs that were fixed - /// in later versions. The CCM_SETVERSION message enables you to inform the control which behavior is expected. You can + /// In a few cases, a control may behave differently, depending on the version. This primarily applies to bugs that were fixed in + /// later versions. The CCM_SETVERSION message enables you to inform the control which behavior is expected. You can /// determine which version you have specified by sending a CCM_GETVERSION message. For an example of how to use this /// message, see Custom Draw With List-View and Tree-View Controls. /// @@ -61,44 +74,82 @@ /// If you have ComCtl32.dll version 6 installed, regardless of what value you set in wParam, the CCM_SETVERSION message /// returns version 6. /// + /// + /// Note + /// This message only sets the version number for the control to which it is sent. + /// /// + // https://docs.microsoft.com/en-us/windows/win32/controls/ccm-setversion CCM_SETVERSION = CCM_FIRST + 0x7, /// Gets the version number for a control set by the most recent CCM_SETVERSION message. - /// Must be zero. - /// Must be zero. - /// - /// Returns the version number set by the most recent CCM_SETVERSION message. If no such message has been sent, it - /// returns zero. - /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// + /// Returns the version number set by the most recent CCM_SETVERSION message. If no such message has been sent, it returns zero. + /// /// + /// /// This message does not return the DLL version. See Shell Versions for a discussion of how to use DllGetVersion to /// retrieve the current DLL version. + /// + /// + /// Note + /// The version number is set on a control by control basis, and may not be the same for all controls. + /// /// + // https://docs.microsoft.com/en-us/windows/win32/controls/ccm-getversion CCM_GETVERSION = CCM_FIRST + 0x8, /// CCM_SETNOTIFYWINDOW = CCM_FIRST + 0x9, // wParam == hwndParent. /// Sets the visual style of a control. - /// Must be zero. - /// A pointer to a Unicode string that contains the control visual style to set. - /// The return value is not used. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// A pointer to a Unicode string that contains the control visual style to set. + /// Returns + /// The return value is not used. + /// + /// Note + /// + /// To use this message, you must provide a manifest specifying Comclt32.dll version 6.0. For more information on manifests, see + /// Enabling Visual Styles. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/ccm-setwindowtheme CCM_SETWINDOWTHEME = CCM_FIRST + 0xb, /// /// Enables automatic high dots per inch (dpi) scaling in Tree-View controls, List-View controls, ComboBoxEx controls, Header /// controls, Buttons, Toolbar controls, Animation controls, and Image Lists. /// - /// Set to TRUE. - /// Must be zero. - /// The return value is not used. + /// Parameters + /// wParam + /// Set to TRUE. + /// lParam + /// Must be zero. + /// Returns + /// The return value is not used. /// /// Quick Launch and Taskbar should not specify a dpi scaling, because the images are already scaled. /// Any control that uses an image list created with the SmallIcon metric should not scale its icons. + /// + /// Note + /// + /// To use this API, you must provide a manifest that specifies Comclt32.dll version 6.0. For more information on manifests, see + /// Enabling Visual Styles. + /// + /// /// + // https://docs.microsoft.com/en-us/windows/win32/controls/ccm-dpiscale CCM_DPISCALE = CCM_FIRST + 0xc, // wParam == Awareness -#pragma warning restore CS1572 // XML comment has a param tag, but there is no parameter by that name } } } \ No newline at end of file diff --git a/PInvoke/ComCtl32/CommCtrl.Progress.cs b/PInvoke/ComCtl32/CommCtrl.Progress.cs index 255f927a..8527b023 100644 --- a/PInvoke/ComCtl32/CommCtrl.Progress.cs +++ b/PInvoke/ComCtl32/CommCtrl.Progress.cs @@ -6,93 +6,122 @@ namespace Vanara.PInvoke { public static partial class ComCtl32 { -#pragma warning disable CS1572 // XML comment has a param tag, but there is no parameter by that name - /// Progress Bar Messages // https://docs.microsoft.com/en-us/windows/win32/controls/bumper-progress-bar-control-reference-messages [PInvokeData("Commctrl.h")] public enum ProgressMessage { /// Sets the minimum and maximum values for a progress bar and redraws the bar to reflect the new range. - /// Must be zero. - /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// /// The LOWORD specifies the minimum range value, and the HIWORD specifies the maximum range value. The minimum /// range value must not be negative. By default, the minimum value is zero. The maximum range value must be greater than the /// minimum range value. By default, the maximum range value is 100. - /// - /// + /// + /// Returns + /// /// Returns the previous range values if successful, or zero otherwise. The LOWORD specifies the previous minimum value, /// and the HIWORD specifies the previous maximum value. - /// + /// /// /// - /// If you do not set the range values, the system sets the minimum value to 0 and the maximum value to 100. Because this - /// message expresses the range as a 16-bit unsigned integer, it can extend from 0 to 65,535. The minimum value in the range can - /// be from 0 to 65,535. Likewise, the maximum value can be from 0 to 65,535. + /// If you do not set the range values, the system sets the minimum value to 0 and the maximum value to 100. Because this message + /// expresses the range as a 16-bit unsigned integer, it can extend from 0 to 65,535. The minimum value in the range can be from + /// 0 to 65,535. Likewise, the maximum value can be from 0 to 65,535. /// /// To set a larger range, call PBM_SETRANGE32. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/pbm-setrange PBM_SETRANGE = WindowMessage.WM_USER + 1, /// Sets the current position for a progress bar and redraws the bar to reflect the new position. - /// Signed integer that becomes the new position. - /// Must be zero. - /// Returns the previous position. + /// Parameters + /// wParam + /// Signed integer that becomes the new position. + /// lParam + /// Must be zero. + /// Returns + /// Returns the previous position. /// /// If wParam is outside the range of the control, the position is set to the closest boundary. /// Do not send this message to a control that has the PBS_MARQUEE style. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/pbm-setpos PBM_SETPOS = WindowMessage.WM_USER + 2, /// /// Advances the current position of a progress bar by a specified increment and redraws the bar to reflect the new position. /// - /// Amount to advance the position. - /// Must be zero. - /// Returns the previous position. + /// Parameters + /// wParam + /// Amount to advance the position. + /// lParam + /// Must be zero. + /// Returns + /// Returns the previous position. /// /// If the increment results in a value outside the range of the control, the position is set to the nearest boundary. /// The behavior of this message is undefined if it is sent to a control that has the PBS_MARQUEE style. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/pbm-deltapos PBM_DELTAPOS = WindowMessage.WM_USER + 3, /// /// Specifies the step increment for a progress bar. The step increment is the amount by which the progress bar increases its /// current position whenever it receives a PBM_STEPIT message. By default, the step increment is set to 10. /// - /// New step increment. - /// Must be zero. - /// Returns the previous step increment. + /// Parameters + /// wParam + /// New step increment. + /// lParam + /// Must be zero. + /// Returns + /// Returns the previous step increment. + // https://docs.microsoft.com/en-us/windows/win32/controls/pbm-setstep PBM_SETSTEP = WindowMessage.WM_USER + 4, /// /// Advances the current position for a progress bar by the step increment and redraws the bar to reflect the new position. An /// application sets the step increment by sending the PBM_SETSTEP message. /// - /// Must be zero. - /// Must be zero. - /// Returns the previous position. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns the previous position. /// /// When the position exceeds the maximum range value, this message resets the current position so that the progress indicator /// starts over again from the beginning. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/pbm-stepit PBM_STEPIT = WindowMessage.WM_USER + 5, /// /// Sets the minimum and maximum values for a progress bar to 32-bit values, and redraws the bar to reflect the new range. /// - /// Minimum range value. By default, the minimum value is zero. - /// Maximum range value. This value must be greater than wParam. By default, the maximum value is 100. - /// - /// Returns a DWORD value that holds the previous 16-bit low limit in its LOWORD and the previous 16-bit high - /// limit in its HIWORD. If the previous ranges were 32-bit values, the return value consists of the LOWORD s of - /// both 32-bit limits. - /// + /// Parameters + /// wParam + /// Minimum range value. By default, the minimum value is zero. + /// lParam + /// Maximum range value. This value must be greater than wParam. By default, the maximum value is 100. + /// Returns + /// + /// Returns a DWORD value that holds the previous 16-bit low limit in its LOWORD and the previous 16-bit high limit + /// in its HIWORD. If the previous ranges were 32-bit values, the return value consists of the LOWORD s of both + /// 32-bit limits. + /// /// To retrieve the entire high and low 32-bit values, use the PBM_GETRANGE message. + // https://docs.microsoft.com/en-us/windows/win32/controls/pbm-setrange32 PBM_SETRANGE32 = WindowMessage.WM_USER + 6, // lParam = high, wParam = low /// Retrieves information about the current high and low limits of a given progress bar control. - /// + /// Parameters + /// wParam /// /// Flag value specifying which limit value is to be used as the message's return value. This parameter can be one of the /// following values: @@ -103,103 +132,147 @@ namespace Vanara.PInvoke /// Meaning /// /// - /// TRUE + /// TRUE /// Return the low limit. /// /// - /// FALSE + /// FALSE /// Return the high limit. /// /// - /// - /// + /// lParam + /// /// Pointer to a PBRANGE structure that is to be filled with the high and low limits of the progress bar control. If this /// parameter is set to NULL, the control will return only the limit specified by wParam. - /// - /// + /// + /// Returns + /// /// Returns an INT that represents the limit value specified by wParam. If lParam is not NULL, lParam must point to a /// PBRANGE structure that is to be filled with both limit values. - /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/pbm-getrange PBM_GETRANGE = WindowMessage.WM_USER + 7, // wParam = return (TRUE ? low : high). lParam = PPBRANGE or NULL /// Retrieves the current position of the progress bar. - /// Must be zero. - /// Must be zero. - /// Returns a UINT value that represents the current position of the progress bar. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns a UINT value that represents the current position of the progress bar. + // https://docs.microsoft.com/en-us/windows/win32/controls/pbm-getpos PBM_GETPOS = WindowMessage.WM_USER + 8, /// Sets the color of the progress indicator bar in the progress bar control. - /// Must be zero. - /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// /// The COLORREF value that specifies the new progress indicator bar color. Specifying the CLR_DEFAULT value causes the /// progress bar to use its default progress indicator bar color. - /// - /// + /// + /// Returns + /// /// Returns the previous progress indicator bar color, or CLR_DEFAULT if the progress indicator bar color is the default color. - /// + /// /// When visual styles are enabled, this message has no effect. + // https://docs.microsoft.com/en-us/windows/win32/controls/pbm-setbarcolor PBM_SETBARCOLOR = WindowMessage.WM_USER + 9, // lParam = bar color /// Sets the background color in the progress bar. - /// Must be zero. - /// - /// COLORREF value that specifies the new background color. Specify the CLR_DEFAULT value to cause the progress bar to - /// use its default background color. - /// - /// Returns the previous background color, or CLR_DEFAULT if the background color is the default color. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// + /// COLORREF value that specifies the new background color. Specify the CLR_DEFAULT value to cause the progress bar to use + /// its default background color. + /// + /// Returns + /// Returns the previous background color, or CLR_DEFAULT if the background color is the default color. /// When visual styles are enabled, this message has no effect. + // https://docs.microsoft.com/en-us/windows/win32/controls/pbm-setbkcolor PBM_SETBKCOLOR = CommonControlMessage.CCM_SETBKCOLOR, // lParam = bkColor /// Sets the progress bar to marquee mode. This causes the progress bar to move like a marquee. - /// Indicates whether to turn the marquee mode on or off. - /// + /// Parameters + /// wParam + /// Indicates whether to turn the marquee mode on or off. + /// lParam + /// /// Time, in milliseconds, between marquee animation updates. If this parameter is zero, the marquee animation is updated every /// 30 milliseconds. - /// - /// Always returns TRUE. + /// + /// Returns + /// Always returns TRUE. /// /// /// Use this message when you do not know the amount of progress toward completion but wish to indicate that progress is being made. /// /// Send the PBM_SETMARQUEE message to start or stop the animation. + /// + /// Note + /// You must set the control style to PBS_MARQUEE before attempting to start the animation. + /// + /// + /// Note + /// This message requires ComCtl32.dll version 6.00 or later. + /// /// + // https://docs.microsoft.com/en-us/windows/win32/controls/pbm-setmarquee PBM_SETMARQUEE = WindowMessage.WM_USER + 10, /// /// Retrieves the step increment from a progress bar. The step increment is the amount by which the progress bar increases its /// current position whenever it receives a PBM_STEPIT message. By default, the step increment is set to 10. /// - /// Must be zero. - /// Must be zero. - /// Returns the current step increment. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns the current step increment. + // https://docs.microsoft.com/en-us/windows/win32/controls/pbm-getstep PBM_GETSTEP = WindowMessage.WM_USER + 13, /// Gets the background color of the progress bar. - /// Must be zero. - /// Must be zero. - /// Returns the background color of the progress bar. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns the background color of the progress bar. /// - /// - /// This is the color set by the PBM_SETBKCOLOR message. The default value is CLR_DEFAULT, which is defined in commctrl.h. - /// + /// This is the color set by the PBM_SETBKCOLOR message. The default value is CLR_DEFAULT, which is defined in commctrl.h. /// This function only affects the classic mode, not any visual style. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/pbm-getbkcolor PBM_GETBKCOLOR = WindowMessage.WM_USER + 14, /// Gets the color of the progress bar. - /// Must be zero. - /// Must be zero. - /// Returns the color of the progress bar. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns the color of the progress bar. /// /// /// This is the color set by the PBM_SETBARCOLOR message. The default value is CLR_DEFAULT, which is defined in commctrl.h. /// /// This function only affects the classic mode, not any visual style. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/pbm-getbarcolor PBM_GETBARCOLOR = WindowMessage.WM_USER + 15, /// Sets the state of the progress bar. - /// + /// Parameters + /// wParam /// State of the progress bar that is being set. One of the following values. /// /// @@ -207,27 +280,32 @@ namespace Vanara.PInvoke /// Meaning /// /// - /// PBST_NORMAL + /// PBST_NORMAL /// In progress. /// /// - /// PBST_ERROR + /// PBST_ERROR /// Error. /// /// - /// PBST_PAUSED + /// PBST_PAUSED /// Paused. /// /// - /// - /// Must be zero. - /// Returns the previous state. + /// lParam + /// Must be zero. + /// Returns + /// Returns the previous state. + // https://docs.microsoft.com/en-us/windows/win32/controls/pbm-setstate PBM_SETSTATE = WindowMessage.WM_USER + 16, // wParam = PBST_[State] (NORMAL, ERROR, PAUSED) /// Gets the state of the progress bar. - /// Must be zero. - /// Must be zero. - /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns /// Returns the current state of the progress bar. One of the following values. /// /// @@ -235,24 +313,22 @@ namespace Vanara.PInvoke /// Description /// /// - /// PBST_NORMAL + /// PBST_NORMAL /// In progress. /// /// - /// PBST_ERROR + /// PBST_ERROR /// Error. /// /// - /// PBST_PAUSED + /// PBST_PAUSED /// Paused. /// /// - /// + // https://docs.microsoft.com/en-us/windows/win32/controls/pbm-getstate PBM_GETSTATE = WindowMessage.WM_USER + 17, } -#pragma warning restore CS1572 // XML comment has a param tag, but there is no parameter by that name - /// State of the progress bar used in PBM_SETSTATE and PBM_GETSTATE messages. [PInvokeData("Commctrl.h", MSDNShortId = "bb760850")] public enum ProgressState diff --git a/PInvoke/ComCtl32/CommCtrl.Tab.cs b/PInvoke/ComCtl32/CommCtrl.Tab.cs index de8c3857..d3a0dc55 100644 --- a/PInvoke/ComCtl32/CommCtrl.Tab.cs +++ b/PInvoke/ComCtl32/CommCtrl.Tab.cs @@ -80,8 +80,6 @@ namespace Vanara.PInvoke TCIS_ALL } -#pragma warning disable CS1572 // XML comment has a param tag, but there is no parameter by that name - /// Tab Control Messages // https://docs.microsoft.com/en-us/windows/win32/controls/bumper-tab-control-reference-messages [PInvokeData("Commctrl.h", MSDNShortId = "bb760813")] @@ -91,131 +89,195 @@ namespace Vanara.PInvoke /// Retrieves the image list associated with a tab control. You can send this message explicitly or by using the /// TabCtrl_GetImageList macro. /// - /// Must be zero. - /// Must be zero. - /// Returns the handle to the image list if successful, or NULL otherwise. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns the handle to the image list if successful, or NULL otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/tcm-getimagelist TCM_GETIMAGELIST = TCM_FIRST + 2, /// /// Assigns an image list to a tab control. You can send this message explicitly or by using the TabCtrl_SetImageList macro. /// - /// Must be zero. - /// Handle to the image list to assign to the tab control. - /// Returns the handle to the previous image list, or NULL if there is no previous image list. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Handle to the image list to assign to the tab control. + /// Returns + /// Returns the handle to the previous image list, or NULL if there is no previous image list. + // https://docs.microsoft.com/en-us/windows/win32/controls/tcm-setimagelist TCM_SETIMAGELIST = TCM_FIRST + 3, /// /// Retrieves the number of tabs in the tab control. You can send this message explicitly or by using the /// TabCtrl_GetItemCount macro. /// - /// Must be zero. - /// Must be zero. - /// Returns the number of items if successful, or zero otherwise. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns the number of items if successful, or zero otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/tcm-getitemcount TCM_GETITEMCOUNT = TCM_FIRST + 4, /// /// Retrieves information about a tab in a tab control. You can send this message explicitly or by using the /// TabCtrl_GetItem macro. /// - /// Index of the tab. - /// + /// Parameters + /// wParam + /// Index of the tab. + /// lParam + /// /// Pointer to a TCITEM structure that specifies the information to retrieve and receives information about the tab. When /// the message is sent, the mask member specifies which attributes to return. If the mask member specifies the /// TCIF_TEXT value, the pszText member must contain the address of the buffer that receives the item text, and the /// cchTextMax member must specify the size of the buffer. - /// - /// Returns TRUE if successful, or FALSE otherwise. + /// + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. /// /// If the TCIF_TEXT flag is set in the mask member of the TCITEM structure, the control may change the /// pszText member of the structure to point to the new text instead of filling the buffer with the requested text. The /// control may set the pszText member to NULL to indicate that no text is associated with the item. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tcm-getitem TCM_GETITEM = TCM_FIRST + 60, /// /// Sets some or all of a tab's attributes. You can send this message explicitly or by using the TabCtrl_SetItem macro. /// - /// Index of the item. - /// - /// Pointer to a TCITEM structure that contains the new item attributes. The mask member specifies which - /// attributes to set. If the mask member specifies the TCIF_TEXT value, the pszText member is the address of a + /// Parameters + /// wParam + /// Index of the item. + /// lParam + /// + /// Pointer to a TCITEM structure that contains the new item attributes. The mask member specifies which attributes + /// to set. If the mask member specifies the TCIF_TEXT value, the pszText member is the address of a /// null-terminated string and the cchTextMax member is ignored. - /// - /// Returns TRUE if successful, or FALSE otherwise. + /// + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/tcm-setitem TCM_SETITEM = TCM_FIRST + 61, /// /// Inserts a new tab in a tab control. You can send this message explicitly or by using the TabCtrl_InsertItem macro. /// - /// Index of the new tab. - /// + /// Parameters + /// wParam + /// Index of the new tab. + /// lParam + /// /// Pointer to a TCITEM structure that specifies the attributes of the tab. The dwState and dwStateMask /// members of this structure are ignored by this message. - /// - /// Returns the index of the new tab if successful, or -1 otherwise. + /// + /// Returns + /// Returns the index of the new tab if successful, or -1 otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/tcm-insertitem TCM_INSERTITEM = TCM_FIRST + 62, /// /// Removes an item from a tab control. You can send this message explicitly or by using the TabCtrl_DeleteItem macro. /// - /// Index of the item to delete. - /// Must be zero. - /// Returns TRUE if successful, or FALSE otherwise. + /// Parameters + /// wParam + /// Index of the item to delete. + /// lParam + /// Must be zero. + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/tcm-deleteitem TCM_DELETEITEM = TCM_FIRST + 8, /// /// Removes all items from a tab control. You can send this message explicitly or by using the TabCtrl_DeleteAllItems macro. /// - /// Must be zero. - /// Must be zero. - /// Returns TRUE if successful, or FALSE otherwise. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/tcm-deleteallitems TCM_DELETEALLITEMS = TCM_FIRST + 9, /// /// Retrieves the bounding rectangle for a tab in a tab control. You can send this message explicitly or by using the /// TabCtrl_GetItemRect macro. /// - /// Index of the tab. - /// Pointer to a RECT structure that receives the bounding rectangle of the tab, in viewport coordinates. - /// Returns TRUE if successful, or FALSE otherwise. + /// Parameters + /// wParam + /// Index of the tab. + /// lParam + /// Pointer to a RECT structure that receives the bounding rectangle of the tab, in viewport coordinates. + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/tcm-getitemrect TCM_GETITEMRECT = TCM_FIRST + 10, /// /// Determines the currently selected tab in a tab control. You can send this message explicitly or by using the /// TabCtrl_GetCurSel macro. /// - /// Must be zero. - /// Must be zero. - /// Returns the index of the selected tab if successful, or -1 if no tab is selected. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns the index of the selected tab if successful, or -1 if no tab is selected. + // https://docs.microsoft.com/en-us/windows/win32/controls/tcm-getcursel TCM_GETCURSEL = TCM_FIRST + 11, /// /// Selects a tab in a tab control. You can send this message explicitly or by using the TabCtrl_SetCurSel macro. /// - /// Index of the tab to select. - /// Must be zero. - /// Returns the index of the previously selected tab if successful, or -1 otherwise. + /// Parameters + /// wParam + /// Index of the tab to select. + /// lParam + /// Must be zero. + /// Returns + /// Returns the index of the previously selected tab if successful, or -1 otherwise. /// /// A tab control does not send a TCN_SELCHANGING or TCN_SELCHANGE notification code when a tab is selected using this message. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tcm-setcursel TCM_SETCURSEL = TCM_FIRST + 12, /// /// Determines which tab, if any, is at a specified screen position. You can send this message explicitly or by using the /// TabCtrl_HitTest macro. /// - /// Must be zero. - /// Pointer to a TCHITTESTINFO structure that specifies the screen position to test. - /// Returns the index of the tab, or -1 if no tab is at the specified position. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Pointer to a TCHITTESTINFO structure that specifies the screen position to test. + /// Returns + /// Returns the index of the tab, or -1 if no tab is at the specified position. + // https://docs.microsoft.com/en-us/windows/win32/controls/tcm-hittest TCM_HITTEST = TCM_FIRST + 13, /// - /// Sets the number of bytes per tab reserved for application-defined data in a tab control. You can send this message - /// explicitly or by using the TabCtrl_SetItemExtra macro. + /// Sets the number of bytes per tab reserved for application-defined data in a tab control. You can send this message explicitly + /// or by using the TabCtrl_SetItemExtra macro. /// - /// Number of extra bytes. - /// Must be zero. - /// Returns TRUE if successful, or FALSE otherwise. + /// Parameters + /// wParam + /// Number of extra bytes. + /// lParam + /// Must be zero. + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. /// /// /// By default, the number of extra bytes is four. An application that changes the number of extra bytes cannot use the @@ -224,117 +286,157 @@ namespace Vanara.PInvoke /// /// An application should only change the number of extra bytes when a tab control does not contain any tabs. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tcm-setitemextra TCM_SETITEMEXTRA = TCM_FIRST + 14, /// - /// Calculates a tab control's display area given a window rectangle, or calculates the window rectangle that would correspond - /// to a specified display area. You can send this message explicitly or by using the TabCtrl_AdjustRect macro. + /// Calculates a tab control's display area given a window rectangle, or calculates the window rectangle that would correspond to + /// a specified display area. You can send this message explicitly or by using the TabCtrl_AdjustRect macro. /// - /// + /// Parameters + /// wParam + /// /// Operation to perform. If this parameter is TRUE, lParam specifies a display rectangle and receives the corresponding /// window rectangle. If this parameter is FALSE, lParam specifies a window rectangle and receives the corresponding /// display area. - /// - /// - /// Pointer to a RECT structure that specifies the given rectangle and receives the calculated rectangle. - /// - /// No return value. + /// + /// lParam + /// Pointer to a RECT structure that specifies the given rectangle and receives the calculated rectangle. + /// Returns + /// No return value. /// /// This message applies only to tab controls that are at the top. It does not apply to tab controls that are on the sides or bottom. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tcm-adjustrect TCM_ADJUSTRECT = TCM_FIRST + 40, /// /// Sets the width and height of tabs in a fixed-width or owner-drawn tab control. You can send this message explicitly or by /// using the TabCtrl_SetItemSize macro. /// - /// Must be zero. - /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// /// The LOWORD is an INT value that specifies the new width, in pixels. The HIWORD is an INT value /// that specifies the new height, in pixels. - /// - /// - /// Returns the old width and height. The width is in the LOWORD of the return value, and the height is in the HIWORD. - /// + /// + /// Returns + /// Returns the old width and height. The width is in the LOWORD of the return value, and the height is in the HIWORD. /// /// If the width is set to a value less than the image width set by ImageList_Create, the width of the tab is set to the /// lowest value that is greater than the image width. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tcm-setitemsize TCM_SETITEMSIZE = TCM_FIRST + 41, /// /// Removes an image from a tab control's image list. You can send this message explicitly or by using the /// TabCtrl_RemoveImage macro. /// - /// Index of the image to remove. - /// Must be zero. - /// No return value. + /// Parameters + /// wParam + /// Index of the image to remove. + /// lParam + /// Must be zero. + /// Returns + /// No return value. /// /// The tab control updates each tab's image index, so each tab remains associated with the same image as before. If a tab is /// using the image being removed, the tab will be set to have no image. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tcm-removeimage TCM_REMOVEIMAGE = TCM_FIRST + 42, /// - /// Sets the amount of space (padding) around each tab's icon and label in a tab control. You can send this message explicitly - /// or by using the TabCtrl_SetPadding macro. + /// Sets the amount of space (padding) around each tab's icon and label in a tab control. You can send this message explicitly or + /// by using the TabCtrl_SetPadding macro. /// - /// + /// Parameters + /// lParam + /// /// The LOWORD is an INT value that specifies the amount of horizontal padding, in pixels. The HIWORD is an /// INT value that specifies the amount of vertical padding, in pixels. - /// - /// No return value. + /// + /// Returns + /// No return value. + // https://docs.microsoft.com/en-us/windows/win32/controls/tcm-setpadding TCM_SETPADDING = TCM_FIRST + 43, /// /// Retrieves the current number of rows of tabs in a tab control. You can send this message explicitly or by using the /// TabCtrl_GetRowCount macro. /// - /// Must be zero. - /// Must be zero. - /// Returns the number of rows of tabs. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns the number of rows of tabs. /// Only tab controls that have the TCS_MULTILINE style can have multiple rows of tabs. + // https://docs.microsoft.com/en-us/windows/win32/controls/tcm-getrowcount TCM_GETROWCOUNT = TCM_FIRST + 44, /// /// Retrieves the handle to the tooltip control associated with a tab control. You can send this message explicitly or by using /// the TabCtrl_GetToolTips macro. /// - /// Must be zero. - /// Must be zero. - /// Returns the handle to the tooltip control if successful, or NULL otherwise. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns the handle to the tooltip control if successful, or NULL otherwise. /// /// A tab control creates a tooltip control if it has the TCS_TOOLTIPS style. You can also assign a tooltip control to a /// tab control by using the TCM_SETTOOLTIPS message. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tcm-gettooltips TCM_GETTOOLTIPS = TCM_FIRST + 45, /// /// Assigns a tooltip control to a tab control. You can send this message explicitly or by using the TabCtrl_SetToolTips macro. /// - /// Handle to the tooltip control. - /// Must be zero. - /// No return value. + /// Parameters + /// wParam + /// Handle to the tooltip control. + /// lParam + /// Must be zero. + /// Returns + /// No return value. /// You can retrieve the tooltip control associated with a tab control by using the TCM_GETTOOLTIPS message. + // https://docs.microsoft.com/en-us/windows/win32/controls/tcm-settooltips TCM_SETTOOLTIPS = TCM_FIRST + 46, /// /// Returns the index of the item that has the focus in a tab control. You can send this message explicitly or by using the /// TabCtrl_GetCurFocus macro. /// - /// Must be zero. - /// Must be zero. - /// Returns the index of the tab item that has the focus. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns the index of the tab item that has the focus. /// The item that has the focus may be different than the selected item. + // https://docs.microsoft.com/en-us/windows/win32/controls/tcm-getcurfocus TCM_GETCURFOCUS = TCM_FIRST + 47, /// /// Sets the focus to a specified tab in a tab control. You can send this message explicitly or by using the /// TabCtrl_SetCurFocus macro. /// - /// Index of the tab that gets the focus. - /// Must be zero. - /// No return value. + /// Parameters + /// wParam + /// Index of the tab that gets the focus. + /// lParam + /// Must be zero. + /// Returns + /// No return value. /// /// /// If the tab control has the TCS_BUTTONS style (button mode), the tab with the focus may be different from the selected @@ -347,57 +449,74 @@ namespace Vanara.PInvoke /// case, the tab control sends the TCN_SELCHANGING and TCN_SELCHANGE notification codes to its parent window. /// /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tcm-setcurfocus TCM_SETCURFOCUS = TCM_FIRST + 48, /// /// Sets the minimum width of items in a tab control. You can send this message explicitly or by using the /// TabCtrl_SetMinTabWidth macro. /// - /// Must be zero. - /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// /// Minimum width to be set for a tab control item. If this parameter is set to -1, the control will use the default tab width. - /// - /// Returns an INT value that represents the previous minimum tab width. + /// + /// Returns + /// Returns an INT value that represents the previous minimum tab width. + // https://docs.microsoft.com/en-us/windows/win32/controls/tcm-setmintabwidth TCM_SETMINTABWIDTH = TCM_FIRST + 49, /// /// Resets items in a tab control, clearing any that were set to the TCIS_BUTTONPRESSED state. You can send this message /// explicitly or by using the TabCtrl_DeselectAll macro. /// - /// - /// Flag that specifies the scope of the item deselection. If this parameter is set to FALSE, all tab items will be - /// reset. If it is set to TRUE, then all tab items except for the one currently selected will be reset. - /// - /// Must be zero. - /// The return value for this message is not used. + /// Parameters + /// wParam + /// + /// Flag that specifies the scope of the item deselection. If this parameter is set to FALSE, all tab items will be reset. + /// If it is set to TRUE, then all tab items except for the one currently selected will be reset. + /// + /// lParam + /// Must be zero. + /// Returns + /// The return value for this message is not used. /// This message is only meaningful if the TCS_BUTTONS style flag has been set. + // https://docs.microsoft.com/en-us/windows/win32/controls/tcm-deselectall TCM_DESELECTALL = TCM_FIRST + 50, /// /// Sets the highlight state of a tab item. You can send this message explicitly or by using the TabCtrl_HighlightItem macro. /// - /// An INT value that specifies the zero-based index of a tab control item. - /// + /// Parameters + /// wParam + /// An INT value that specifies the zero-based index of a tab control item. + /// lParam + /// /// The LOWORD is a BOOL specifying the highlight state to be set. If this value is TRUE, the tab is /// highlighted; if FALSE, the tab is set to its default state. The HIWORD must be zero. - /// - /// Returns nonzero if successful, or zero otherwise. + /// + /// Returns + /// Returns nonzero if successful, or zero otherwise. /// In Comctl32.dll version 6.0, this message has no visible effect when a theme is active. + // https://docs.microsoft.com/en-us/windows/win32/controls/tcm-highlightitem TCM_HIGHLIGHTITEM = TCM_FIRST + 51, /// /// Sets the extended styles that the tab control will use. You can send this message explicitly or by using the /// TabCtrl_SetExtendedStyle macro. /// - /// + /// Parameters + /// wParam + /// /// A DWORD value that indicates which styles in lParam are to be affected. Only the extended styles in wParam will be - /// changed. All other styles will be maintained as they are. If this parameter is zero, then all of the styles in lParam will - /// be affected. - /// - /// - /// Value specifying the extended tab control styles. This value is a combination of tab control extended styles. - /// - /// Returns a DWORD value that contains the previous tab control extended styles. + /// changed. All other styles will be maintained as they are. If this parameter is zero, then all of the styles in lParam will be affected. + /// + /// lParam + /// Value specifying the extended tab control styles. This value is a combination of tab control extended styles. + /// Returns + /// Returns a DWORD value that contains the previous tab control extended styles. /// /// /// The wParam parameter allows you to modify one or more extended styles without having to retrieve the existing styles first. @@ -406,18 +525,24 @@ namespace Vanara.PInvoke /// /// For backward compatibility reasons, the TabCtrl_SetExtendedStyle macro has not been updated to use dwExMask. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tcm-setextendedstyle TCM_SETEXTENDEDSTYLE = TCM_FIRST + 52, // optional wParam == mask /// - /// Retrieves the extended styles that are currently in use for the tab control. You can send this message explicitly or by - /// using the TabCtrl_GetExtendedStyle macro. + /// Retrieves the extended styles that are currently in use for the tab control. You can send this message explicitly or by using + /// the TabCtrl_GetExtendedStyle macro. /// - /// Must be zero. - /// Must be zero. - /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// /// Returns a DWORD value that represents the extended styles currently in use for the tab control. This value is a /// combination of tab control extended styles. - /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tcm-getextendedstyle TCM_GETEXTENDEDSTYLE = TCM_FIRST + 53, /// @@ -425,26 +550,36 @@ namespace Vanara.PInvoke /// control at run time rather than having to re-create the control. You can send this message explicitly or use the /// TabCtrl_SetUnicodeFormat macro. /// - /// + /// Parameters + /// wParam + /// /// Determines the character set that is used by the control. If this value is nonzero, the control will use Unicode characters. /// If this value is zero, the control will use ANSI characters. - /// - /// Must be zero. - /// Returns the previous Unicode format flag for the control. + /// + /// lParam + /// Must be zero. + /// Returns + /// Returns the previous Unicode format flag for the control. /// See the remarks for CCM_SETUNICODEFORMAT for a discussion of this message. + // https://docs.microsoft.com/en-us/windows/win32/controls/tcm-setunicodeformat TCM_SETUNICODEFORMAT = CommonControlMessage.CCM_SETUNICODEFORMAT, /// /// Retrieves the Unicode character format flag for the control. You can send this message explicitly or use the /// TabCtrl_GetUnicodeFormat macro. /// - /// Must be zero. - /// Must be zero. - /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// /// Returns the Unicode format flag for the control. If this value is nonzero, the control is using Unicode characters. If this /// value is zero, the control is using ANSI characters. - /// + /// /// See the remarks for CCM_GETUNICODEFORMAT for a discussion of this message. + // https://docs.microsoft.com/en-us/windows/win32/controls/tcm-getunicodeformat TCM_GETUNICODEFORMAT = CommonControlMessage.CCM_GETUNICODEFORMAT } @@ -461,8 +596,12 @@ namespace Vanara.PInvoke /// TCN_KEYDOWN pnm = (NMTCKEYDOWN*) lParam; /// /// - /// Pointer to an NMTCKEYDOWN structure. - /// No return value. + /// Parameters + /// lParam + /// Pointer to an NMTCKEYDOWN structure. + /// Returns + /// No return value. + // https://docs.microsoft.com/en-us/windows/win32/controls/tcn-keydown TCN_KEYDOWN = TCN_FIRST - 0, /// @@ -474,9 +613,13 @@ namespace Vanara.PInvoke /// TCN_SELCHANGE lpnmhdr = (LPNMHDR) lParam; /// /// - /// Pointer to an NMHDR structure that contains additional information about this notification. - /// No return value. + /// Parameters + /// lParam + /// Pointer to an NMHDR structure that contains additional information about this notification. + /// Returns + /// No return value. /// To determine the currently selected tab, use the TabCtrl_GetCurSel macro. + // https://docs.microsoft.com/en-us/windows/win32/controls/tcn-selchange TCN_SELCHANGE = TCN_FIRST - 1, /// @@ -488,9 +631,13 @@ namespace Vanara.PInvoke /// TCN_SELCHANGING lpnmhdr = (LPNMHDR) lParam; /// /// - /// Pointer to an NMHDR structure that contains additional information about this notification. - /// Returns TRUE to prevent the selection from changing, or FALSE to allow the selection to change. + /// Parameters + /// lParam + /// Pointer to an NMHDR structure that contains additional information about this notification. + /// Returns + /// Returns TRUE to prevent the selection from changing, or FALSE to allow the selection to change. /// To determine the currently selected tab, use the TabCtrl_GetCurSel macro. + // https://docs.microsoft.com/en-us/windows/win32/controls/tcn-selchanging TCN_SELCHANGING = TCN_FIRST - 2, /// @@ -502,11 +649,15 @@ namespace Vanara.PInvoke /// TCN_GETOBJECT lpnmon = (LPNMOBJECTNOTIFY) lParam; /// /// - /// + /// Parameters + /// lParam + /// /// Pointer to an NMOBJECTNOTIFY structure that contains information about the tab item the object is dragged over and /// receives data the application returns in response to this message. - /// - /// The application processing this notification code must return zero. + /// + /// Returns + /// The application processing this notification code must return zero. + // https://docs.microsoft.com/en-us/windows/win32/controls/tcn-getobject TCN_GETOBJECT = TCN_FIRST - 3, /// @@ -518,13 +669,15 @@ namespace Vanara.PInvoke /// TCN_FOCUSCHANGE lpnmh = (LPNMHDR) lParam; /// /// - /// Pointer to an NMHDR structure that contains additional information about this notification. - /// No return value. + /// Parameters + /// lParam + /// Pointer to an NMHDR structure that contains additional information about this notification. + /// Returns + /// No return value. + // https://docs.microsoft.com/en-us/windows/win32/controls/tcn-focuschange TCN_FOCUSCHANGE = TCN_FIRST - 4, } -#pragma warning restore CS1572 // XML comment has a param tag, but there is no parameter by that name - /// This section lists supported tab control styles. [PInvokeData("Commctrl.h", MSDNShortId = "bb760549")] [Flags] @@ -701,7 +854,10 @@ namespace Vanara.PInvoke /// Initializes a new instance of the class. public TCITEM(TabControlItemMask itemsToGet = TabControlItemMask.TCIF_ALL, TabControlItemStates statesToGet = TabControlItemStates.TCIS_ALL) { - if ((itemsToGet & TabControlItemMask.TCIF_TEXT) != 0) pszText = new StrPtrAuto(cchTextMax = 1024); + if ((itemsToGet & TabControlItemMask.TCIF_TEXT) != 0) + { + pszText = new StrPtrAuto(cchTextMax = 1024); + } } /// Initializes a new instance of the class. @@ -770,7 +926,10 @@ namespace Vanara.PInvoke /// Initializes a new instance of the class. public TCITEMHEADER(TabControlItemMask itemsToGet = TabControlItemMask.TCIF_ALL, TabControlItemStates statesToGet = TabControlItemStates.TCIS_ALL) { - if ((itemsToGet & TabControlItemMask.TCIF_TEXT) != 0) pszText = new StrPtrAuto(cchTextMax = 1024); + if ((itemsToGet & TabControlItemMask.TCIF_TEXT) != 0) + { + pszText = new StrPtrAuto(cchTextMax = 1024); + } } /// Initializes a new instance of the class. @@ -781,7 +940,7 @@ namespace Vanara.PInvoke /// The text. public string Text { - get =>pszText.ToString(); + get => pszText.ToString(); set { pszText.Assign(value, out cchTextMax); diff --git a/PInvoke/ComCtl32/CommCtrl.TaskDialog.cs b/PInvoke/ComCtl32/CommCtrl.TaskDialog.cs index 9f06c128..9aca3ea7 100644 --- a/PInvoke/ComCtl32/CommCtrl.TaskDialog.cs +++ b/PInvoke/ComCtl32/CommCtrl.TaskDialog.cs @@ -218,51 +218,369 @@ namespace Vanara.PInvoke [PInvokeData("Commctrl.h", MSDNShortId = "bb787473")] public enum TaskDialogMessage : uint { - /// Navigate page. + /// Recreates a task dialog with new contents, simulating the functionality of a multi-page wizard. + /// Parameters + /// wParam + /// Not used. Must be zero. + /// lParam + /// + /// A pointer to a TASKDIALOGCONFIG structure that describes the task dialog to create. The calling application must + /// allocate this structure and set its members. The values of the members vary depending on the kind of page the user navigates to. + /// + /// Returns + /// The return value is ignored. + /// + /// + /// To launch a wizard task dialog, use the TaskDialogIndirect function. As the user navigates using the wizard, send this + /// message to the task dialog to display the next page. A new task dialog (looks like a new page) is created with the elements + /// specified in the structure pointed to by lParam. At creation, the entire contents of the dialog frame are destroyed and + /// reconstructed. As a result, any state information held by controls (for example, a progress bar, expando button, or + /// verification checkbox) in the dialog is lost. + /// + /// + /// The layout of the task dialog may fail and this may not be reflected in the return value. A return value of S_OK reflects + /// only that the task dialog received the message and attempted to process it. If the layout of the task dialog fails (the task + /// dialog cannot be displayed), the dialog will close and an HRESULT code is returned at the registered callback + /// function. For more information on the callback function syntax, see TaskDialogCallbackProc. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tdm-navigate-page TDM_NAVIGATE_PAGE = WindowMessage.WM_USER + 101, - /// Click button. + /// Simulates the action of a button click in a task dialog. + /// Parameters + /// wParam + /// An int that specifies the ID of the button to be clicked. + /// lParam + /// Must be zero. + /// Returns + /// The return value is ignored. + /// + /// The button ID specified by wParam is sent to the TaskDialogCallbackProc callback function as part of a + /// TDN_BUTTON_CLICKED notification code. After the callback function returns, the task dialog is closed if S_OK was returned + /// from the callback function. If S_FALSE was returned from the callback function, the task dialog remains active. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tdm-click-button TDM_CLICK_BUTTON = WindowMessage.WM_USER + 102, // wParam = Button ID - /// Set Progress bar to be marquee mode. + /// Indicates whether the hosted progress bar of a task dialog should be displayed in marquee mode. + /// Parameters + /// wParam + /// + /// A BOOL that indicates whether the progress bar should be shown in marquee mode. A value of TRUE turns on + /// marquee mode, and a value of FALSE turns off marquee mode. + /// + /// lParam + /// Must be zero. + /// Returns + /// The return value is ignored. + /// For information on marquee mode, see Progress Bar Control. + // https://docs.microsoft.com/en-us/windows/win32/controls/tdm-set-marquee-progress-bar TDM_SET_MARQUEE_PROGRESS_BAR = WindowMessage.WM_USER + 103, // wParam = 0 (nonMarque) wParam != 0 (Marquee) - /// Set Progress bar state. + /// Sets the state of the progress bar in a task dialog. + /// Parameters + /// wParam + /// An int that specifies the state of the progress bar. This parameter can be one of the following values. + /// + /// + /// Value + /// Meaning + /// + /// + /// PBST_NORMAL + /// Sets the progress bar to the normal state. + /// + /// + /// PBST_PAUSED + /// Sets the progress bar to the paused state. + /// + /// + /// PBST_ERROR + /// Set the progress bar to the error state. + /// + /// + /// lParam + /// Must be zero. + /// Returns + /// If the function succeeds, the return value is non zero. + /// If the function fails, the return value is zero. To get extended error information call GetLastError. + // https://docs.microsoft.com/en-us/windows/win32/controls/tdm-set-progress-bar-state TDM_SET_PROGRESS_BAR_STATE = WindowMessage.WM_USER + 104, // wParam = new progress state - /// Set progress bar range. + /// Sets the minimum and maximum values for the progress bar in a task dialog. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// + /// The LOWORD specifies the minimum value. By default, the minimum value is zero. The HIWORD specifies the maximum + /// value. By default, the maximum value is 100. + /// + /// Returns + /// + /// Returns the previous minimum and maximum values, if successful, or zero otherwise. The LOWORD contains the minimum + /// value, and the HIWORD contains the maximum value. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tdm-set-progress-bar-range TDM_SET_PROGRESS_BAR_RANGE = WindowMessage.WM_USER + 105, // lParam = MAKELPARAM(nMinRange, nMaxRange) - /// Set progress bar position. + /// Sets the position of the progress bar in a task dialog. + /// Parameters + /// wParam + /// An int that specifies the new position. + /// lParam + /// Must be zero. + /// Returns + /// Returns the previous position. + // https://docs.microsoft.com/en-us/windows/win32/controls/tdm-set-progress-bar-pos TDM_SET_PROGRESS_BAR_POS = WindowMessage.WM_USER + 106, // wParam = new position - /// Set progress bar marquee (animation). + /// Starts and stops the marquee display of the progress bar in a task dialog, and sets the speed of the marquee. + /// Parameters + /// wParam + /// + /// A BOOL that indicates whether to turn the marquee display on or off. Use TRUE to turn on the marquee display, + /// or FALSE to turn it off. + /// + /// lParam + /// + /// A UINT that specifies the time, in milliseconds, between marquee animation updates. If this parameter is zero, the + /// marquee animation is updated every 30 milliseconds. + /// + /// Returns + /// The return value is ignored. + /// For information on marquee mode, see Progress Bar Control. + // https://docs.microsoft.com/en-us/windows/win32/controls/tdm-set-progress-bar-marquee TDM_SET_PROGRESS_BAR_MARQUEE = WindowMessage.WM_USER + 107, // wParam = 0 (stop marquee), wParam != 0 (start marquee), lparam = speed (milliseconds between repaints) - /// Set a text element of the Task Dialog. + /// Updates a text element in a task dialog. + /// Parameters + /// wParam + /// + /// Indicates the element to update. (For an illustration, see About Task Dialogs.) This parameter must be one of the following values. + /// + /// + /// + /// Value + /// Meaning + /// + /// + /// TDE_CONTENT + /// Content. + /// + /// + /// TDE_EXPANDED_INFORMATION + /// Expanded information. + /// + /// + /// TDE_FOOTER + /// Footer text. + /// + /// + /// TDE_MAIN_INSTRUCTION + /// Main instruction. + /// + /// + /// lParam + /// The new text to use. + /// Returns + /// The return value is ignored. + /// The size or layout of the task dialog may change to accommodate the new text. + // https://docs.microsoft.com/en-us/windows/win32/controls/tdm-set-element-text TDM_SET_ELEMENT_TEXT = WindowMessage.WM_USER + 108, // wParam = element (TASKDIALOG_ELEMENTS), lParam = new element text (LPCWSTR) - /// Click a radio button. + /// Simulates the action of a radio button click in a task dialog. + /// Parameters + /// wParam + /// An int value that specifies the ID of the radio button to be clicked. + /// lParam + /// Must be zero. + /// Returns + /// The return value is ignored. + /// + /// The specified radio button ID is sent to the TaskDialogCallbackProc callback function as part of a + /// TDN_RADIO_BUTTON_CLICKED notification code. After the callback function returns, the radio button will be selected. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tdm-click-radio-button TDM_CLICK_RADIO_BUTTON = WindowMessage.WM_USER + 110, // wParam = Radio Button ID - /// Enable or disable a button. + /// Enables or disables a push button in a task dialog. + /// Parameters + /// wParam + /// An int value that specifies the ID of the push button to be enabled or disabled. + /// lParam + /// Specifies button state. Set to 0 to disable the button; set to nonzero to enable the button. + /// Returns + /// The return value is ignored. + // https://docs.microsoft.com/en-us/windows/win32/controls/tdm-enable-button TDM_ENABLE_BUTTON = WindowMessage.WM_USER + 111, // lParam = 0 (disable), lParam != 0 (enable), wParam = Button ID - /// Enable or disable a radio button. + /// Enables or disables a radio button in a task dialog. + /// Parameters + /// wParam + /// An int value that specifies the ID of the radio button to be enabled or disabled. + /// lParam + /// Specifies button state. Set to 0 to disable the button; set to nonzero to enable the button. + /// Returns + /// The return value is ignored. + // https://docs.microsoft.com/en-us/windows/win32/controls/tdm-enable-radio-button TDM_ENABLE_RADIO_BUTTON = WindowMessage.WM_USER + 112, // lParam = 0 (disable), lParam != 0 (enable), wParam = Radio Button ID - /// Check or uncheck the verification checkbox. + /// Simulates a click of the verification checkbox of a task dialog, if it exists. + /// Parameters + /// wParam + /// TRUE to set the state of the checkbox to be checked; FALSE to set it to be unchecked. + /// lParam + /// TRUE to set the keyboard focus to the checkbox; FALSE otherwise. + /// Returns + /// The return value is ignored. + // https://docs.microsoft.com/en-us/windows/win32/controls/tdm-click-verification TDM_CLICK_VERIFICATION = WindowMessage.WM_USER + 113, // wParam = 0 (unchecked), 1 (checked), lParam = 1 (set key focus) - /// Update the text of an element (no effect if originally set as null). + /// Updates a text element in a task dialog. + /// Parameters + /// wParam + /// + /// Indicates the element to update. (For an illustration of the elements, see About Task Dialogs.) This parameter must be one of + /// the following values: + /// + /// + /// + /// Value + /// Meaning + /// + /// + /// TDE_CONTENT + /// Content. + /// + /// + /// TDE_EXPANDED_INFORMATION + /// Expanded information. + /// + /// + /// TDE_FOOTER + /// Footer text. + /// + /// + /// TDE_MAIN_INSTRUCTION + /// Main instruction. + /// + /// + /// lParam + /// Pointer to a Unicode string that contains the new text. + /// Returns + /// The return value is ignored. + /// + /// + /// To avoid clipping, the new text must be no longer than the existing text. Setting the text to a shorter string does not cause + /// the dialog box to resize. + /// + /// + /// If the pszExpandedInformation member of the TASKDIALOGCONFIG structure used to create the task dialog was + /// NULL, and you send a TDM_UPDATE_ELEMENT_TEXT message with TDE_EXPANDED_INFORMATION, nothing will happen. + /// + /// The above also applies to the footer and TDE_FOOTER. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tdm-update-element-text TDM_UPDATE_ELEMENT_TEXT = WindowMessage.WM_USER + 114, // wParam = element (TASKDIALOG_ELEMENTS), lParam = new element text (LPCWSTR) /// - /// Designate whether a given Task Dialog button or command link should have a User Account Control (UAC) shield icon. + /// Specifies whether a given task dialog button or command link should have a User Account Control (UAC) shield icon; that is, + /// whether the action invoked by the button requires elevation. /// + /// Parameters + /// wParam + /// The ID of the push button or command link to be updated. + /// lParam + /// + /// Set to 0 to designate that the action invoked by the button does not require elevation. Set to nonzero to designate that the + /// action requires elevation. + /// + /// Returns + /// The return value is ignored. + // https://docs.microsoft.com/en-us/windows/win32/controls/tdm-set-button-elevation-required-state TDM_SET_BUTTON_ELEVATION_REQUIRED_STATE = WindowMessage.WM_USER + 115, // wParam = Button ID, lParam = 0 (elevation not required), lParam != 0 (elevation required) - /// Refreshes the icon of the task dialog. + /// Refreshes the icon of a task dialog. + /// Parameters + /// wParam + /// Indicates which icon element to update. This parameter must be one of the following values: + /// + /// + /// Value + /// Meaning + /// + /// + /// TDIE_ICON_MAIN + /// Main icon. + /// + /// + /// TDIE_ICON_FOOTER + /// Footer icon. + /// + /// + /// lParam + /// + /// A pointer to a string (PCWSTR) or handle to an icon (HICON) to display. If lParam is NULL, no icon is displayed, + /// regardless of the value of wParam. + /// + /// + /// If the value of wParam is TDIE_ICON_MAIN and the TDF_USE_HICON_MAIN flag is set on the dwFlags member of the + /// TASKDIALOGCONFIG structure used to create the task dialog, lParam must contain a handle to an icon (HICON) to display. + /// + /// + /// If the value of wParam is TDIE_ICON_FOOTER and the TDF_USE_HICON_FOOTER flag is set on the dwFlags member of the + /// TASKDIALOGCONFIG structure used to create the task dialog, lParam must contain a handle to an icon (HICON) to display. + /// + /// + /// If the TDF_USE_HICON_MAIN or TDF_USE_HICON_FOOTER flags are not set on the dwFlags member, lParam must point to + /// a null-terminated, Unicode string (PCWSTR) that contains a valid resource identifier passed through the + /// MAKEINTRESOURCE macro. The icon is displayed based on the value of wParam: if the value is TDIE_ICON_MAIN, the icon is + /// displayed in the header; if the value is TDIE_ICON_FOOTER, the icon is displayed in the footer. The resource must be either + /// from the application's resource module (specified in the hInstance member of the TASKDIALOGCONFIG structure), + /// or if hInstance is NULL, from the system's resource module (imageres.dll). To identify a system resource, use a + /// valid system identifier passed through the MAKEINTRESOURCE macro or one of the following predefined values from commctrl.h: + /// + /// + /// + /// Value + /// Meaning + /// + /// + /// TD_ERROR_ICON + /// A stop sign icon. + /// + /// + /// TD_WARNING_ICON + /// An exclamation point icon. + /// + /// + /// TD_INFORMATION_ICON + /// A lowercase letter "i" in a circle icon. + /// + /// + /// TD_SHIELD_ICON + /// A security shield icon. + /// + /// + /// Returns + /// The return value is ignored. + /// + /// + /// The layout of the task dialog with the icon may fail and this may not be reflected in the return value. A return value of + /// S_OK reflects only that the task dialog received the message and attempted to process it. If the layout of the task dialog + /// fails, the dialog will close and an HRESULT code is returned at the registered callback function. For more information + /// on the callback function syntax, see TaskDialogCallbackProc. + /// + /// + /// If the task dialog is created without a footer (that is, the appropriate footer members of the TASKDIALOGCONFIG + /// structure used to create the task dialog are NULL) and this message is sent, a footer is not dynamically added to the + /// task dialog. The same is true for sending this message to update a header icon when a task dialog is created without a + /// header. To add a header or footer at run time, use the TDM_NAVIGATE_PAGE functionality. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tdm-update-icon TDM_UPDATE_ICON = WindowMessage.WM_USER + 116 // wParam = icon element (TASKDIALOG_ICON_ELEMENTS), lParam = new icon (hIcon if TDF_USE_HICON_* was set, PCWSTR otherwise) } @@ -271,73 +589,226 @@ namespace Vanara.PInvoke public enum TaskDialogNotification : uint { /// + /// /// Sent by the task dialog after the dialog has been created and before it is displayed. This notification code is received only - /// through the task dialog callback function, which can be registered using the TaskDialogIndirect method. + /// through the task dialog callback function, which can be registered using the TaskDialogIndirect method. + /// + /// + /// TDN_CREATED WPARAM wParam; LPARAM lParam; + /// /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// The return value is ignored. + // https://docs.microsoft.com/en-us/windows/win32/controls/tdn-created TDN_CREATED = 0, /// + /// /// Sent by a task dialog when navigation has occurred. This notification code is received only through the task dialog callback - /// function, which can be registered using the TaskDialogIndirect method. + /// function, which can be registered using the TaskDialogIndirect method. + /// + /// + /// TDN_NAVIGATED WPARAM wParam; LPARAM lParam; + /// /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// The return value is ignored. + // https://docs.microsoft.com/en-us/windows/win32/controls/tdn-navigated TDN_NAVIGATED = 1, /// + /// /// Sent by a task dialog when the user selects a button or command link in the task dialog. This notification code is received - /// only through the task dialog callback function, which can be registered using the TaskDialogIndirect method. To prevent the - /// task dialog from closing, the application must return S_FALSE, otherwise the task dialog is closed and the button ID is - /// returned via the original application call. + /// only through the task dialog callback function, which can be registered using the TaskDialogIndirect method. + /// + /// + /// TDN_BUTTON_CLICKED WPARAM wParam; LPARAM lParam; + /// /// + /// Parameters + /// wParam + /// An int that specifies the ID of the button or comand link that was selected. + /// lParam + /// Must be zero. + /// Returns + /// + /// To prevent the task dialog from closing, the application must return S_FALSE, otherwise the task dialog is closed and + /// the button ID is returned via the original application call. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tdn-button-clicked TDN_BUTTON_CLICKED = 2, /// + /// /// Sent by a task dialog when the user clicks a hyperlink in the task dialog content. This notification code is received only - /// through the task dialog callback function, which can be registered using the TaskDialogIndirect method. + /// through the task dialog callback function, which can be registered using the TaskDialogIndirect method. + /// + /// + /// TDN_HYPERLINK_CLICKED WPARAM wParam; LPARAM lParam; + /// /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Pointer to a wide-character string containing the URL of the hyperlink. + /// Returns + /// The return value is ignored. + // https://docs.microsoft.com/en-us/windows/win32/controls/tdn-hyperlink-clicked TDN_HYPERLINK_CLICKED = 3, /// + /// /// Sent by a task dialog approximately every 200 milliseconds. This notification code is sent when the TDF_CALLBACK_TIMER flag - /// has been set in the dwFlags member of the TASKDIALOGCONFIG structure that was passed to the TaskDialogIndirect function. This - /// notification code is received only through the task dialog callback function, which can be registered using the - /// TaskDialogIndirect method. + /// has been set in the dwFlags member of the TASKDIALOGCONFIG structure that was passed to the + /// TaskDialogIndirect function. This notification code is received only through the task dialog callback function, which + /// can be registered using the TaskDialogIndirect method. + /// + /// + /// TDN_TIMER WPARAM wParam; LPARAM lParam; + /// /// + /// Parameters + /// wParam + /// + /// A DWORD that specifies the number of milliseconds since the dialog was created or this notification code returned S_FALSE. + /// + /// lParam + /// Must be zero. + /// Returns + /// To reset the tickcount, the application must return S_FALSE, otherwise the tickcount will continue to increment. + // https://docs.microsoft.com/en-us/windows/win32/controls/tdn-timer TDN_TIMER = 4, /// + /// /// Sent by a task dialog when it is destroyed and its window handle is no longer valid. This notification code is received only - /// through the task dialog callback function, which can be registered using the TaskDialogIndirect method. + /// through the task dialog callback function, which can be registered using the TaskDialogIndirect method. + /// + /// + /// TDN_DESTROYED WPARAM wParam; LPARAM lParam; + /// /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// The return value is ignored. + // https://docs.microsoft.com/en-us/windows/win32/controls/tdn-destroyed TDN_DESTROYED = 5, /// + /// /// Sent by a task dialog when the user selects a radio button or command link in the task dialog. This notification code is - /// received only through the task dialog callback function, which can be registered using the TaskDialogIndirect method. + /// received only through the task dialog callback function, which can be registered using the TaskDialogIndirect method. + /// + /// + /// TDN_RADIO_BUTTON_CLICKED WPARAM wParam; LPARAM lParam; + /// /// + /// Parameters + /// wParam + /// An int that specifies the ID corresponding to the radio button that was clicked. + /// lParam + /// Must be zero. + /// Returns + /// The return value is ignored. + // https://docs.microsoft.com/en-us/windows/win32/controls/tdn-radio-button-clicked TDN_RADIO_BUTTON_CLICKED = 6, /// + /// /// Sent by a task dialog after the dialog has been created and before it is displayed. This notification code is received only - /// through the task dialog callback function, which can be registered using the TaskDialogIndirect method. + /// through the task dialog callback function, which can be registered using the TaskDialogIndirect method. + /// + /// + /// TDN_DIALOG_CONSTRUCTED WPARAM wParam; LPARAM lParam; + /// /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// The return value is ignored. + // https://docs.microsoft.com/en-us/windows/win32/controls/tdn-dialog-constructed TDN_DIALOG_CONSTRUCTED = 7, /// + /// /// Sent by a task dialog when the user clicks the task dialog verification check box. This notification code is received only - /// through the task dialog callback function, which can be registered using the TaskDialogIndirect method. + /// through the task dialog callback function, which can be registered using the TaskDialogIndirect method. + /// + /// + /// TDN_VERIFICATION_CLICKED WPARAM wParam; LPARAM lParam; + /// /// + /// Parameters + /// wParam + /// + /// A BOOL that specifies the status of the verification checkbox. It is TRUE if the verification checkbox is + /// checked, or FALSE if it is unchecked. + /// + /// lParam + /// Must be zero. + /// Returns + /// The return value is ignored. + // https://docs.microsoft.com/en-us/windows/win32/controls/tdn-verification-clicked TDN_VERIFICATION_CLICKED = 8, /// + /// /// Sent by a task dialog when the user presses F1 on the keyboard while the dialog has focus. This notification code is received - /// only through the task dialog callback function, which can be registered using the TaskDialogIndirect method. + /// only through the task dialog callback function, which can be registered using the TaskDialogIndirect method. + /// + /// + /// TDN_HELP WPARAM wParam; LPARAM lParam; + /// /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// The return value is ignored. + // https://docs.microsoft.com/en-us/windows/win32/controls/tdn-help TDN_HELP = 9, /// + /// /// Sent by the task dialog when the user clicks on the dialog's expando button. This notification is received only through the - /// task dialog callback function, which can be registered using the TaskDialogIndirect method. + /// task dialog callback function, which can be registered using the TaskDialogIndirect method. + /// + /// + /// TDN_EXPANDO_BUTTON_CLICKED WPARAM wParam; LPARAM lParam; + /// /// + /// Parameters + /// wParam + /// A BOOL that is TRUE if the dialog is expanded, or FALSE if not. + /// lParam + /// Must be zero. + /// Returns + /// The return value is ignored. + /// + /// The example in the Syntax section shows the cast to wParam before sending the notification. LPARAM is not used and + /// must be zero. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tdn-expando-button-clicked TDN_EXPANDO_BUTTON_CLICKED = 10 } diff --git a/PInvoke/ComCtl32/CommCtrl.ToolTip.cs b/PInvoke/ComCtl32/CommCtrl.ToolTip.cs index 23fb96b3..b3c4d06f 100644 --- a/PInvoke/ComCtl32/CommCtrl.ToolTip.cs +++ b/PInvoke/ComCtl32/CommCtrl.ToolTip.cs @@ -87,23 +87,27 @@ namespace Vanara.PInvoke TTF_DI_SETITEM = 0x8000, // valid only on the TTN_NEEDTEXT callback } -#pragma warning disable CS1572 // XML comment has a param tag, but there is no parameter by that name - /// Tooltip Control Messages [PInvokeData("Commctrl.h", MSDNShortId = "bb760542")] public enum ToolTipMessage { /// Activates or deactivates a tooltip control. - /// + /// Parameters + /// wParam + /// /// Activation flag. If this parameter is TRUE, the tooltip control is activated. If it is FALSE, the tooltip /// control is deactivated. - /// - /// Must be zero. - /// No return value. + /// + /// lParam + /// Must be zero. + /// Returns + /// No return value. + // https://docs.microsoft.com/en-us/windows/win32/controls/ttm-activate TTM_ACTIVATE = WindowMessage.WM_USER + 1, /// Sets the initial, pop-up, and reshow durations for a tooltip control. - /// + /// Parameters + /// wParam /// Flag that specifies which time value to set. This parameter can be one of the following values /// /// @@ -111,38 +115,39 @@ namespace Vanara.PInvoke /// Meaning /// /// - /// TTDT_AUTOPOP + /// TTDT_AUTOPOP /// /// Set the amount of time a tooltip window remains visible if the pointer is stationary within a tool's bounding rectangle. To - /// return the autopop delay time to its default value, set lParam to -1. + /// return the autopop delay time to its default value, set lParam to -1. /// /// /// - /// TTDT_INITIAL + /// TTDT_INITIAL /// - /// Set the amount of time a pointer must remain stationary within a tool's bounding rectangle before the tooltip window - /// appears. To return the initial delay time to its default value, set lParam to -1. + /// Set the amount of time a pointer must remain stationary within a tool's bounding rectangle before the tooltip window appears. + /// To return the initial delay time to its default value, set lParam to -1. /// /// /// - /// TTDT_RESHOW + /// TTDT_RESHOW /// /// Set the amount of time it takes for subsequent tooltip windows to appear as the pointer moves from one tool to another. To - /// return the reshow delay time to its default value, set lParam to -1. + /// return the reshow delay time to its default value, set lParam to -1. /// /// /// - /// TTDT_AUTOMATIC + /// TTDT_AUTOMATIC /// /// Set all three delay times to default proportions. The autopop time will be ten times the initial time and the reshow time - /// will be one fifth the initial time. If this flag is set, use a positive value of lParam to specify the initial time, in - /// milliseconds. Set lParam to a negative value to return all three delay times to their default values. + /// will be one fifth the initial time. If this flag is set, use a positive value of lParam to specify the initial time, + /// in milliseconds. Set lParam to a negative value to return all three delay times to their default values. /// /// /// - /// - /// The LOWORD specifies the delay time, in milliseconds. The HIWORD must be zero. - /// The return value for this message is not used. + /// lParam + /// The LOWORD specifies the delay time, in milliseconds. The HIWORD must be zero. + /// Returns + /// The return value for this message is not used. /// /// /// The default delay times are based on the double-click time. For the default double-click time of 500 ms, the initial, @@ -153,43 +158,63 @@ namespace Vanara.PInvoke /// initial = GetDoubleClickTime(); autopop = GetDoubleClickTime() * 10; reshow = GetDoubleClickTime() / 5; /// /// + // https://docs.microsoft.com/en-us/windows/win32/controls/ttm-setdelaytime TTM_SETDELAYTIME = WindowMessage.WM_USER + 3, /// Registers a tool with a tooltip control. - /// Must be zero. - /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// /// Pointer to a TOOLINFO structure containing information that the tooltip control needs to display text for the tool. /// The cbSize member of this structure must be filled in before sending this message. - /// - /// Returns TRUE if successful, or FALSE otherwise. + /// + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/ttm-addtool TTM_ADDTOOL = WindowMessage.WM_USER + 50, /// Removes a tool from a tooltip control. - /// Must be zero. - /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// /// Pointer to a TOOLINFO structure. The hwnd and uId members identify the tool to remove, and the /// cbSize member must specify the size of the structure. All other members are ignored. - /// - /// No return value. + /// + /// Returns + /// No return value. + // https://docs.microsoft.com/en-us/windows/win32/controls/ttm-deltool TTM_DELTOOL = WindowMessage.WM_USER + 51, /// Sets a new bounding rectangle for a tool. - /// Must be zero. - /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// /// Pointer to a TOOLINFO structure. The hwnd and uId members identify a tool, and the rect member /// specifies the new bounding rectangle. The cbSize member of this structure must be filled in before sending this message. - /// - /// No return value. + /// + /// Returns + /// No return value. + // https://docs.microsoft.com/en-us/windows/win32/controls/ttm-newtoolrect TTM_NEWTOOLRECT = WindowMessage.WM_USER + 52, /// Passes a mouse message to a tooltip control for processing. - /// + /// Parameters + /// wParam + /// /// Must be zero. Windows 7 and later: If the position of the tooltip is offset from the cursor position (in order not be /// obstructed by a finger or pointing device), this parameter can contain extra information taken from the WM_MOUSEMOVE /// message. Retrieve this extra information with GetMessageExtraInfo. - /// - /// Pointer to an MSG structure that contains the message to relay. - /// No return value. + /// + /// lParam + /// Pointer to an MSG structure that contains the message to relay. + /// Returns + /// No return value. /// /// A tooltip control processes only the following messages passed to it by the TTM_RELAYEVENT message: /// @@ -209,6 +234,9 @@ namespace Vanara.PInvoke /// WM_MOUSEMOVE /// /// + /// WM_NCMOUSEMOVE + /// + /// /// WM_RBUTTONDOWN /// /// @@ -217,140 +245,183 @@ namespace Vanara.PInvoke /// /// All other messages are ignored. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/ttm-relayevent TTM_RELAYEVENT = WindowMessage.WM_USER + 7, // Win7: wParam = GetMessageExtraInfo() when relaying WM_MOUSEMOVE /// Retrieves the information that a tooltip control maintains about a tool. - /// Must be zero. - /// - /// Pointer to a TOOLINFO structure. When sending the message, the hwnd and uId members identify a tool, - /// and the cbSize member must specify the size of the structure. When using this message to retrieve the tooltip text, - /// ensure that the lpszText member of the TOOLINFO structure points to a valid buffer of adquate size - /// - /// Returns TRUE if successful, or FALSE otherwise. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// + /// Pointer to a TOOLINFO structure. When sending the message, the hwnd and uId members identify a tool, and + /// the cbSize member must specify the size of the structure. When using this message to retrieve the tooltip text, ensure + /// that the lpszText member of the TOOLINFO structure points to a valid buffer of adquate size + /// + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. /// If the tooltip control includes the tool, the TOOLINFO structure receives information about the tool. + // https://docs.microsoft.com/en-us/windows/win32/controls/ttm-gettoolinfo TTM_GETTOOLINFO = WindowMessage.WM_USER + 53, /// Sets the information that a tooltip control maintains for a tool. - /// Must be zero. - /// - /// Pointer to a TOOLINFO structure that specifies the information to set. The cbSize member of this structure - /// must be set before sending this message. - /// - /// No return value. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// + /// Pointer to a TOOLINFO structure that specifies the information to set. The cbSize member of this structure must + /// be set before sending this message. + /// + /// Returns + /// No return value. /// /// /// Some internal properties of a tool are established when the tool is created, and are not recomputed when a - /// TTM_SETTOOLINFO message is sent. If you simply assign values to a TOOLINFO structure and pass it to the - /// tooltip control with a TTM_SETTOOLINFO message, these properties may be lost. Instead, your application should first - /// request the tool's current TOOLINFO structure by sending the tooltip control a TTM_GETTOOLINFO message. Then, - /// modify the members of this structure as needed and pass it back to the tooltip control with TTM_SETTOOLINFO. + /// TTM_SETTOOLINFO message is sent. If you simply assign values to a TOOLINFO structure and pass it to the tooltip + /// control with a TTM_SETTOOLINFO message, these properties may be lost. Instead, your application should first request + /// the tool's current TOOLINFO structure by sending the tooltip control a TTM_GETTOOLINFO message. Then, modify + /// the members of this structure as needed and pass it back to the tooltip control with TTM_SETTOOLINFO. /// /// /// When calling TTM_SETTOOLINFO, the string pointed to by the lpszText member of the TOOLINFO structure /// must not exceed 80 TCHARs in length, including the terminating NULL. /// /// + // https://docs.microsoft.com/en-us/windows/win32/controls/ttm-settoolinfo TTM_SETTOOLINFO = WindowMessage.WM_USER + 54, /// /// Tests a point to determine whether it is within the bounding rectangle of the specified tool and, if it is, retrieves /// information about the tool. /// - /// Must be zero. - /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// /// Pointer to a TTHITTESTINFO structure. When sending the message, the hwnd member must specify the handle to a /// tool and the pt member must specify the coordinates of a point. If the return value is TRUE, the ti - /// member (a TOOLINFO structure) receives information about the tool that occupies the point. The cbSize member - /// of the ti structure must be filled in before sending this message. - /// - /// Returns TRUE if the tool occupies the specified point, or FALSE otherwise. + /// member (a TOOLINFO structure) receives information about the tool that occupies the point. The cbSize member of + /// the ti structure must be filled in before sending this message. + /// + /// Returns + /// Returns TRUE if the tool occupies the specified point, or FALSE otherwise. /// /// This message must be sent when the tool has the TTF_TRACK flag set. For more information on this flag, see TOOLINFO. /// TTM_HITTEST will fail if TTF_TRACK is not set, regardless if the hit point is in the tools rectangle or not. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/ttm-hittest TTM_HITTEST = WindowMessage.WM_USER + 55, /// Retrieves the information a tooltip control maintains about a tool. - /// - /// The number of **TCHARs**, including the terminating **NULL**, to copy to the buffer pointed to by **lpszText**. - /// - /// - /// Pointer to a TOOLINFO structure. Set the cbSize member of this structure to + /// Parameters + /// wParam + /// The number of **TCHARs**, including the terminating **NULL**, to copy to the buffer pointed to by **lpszText**. + /// lParam + /// Pointer to a TOOLINFO structure. Set the cbSize member of this structure to /// sizeof(TOOLINFO) /// before sending this message. Set the hwnd and uId members to identify the tool for which to retrieve /// information. Allocate a buffer of size specified by wParam. Set the lpszText member to point to the buffer to receive /// the tool text. - /// - /// No return value. + /// + /// Returns + /// No return value. + // https://docs.microsoft.com/en-us/windows/win32/controls/ttm-gettext TTM_GETTEXT = WindowMessage.WM_USER + 56, /// Sets the tooltip text for a tool. - /// Must be zero. - /// - /// Pointer to a TOOLINFO structure. The hinst and lpszText members must specify the instance handle and - /// the address of the text. The hwnd and uId members identify the tool to update. The cbSize member of - /// this structure must be filled in before sending this message. - /// - /// No return value. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// + /// Pointer to a TOOLINFO structure. The hinst and lpszText members must specify the instance handle and the + /// address of the text. The hwnd and uId members identify the tool to update. The cbSize member of this + /// structure must be filled in before sending this message. + /// + /// Returns + /// No return value. + // https://docs.microsoft.com/en-us/windows/win32/controls/ttm-updatetiptext TTM_UPDATETIPTEXT = WindowMessage.WM_USER + 57, /// Retrieves a count of the tools maintained by a tooltip control. - /// Must be zero. - /// Must be zero. - /// Returns a count of tools. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns a count of tools. + // https://docs.microsoft.com/en-us/windows/win32/controls/ttm-gettoolcount TTM_GETTOOLCOUNT = WindowMessage.WM_USER + 13, /// /// Retrieves the information that a tooltip control maintains about the current tool that is, the tool for which the tooltip is /// currently displaying text. /// - /// Zero-based index of the tool for which to retrieve information. - /// + /// Parameters + /// wParam + /// Zero-based index of the tool for which to retrieve information. + /// lParam + /// /// Pointer to a TOOLINFO structure that receives information about the tool. Set the cbSize member of this /// structure to sizeof(TOOLINFO) before sending this message. Allocate a buffer. Set the lpszText member to point to the /// buffer to receive the tool text. There is no way to determine the required buffer size. However, tool text, as returned at /// the lpszText member of the TOOLINFO structure, has a maximum length of 80 TCHARs, including the /// terminating NULL. If the text exceeds this length, it is truncated. - /// - /// Returns TRUE if any tools are enumerated, or FALSE otherwise. + /// + /// Returns + /// Returns FALSE whether or not a tool was enumerated. /// /// Security Warning: Using this message might compromise the security of your program. This message does not provide a /// way for the message receiver to know the size of the buffer or to specify the size of the buffer. You should review the /// Security Considerations: Microsoft Windows Controls before continuing. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/ttm-enumtools TTM_ENUMTOOLS = WindowMessage.WM_USER + 58, /// Retrieves the information for the current tool in a tooltip control. - /// Must be zero. - /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// /// Pointer to a TOOLINFO structure that receives information about the current tool. If this value is NULL, the /// return value indicates the existence of the current tool without actually retrieving the tool information. If this value is /// not NULL, the cbSize member of the TOOLINFO structure must be filled in before sending this message. - /// - /// - /// Returns nonzero if successful, or zero otherwise. If lParam is NULL, returns nonzero if a current tool exists, or - /// zero otherwise. - /// + /// + /// Returns + /// + /// Returns nonzero if successful, or zero otherwise. If lParam is NULL, returns nonzero if a current tool exists, or zero otherwise. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/ttm-getcurrenttool TTM_GETCURRENTTOOL = WindowMessage.WM_USER + 59, /// /// Allows a subclass procedure to cause a tooltip to display text for a window other than the one beneath the mouse cursor. /// - /// Must be zero. - /// Pointer to a POINT structure that defines the point to be checked. - /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Pointer to a POINT structure that defines the point to be checked. + /// Returns + /// /// The return value is the handle to the window that contains the point, or NULL if no window exists at the specified point. - /// + /// /// /// This message is intended to be processed by an application that subclasses a tooltip. It is not intended to be sent by an /// application. A tooltip sends this message to itself before displaying the text for a window. By changing the coordinates of /// the point specified by lParam, the subclass procedure can cause the tooltip to display text for a window other than the one /// beneath the mouse cursor. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/ttm-windowfrompoint TTM_WINDOWFROMPOINT = WindowMessage.WM_USER + 16, /// Activates or deactivates a tracking tooltip. - /// + /// Parameters + /// wParam /// Value specifying whether tracking is being activated or deactivated. This value can be one of the following: /// /// @@ -358,54 +429,71 @@ namespace Vanara.PInvoke /// Meaning /// /// - /// TRUE + /// TRUE /// Activate tracking. /// /// - /// FALSE + /// FALSE /// Deactivate tracking. /// /// - /// - /// - /// Pointer to a TOOLINFO structure that identifies the tool to which this message applies. The hwnd and - /// uId members identify the tool, and the cbSize member specifies the size of the structure. All other members - /// are ignored. - /// - /// The return value for this message is not used. + /// lParam + /// + /// Pointer to a TOOLINFO structure that identifies the tool to which this message applies. The hwnd and uId + /// members identify the tool, and the cbSize member specifies the size of the structure. All other members are ignored. + /// + /// Returns + /// The return value for this message is not used. + // https://docs.microsoft.com/en-us/windows/win32/controls/ttm-trackactivate TTM_TRACKACTIVATE = WindowMessage.WM_USER + 17, // wParam = TRUE/FALSE start end lparam = LPTOOLINFO /// Sets the position of a tracking tooltip. - /// Must be zero. - /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// /// The LOWORD specifies the x-coordinate of the point at which the tracking tooltip will be displayed, in screen /// coordinates. The HIWORD specifies the y-coordinate of the point at which the tracking tooltip will be displayed, in /// screen coordinates. - /// - /// The return value for this message is not used. + /// + /// Returns + /// The return value for this message is not used. /// /// The tooltip control chooses where to display the tooltip window based on the coordinates you provide with this message. This /// causes the tooltip window to appear beside the tool to which it corresponds. To have tooltip windows displayed at specific /// coordinates, include the TTF_ABSOLUTE flag in the uFlags member of the TOOLINFO structure when adding the tool. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/ttm-trackposition TTM_TRACKPOSITION = WindowMessage.WM_USER + 18, // lParam = dwPos /// Sets the background color in a tooltip window. - /// New background color. - /// Must be zero. - /// The return value for this message is not used. + /// Parameters + /// wParam + /// New background color. + /// lParam + /// Must be zero. + /// Returns + /// The return value for this message is not used. /// When visual styles are enabled, this message has no effect. + // https://docs.microsoft.com/en-us/windows/win32/controls/ttm-settipbkcolor TTM_SETTIPBKCOLOR = WindowMessage.WM_USER + 19, /// Sets the text color in a tooltip window. - /// New text color. - /// Must be zero. - /// The return value for this message is not used. + /// Parameters + /// wParam + /// New text color. + /// lParam + /// Must be zero. + /// Returns + /// The return value for this message is not used. /// When visual styles are enabled, this message has no effect. + // https://docs.microsoft.com/en-us/windows/win32/controls/ttm-settiptextcolor TTM_SETTIPTEXTCOLOR = WindowMessage.WM_USER + 20, /// Retrieves the initial, pop-up, and reshow durations currently set for a tooltip control. - /// + /// Parameters + /// wParam /// Flag that specifies which duration value will be retrieved. This parameter can have one of the following values: /// /// @@ -413,72 +501,96 @@ namespace Vanara.PInvoke /// Meaning /// /// - /// TTDT_AUTOPOP + /// TTDT_AUTOPOP /// /// Retrieve the amount of time the tooltip window remains visible if the pointer is stationary within a tool's bounding rectangle. /// /// /// - /// TTDT_INITIAL + /// TTDT_INITIAL /// /// Retrieve the amount of time the pointer must remain stationary within a tool's bounding rectangle before the tooltip window appears. /// /// /// - /// TTDT_RESHOW + /// TTDT_RESHOW /// /// Retrieve the amount of time it takes for subsequent tooltip windows to appear as the pointer moves from one tool to another. /// /// /// - /// - /// Must be zero. - /// Returns and INT value with the specified duration in milliseconds. + /// lParam + /// Must be zero. + /// Returns + /// Returns and INT value with the specified duration in milliseconds. + // https://docs.microsoft.com/en-us/windows/win32/controls/ttm-getdelaytime TTM_GETDELAYTIME = WindowMessage.WM_USER + 21, /// Retrieves the background color in a tooltip window. - /// Must be zero. - /// Must be zero. - /// Returns a COLORREF value that represents the background color. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns a COLORREF value that represents the background color. + // https://docs.microsoft.com/en-us/windows/win32/controls/ttm-gettipbkcolor TTM_GETTIPBKCOLOR = WindowMessage.WM_USER + 22, /// Retrieves the text color in a tooltip window. - /// Must be zero. - /// Must be zero. - /// Returns a COLORREF value that represents the text color. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns a COLORREF value that represents the text color. + // https://docs.microsoft.com/en-us/windows/win32/controls/ttm-gettiptextcolor TTM_GETTIPTEXTCOLOR = WindowMessage.WM_USER + 23, /// Sets the maximum width for a tooltip window. - /// Must be zero. - /// Maximum tooltip window width, or -1 to allow any width. - /// Returns the previous maximum tooltip width. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Maximum tooltip window width, or -1 to allow any width. + /// Returns + /// Returns the previous maximum tooltip width. /// /// The maximum width value does not indicate a tooltip window's actual width. Rather, if a tooltip string exceeds the maximum /// width, the control breaks the text into multiple lines, using spaces to determine line breaks. If the text cannot be /// segmented into multiple lines, it is displayed on a single line, which may exceed the maximum tooltip width. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/ttm-setmaxtipwidth TTM_SETMAXTIPWIDTH = WindowMessage.WM_USER + 24, /// Retrieves the maximum width for a tooltip window. - /// Must be zero. - /// Must be zero. - /// - /// Returns an INT value that represents the maximum tooltip width, in pixels. If no maximum width was set previously, - /// the message returns -1. - /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// + /// Returns an INT value that represents the maximum tooltip width, in pixels. If no maximum width was set previously, the + /// message returns -1. + /// /// /// The maximum tooltip width value does not indicate a tooltip window's actual width. Rather, if a tooltip string exceeds the /// maximum width, the control breaks the text into multiple lines, using spaces to determine line breaks. If the text cannot be /// segmented into multiple lines, it will be displayed on a single line. The length of this line may exceed the maximum tooltip width. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/ttm-getmaxtipwidth TTM_GETMAXTIPWIDTH = WindowMessage.WM_USER + 25, /// /// Sets the top, left, bottom, and right margins for a tooltip window. A margin is the distance, in pixels, between the tooltip /// window border and the text contained within the tooltip window. /// - /// Must be zero. - /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam /// /// Pointer to a RECT structure that contains the margin information to be set. The members of the RECT structure /// do not define a bounding rectangle. For the purpose of this message, the structure members are interpreted as follows: @@ -489,36 +601,39 @@ namespace Vanara.PInvoke /// Meaning /// /// - /// top + /// top /// Distance between top border and top of tooltip text, in pixels. /// /// - /// left + /// left /// Distance between left border and left end of tooltip text, in pixels. /// /// - /// bottom + /// bottom /// Distance between bottom border and bottom of tooltip text, in pixels. /// /// - /// right + /// right /// Distance between right border and right end of tooltip text, in pixels. /// /// - /// - /// The return value for this message is not used. + /// Returns + /// The return value for this message is not used. /// /// This message has no effect when the application runs on Windows Vista and visual styles are enabled for the tooltip. You can /// disable visual styles for the tooltip by using SetWindowTheme. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/ttm-setmargin TTM_SETMARGIN = WindowMessage.WM_USER + 26, // lParam = lprc /// - /// Retrieves the top, left, bottom, and right margins set for a tooltip window. A margin is the distance, in pixels, between - /// the tooltip window border and the text contained within the tooltip window. + /// Retrieves the top, left, bottom, and right margins set for a tooltip window. A margin is the distance, in pixels, between the + /// tooltip window border and the text contained within the tooltip window. /// - /// Must be zero. - /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam /// /// Pointer to a RECT structure that will receive the margin information. The members of the RECT structure do not /// define a bounding rectangle. For the purpose of this message, the structure members are interpreted as follows: @@ -529,62 +644,82 @@ namespace Vanara.PInvoke /// Meaning /// /// - /// top + /// top /// Distance between top border and top of tooltip text, in pixels. /// /// - /// left + /// left /// Distance between left border and left end of tooltip text, in pixels. /// /// - /// bottom + /// bottom /// Distance between bottom border and bottom of tooltip text, in pixels. /// /// - /// right + /// right /// Distance between right border and right end of tooltip text, in pixels. /// /// - /// - /// The return value for this message is not used. + /// Returns + /// The return value for this message is not used. /// All four margins default to zero when you create the tooltip control. + // https://docs.microsoft.com/en-us/windows/win32/controls/ttm-getmargin TTM_GETMARGIN = WindowMessage.WM_USER + 27, // lParam = lprc /// Removes a displayed tooltip window from view. - /// Must be zero. - /// Must be zero. - /// The return value for this message is not used. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// The return value for this message is not used. + // https://docs.microsoft.com/en-us/windows/win32/controls/ttm-pop TTM_POP = WindowMessage.WM_USER + 28, /// Forces the current tooltip to be redrawn. - /// Must be zero. - /// Must be zero. - /// The return value for this message is not used. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// The return value for this message is not used. + // https://docs.microsoft.com/en-us/windows/win32/controls/ttm-update TTM_UPDATE = WindowMessage.WM_USER + 29, /// Returns the width and height of a tooltip control. - /// Must be zero. - /// Pointer to the tooltip TOOLINFO structure. - /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Pointer to the tooltip TOOLINFO structure. + /// Returns + /// /// Returns the width of the tooltip in the low word and the height in the high word if successful. Otherwise, it returns FALSE. - /// + /// /// /// If the TTF_TRACK and TTF_ABSOLUTE flags are set in the uFlags member of the tooltip TOOLINFO structure, this /// message can be used to help position the tooltip accurately. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/ttm-getbubblesize TTM_GETBUBBLESIZE = WindowMessage.WM_USER + 30, /// /// Calculates a tooltip control's text display rectangle from its window rectangle, or the tooltip window rectangle needed to /// display a specified text display rectangle. /// - /// + /// Parameters + /// wParam + /// /// Value that specifies which operation to perform. If TRUE, lParam is used to specify a text-display rectangle and it /// receives the corresponding window rectangle. If FALSE, lParam is used to specify a window rectangle and it receives /// the corresponding text display rectangle. - /// - /// RECT structure to hold either a tooltip window rectangle or a text display rectangle. - /// Returns a nonzero value if the rectangle is successfully adjusted, and returns zero if an error occurs. + /// + /// lParam + /// RECT structure to hold either a tooltip window rectangle or a text display rectangle. + /// Returns + /// Returns a nonzero value if the rectangle is successfully adjusted, and returns zero if an error occurs. /// /// /// This message is particularly useful when you want to use a tooltip control to display the full text of a string that is @@ -604,24 +739,26 @@ namespace Vanara.PInvoke /// and position of its text rectangle. /// /// - /// The following code fragment illustrates the use of the TTM_ADJUSTRECT message to position a tooltip control to - /// display the full text of a control's string in place of a truncated string. The application-defined GetMyItemRect - /// function returns the text rectangle that will be needed to display the tooltip text directly over the truncated string. The - /// details of how this function is implemented will depend on the particular control. TTM_ADJUSTRECT is used to send - /// this text rectangle to the tooltip control. It returns an appropriately sized and positioned window rectangle that is then - /// used to position the tooltip window. + /// The following code fragment illustrates the use of the TTM_ADJUSTRECT message to position a tooltip control to display + /// the full text of a control's string in place of a truncated string. The application-defined GetMyItemRect function + /// returns the text rectangle that will be needed to display the tooltip text directly over the truncated string. The details of + /// how this function is implemented will depend on the particular control. TTM_ADJUSTRECT is used to send this text + /// rectangle to the tooltip control. It returns an appropriately sized and positioned window rectangle that is then used to + /// position the tooltip window. /// /// /// case TTN_SHOW: if (MyStringIsTruncated) { RECT rc; GetMyItemRect(&rc); SendMessage(hwndToolTip, TTM_ADJUSTRECT, TRUE, (LPARAM)&rc); SetWindowPos(hwndToolTip, NULL, rc.left, rc.top, 0, 0, SWP_NOSIZE|SWP_NOZORDER|SWP_NOACTIVATE); } /// /// + // https://docs.microsoft.com/en-us/windows/win32/controls/ttm-adjustrect TTM_ADJUSTRECT = WindowMessage.WM_USER + 31, /// Adds a standard icon and title string to a tooltip. - /// + /// Parameters + /// wParam /// - /// Set wParam to one of the following values to specify the icon to be displayed. As of Windows XP SP2 and later, this - /// parameter can also contain an HICON value. Any value greater than TTI_ERROR is assumed to be an HICON. + /// Set wParam to one of the following values to specify the icon to be displayed. As of Windows XP SP2 and later, this parameter + /// can also contain an HICON value. Any value greater than TTI_ERROR is assumed to be an HICON. /// /// /// @@ -629,37 +766,38 @@ namespace Vanara.PInvoke /// Meaning /// /// - /// TTI_NONE + /// TTI_NONE /// No icon. /// /// - /// TTI_INFO + /// TTI_INFO /// Info icon. /// /// - /// TTI_WARNING + /// TTI_WARNING /// Warning icon /// /// - /// TTI_ERROR + /// TTI_ERROR /// Error Icon /// /// - /// TTI_INFO_LARGE + /// TTI_INFO_LARGE /// Large error Icon /// /// - /// TTI_WARNING_LARGE + /// TTI_WARNING_LARGE /// Large error Icon /// /// - /// TTI_ERROR_LARGE + /// TTI_ERROR_LARGE /// Large error Icon /// /// - /// - /// Pointer to the title string. You must assign a value to lParam. - /// Returns TRUE if successful, FALSE if not. + /// lParam + /// Pointer to the title string. You must assign a value to lParam. + /// Returns + /// Returns TRUE if successful, FALSE if not. /// /// /// The title of a tooltip appears above the text, in a different font. It is not sufficient to have a title; the tooltip must @@ -671,27 +809,61 @@ namespace Vanara.PInvoke /// terminating NULL. /// /// + // https://docs.microsoft.com/en-us/windows/win32/controls/ttm-settitle TTM_SETTITLE = WindowMessage.WM_USER + 33, // wParam = TTI_*, lParam = wchar* szTitle /// Causes the tooltip to display at the coordinates of the last mouse message. - /// Must be zero. - /// Must be zero. - /// The return value is not used. - /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// The return value is not used. + /// + /// Note + /// + /// To use this message, you must provide a manifest specifying Comclt32.dll version 6.0. For more information on manifests, see + /// Enabling Visual Styles. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/ttm-popup TTM_POPUP = WindowMessage.WM_USER + 34, /// Retrieve information concerning the title of a tooltip control. - /// Must be zero. - /// Pointer to a TTGETTITLE structure that contains information about a tooltip title. - /// The return value is not used. - /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Pointer to a TTGETTITLE structure that contains information about a tooltip title. + /// Returns + /// The return value is not used. + /// + /// Note + /// + /// To use this message, you must provide a manifest specifying Comclt32.dll version 6.0. For more information on manifests, see + /// Enabling Visual Styles. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/ttm-gettitle TTM_GETTITLE = WindowMessage.WM_USER + 35, // wParam = 0, lParam = TTGETTITLE* /// Sets the visual style of a tooltip control. - /// Must be zero. - /// Pointer to a Unicode string that contains the tooltip visual style to set. - /// The return value is not used. - /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Pointer to a Unicode string that contains the tooltip visual style to set. + /// Returns + /// The return value is not used. + /// + /// Note + /// + /// To use this message, you must provide a manifest specifying Comclt32.dll version 6.0. For more information on manifests, see + /// Enabling Visual Styles. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/ttm-setwindowtheme TTM_SETWINDOWTHEME = CommonControlMessage.CCM_SETWINDOWTHEME } @@ -708,15 +880,17 @@ namespace Vanara.PInvoke /// TTN_GETDISPINFO lpnmtdi = (LPNMTTDISPINFO) lParam; /// /// - /// - /// Pointer to an NMTTDISPINFO structure that identifies the tool that needs text and receives the requested information. - /// - /// The return value for this notification is not used. + /// Parameters + /// lParam + /// Pointer to an NMTTDISPINFO structure that identifies the tool that needs text and receives the requested information. + /// Returns + /// The return value for this notification is not used. /// /// Fill the structure's appropriate members to return the requested information to the tooltip control. If your message handler /// sets the uFlags member of the NMTTDISPINFO structure to TTF_DI_SETITEM, the tooltip control stores the /// information and will not request it again. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/ttn-getdispinfo TTN_GETDISPINFO = TTN_FIRST - 10, /// @@ -728,16 +902,24 @@ namespace Vanara.PInvoke /// TTN_SHOW pnmh = (LPNMHDR) lParam; /// /// - /// Pointer to an NMHDR structure. - /// + /// Parameters + /// lParam + /// Pointer to an NMHDR structure. + /// Returns + /// /// Version 4.70. To display the tooltip in its default location, return zero. To customize the tooltip position, reposition the /// tooltip window with the SetWindowPos function and return TRUE. - /// + /// + /// + /// Note + /// For versions earlier than 4.70, there is no return value. + /// /// /// A tooltip window rectangle is somewhat larger than its text display rectangle, and its origin is offset up and to the left. - /// If you need to accurately position the text display rectangle of a tooltip, the TTM_ADJUSTRECT message converts a - /// text display rectangle into the corresponding tooltip window rectangle and vice versa. + /// If you need to accurately position the text display rectangle of a tooltip, the TTM_ADJUSTRECT message converts a text + /// display rectangle into the corresponding tooltip window rectangle and vice versa. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/ttn-show TTN_SHOW = TTN_FIRST - 1, /// @@ -749,8 +931,12 @@ namespace Vanara.PInvoke /// TTN_POP pnmh = (LPNMHDR) lParam; /// /// - /// Pointer to an NMHDR structure. - /// No return value. + /// Parameters + /// lParam + /// Pointer to an NMHDR structure. + /// Returns + /// No return value. + // https://docs.microsoft.com/en-us/windows/win32/controls/ttn-pop TTN_POP = TTN_FIRST - 2, /// @@ -761,11 +947,22 @@ namespace Vanara.PInvoke /// TTN_LINKCLICK /// /// - /// Return value not used. + /// Returns + /// Return value not used. /// + /// /// Following is an example of when this notification is sent. Assume that your balloon tooltip contains the following text, /// "This is a link". When "link" is clicked, the tooltip control sends a TTN_LINKCLICK notification code. + /// + /// + /// Note + /// + /// To use this notification code, you must provide a manifest specifying Comclt32.dll version 6.0. For more information on + /// manifests, see Enabling Visual Styles. + /// + /// /// + // https://docs.microsoft.com/en-us/windows/win32/controls/ttn-linkclick TTN_LINKCLICK = TTN_FIRST - 3, /// @@ -777,20 +974,20 @@ namespace Vanara.PInvoke /// TTN_NEEDTEXT lpnmtdi = (LPNMTTDISPINFO) lParam; /// /// - /// - /// Pointer to an NMTTDISPINFO structure that identifies the tool that needs text and receives the requested information. - /// - /// The return value for this notification is not used. + /// Parameters + /// lParam + /// Pointer to an NMTTDISPINFO structure that identifies the tool that needs text and receives the requested information. + /// Returns + /// The return value for this notification is not used. /// /// Fill the structure's appropriate members to return the requested information to the tooltip control. If your message handler /// sets the uFlags member of the NMTTDISPINFO structure to TTF_DI_SETITEM, the tooltip control stores the /// information and will not request it again. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/ttn-needtext TTN_NEEDTEXT = TTN_GETDISPINFO, } -#pragma warning restore CS1572 // XML comment has a param tag, but there is no parameter by that name - /// /// Contains information used in handling the TTN_GETDISPINFO notification code. This structure supersedes the TOOLTIPTEXT structure. /// diff --git a/PInvoke/ComCtl32/CommCtrl.Toolbar.cs b/PInvoke/ComCtl32/CommCtrl.Toolbar.cs index 83663832..aa86b9e8 100644 --- a/PInvoke/ComCtl32/CommCtrl.Toolbar.cs +++ b/PInvoke/ComCtl32/CommCtrl.Toolbar.cs @@ -86,146 +86,207 @@ namespace Vanara.PInvoke TBSTATE_WRAP = 0x20, } -#pragma warning disable CS1572 // XML comment has a param tag, but there is no parameter by that name - /// Toolbar Control Messages [PInvokeData("Commctrl.h")] public enum ToolbarMessage { - /// Enables or disables the specified button in a toolbar. - /// Command identifier of the button to enable or disable. - /// - /// The LOWORD is a BOOL that indicates whether to enable or disable the specified button. If TRUE, the - /// button is enabled. If FALSE, the button is disabled. - /// - /// Returns TRUE if successful, or FALSE otherwise. + /// Checks or unchecks a given button in a toolbar. + /// Parameters + /// wParam + /// Command identifier of the button to check. + /// lParam + /// + /// The LOWORD is a BOOL that indicates whether to check or uncheck the specified button. If TRUE, the check + /// is added. If FALSE, the check is removed. + /// + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + /// When a button is checked, it is displayed in the pressed state. + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-checkbutton TB_CHECKBUTTON = WindowMessage.WM_USER + 2, /// Presses or releases the specified button in a toolbar. - /// Command identifier of the button to press or release. - /// + /// Parameters + /// wParam + /// Command identifier of the button to press or release. + /// lParam /// /// The LOWORD is a BOOL that indicates whether to press or release the specified button. If TRUE, the /// button is pressed. If FALSE, the button is released. /// /// The HIWORD must be zero. - /// - /// Returns TRUE if successful, or FALSE otherwise. + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-pressbutton TB_PRESSBUTTON = WindowMessage.WM_USER + 3, /// Hides or shows the specified button in a toolbar. - /// Command identifier of the button to hide or show. - /// + /// Parameters + /// wParam + /// Command identifier of the button to hide or show. + /// lParam /// - /// The LOWORD is a BOOL that indicates whether to hide or show the specified button. If TRUE, the button - /// is hidden. If FALSE, the button is shown. + /// The LOWORD is a BOOL that indicates whether to hide or show the specified button. If TRUE, the button is + /// hidden. If FALSE, the button is shown. /// /// The HIWORD must be zero. - /// - /// Returns TRUE if successful, or FALSE otherwise. + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-hidebutton TB_HIDEBUTTON = WindowMessage.WM_USER + 4, /// Sets or clears the indeterminate state of the specified button in a toolbar. - /// Command identifier of the button whose indeterminate state is to be set or cleared. - /// + /// Parameters + /// wParam + /// Command identifier of the button whose indeterminate state is to be set or cleared. + /// lParam /// /// The LOWORD is a BOOL that indicates whether to set or clear the indeterminate state. If TRUE, the /// indeterminate state is set. If FALSE, the state is cleared. /// /// The HIWORD must be zero. - /// - /// Returns TRUE if successful, or FALSE otherwise. + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-indeterminate TB_INDETERMINATE = WindowMessage.WM_USER + 5, /// Sets the highlight state of a given button in a toolbar control. - /// Command identifier for a toolbar button. - /// + /// Parameters + /// wParam + /// Command identifier for a toolbar button. + /// lParam /// /// The LOWORD is a BOOL that indicates the new highlight state. If TRUE, the button is highlighted. If /// FALSE, the button is set to its default state. /// /// The HIWORD must be zero. - /// - /// Returns nonzero if successful, or zero otherwise. + /// Returns + /// Returns nonzero if successful, or zero otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-markbutton TB_MARKBUTTON = WindowMessage.WM_USER + 6, /// Determines whether the specified button in a toolbar is enabled. - /// Command identifier of the button. - /// Must be zero. - /// Returns nonzero if the button is enabled, or zero otherwise. + /// Parameters + /// wParam + /// Command identifier of the button. + /// lParam + /// Must be zero. + /// Returns + /// Returns nonzero if the button is enabled, or zero otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-isbuttonenabled TB_ISBUTTONENABLED = WindowMessage.WM_USER + 9, /// Determines whether the specified button in a toolbar is checked. - /// Command identifier of the button. - /// Must be zero. - /// Returns nonzero if the button is checked, or zero otherwise. + /// Parameters + /// wParam + /// Command identifier of the button. + /// lParam + /// Must be zero. + /// Returns + /// Returns nonzero if the button is checked, or zero otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-isbuttonchecked TB_ISBUTTONCHECKED = WindowMessage.WM_USER + 10, /// Determines whether the specified button in a toolbar is pressed. - /// Command identifier of the button. - /// Must be zero. - /// Returns nonzero if the button is pressed, or zero otherwise. + /// Parameters + /// wParam + /// Command identifier of the button. + /// lParam + /// Must be zero. + /// Returns + /// Returns nonzero if the button is pressed, or zero otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-isbuttonpressed TB_ISBUTTONPRESSED = WindowMessage.WM_USER + 11, /// Determines whether the specified button in a toolbar is hidden. - /// Command identifier of the button. - /// Must be zero. - /// Returns nonzero if the button is hidden, or zero otherwise. + /// Parameters + /// wParam + /// Command identifier of the button. + /// lParam + /// Must be zero. + /// Returns + /// Returns nonzero if the button is hidden, or zero otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-isbuttonhidden TB_ISBUTTONHIDDEN = WindowMessage.WM_USER + 12, /// Determines whether the specified button in a toolbar is indeterminate. - /// Command identifier of the button. - /// Must be zero. - /// Returns nonzero if the button is indeterminate, or zero otherwise. + /// Parameters + /// wParam + /// Command identifier of the button. + /// lParam + /// Must be zero. + /// Returns + /// Returns nonzero if the button is indeterminate, or zero otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-isbuttonindeterminate TB_ISBUTTONINDETERMINATE = WindowMessage.WM_USER + 13, /// Checks the highlight state of a toolbar button. - /// Command identifier for a toolbar button. - /// Must be zero. - /// Returns nonzero if the button is highlighted, or zero otherwise. + /// Parameters + /// wParam + /// Command identifier for a toolbar button. + /// lParam + /// Must be zero. + /// Returns + /// Returns nonzero if the button is highlighted, or zero otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-isbuttonhighlighted TB_ISBUTTONHIGHLIGHTED = WindowMessage.WM_USER + 14, /// Sets the state for the specified button in a toolbar. - /// Command identifier of the button. - /// - /// The LOWORD is a combination of values listed in Toolbar Button States. The HIWORD must be zero. - /// - /// Returns TRUE if successful, or FALSE otherwise. + /// Parameters + /// wParam + /// Command identifier of the button. + /// lParam + /// The LOWORD is a combination of values listed in Toolbar Button States. The HIWORD must be zero. + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-setstate TB_SETSTATE = WindowMessage.WM_USER + 17, /// /// Retrieves information about the state of the specified button in a toolbar, such as whether it is enabled, pressed, or checked. /// - /// Command identifier of the button for which to retrieve information. - /// Must be zero. - /// - /// Returns the button state information if successful, or -1 otherwise. The button state information can be a combination of - /// the values listed in Toolbar Button States. - /// + /// Parameters + /// wParam + /// Command identifier of the button for which to retrieve information. + /// lParam + /// Must be zero. + /// Returns + /// + /// Returns the button state information if successful, or -1 otherwise. The button state information can be a combination of the + /// values listed in Toolbar Button States. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-getstate TB_GETSTATE = WindowMessage.WM_USER + 18, /// Adds one or more images to the list of button images available for a toolbar. - /// - /// Number of button images in the bitmap. If lParam specifies a system-defined bitmap, this parameter is ignored. - /// - /// + /// Parameters + /// wParam + /// Number of button images in the bitmap. If lParam specifies a system-defined bitmap, this parameter is ignored. + /// lParam + /// /// Pointer to a TBADDBITMAP structure that contains the identifier of a bitmap resource and the handle to the module /// instance with the executable file that contains the bitmap resource. - /// - /// Returns the index of the first new image if successful, or -1 otherwise. + /// + /// Returns + /// Returns the index of the first new image if successful, or -1 otherwise. /// /// If the toolbar was created using the CreateWindowEx function, you must send the TB_BUTTONSTRUCTSIZE message to /// the toolbar before sending TB_ADDBITMAP. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-addbitmap TB_ADDBITMAP = WindowMessage.WM_USER + 19, /// Adds one or more buttons to a toolbar. - /// Number of buttons to add. - /// + /// Parameters + /// wParam + /// Number of buttons to add. + /// lParam + /// /// Pointer to an array of TBBUTTON structures that contain information about the buttons to add. There must be the same /// number of elements in the array as buttons specified by wParam. - /// - /// Returns TRUE if successful, or FALSE otherwise. + /// + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. /// /// /// If the toolbar was created using the CreateWindowEx function, you must send the TB_BUTTONSTRUCTSIZE message to @@ -233,51 +294,81 @@ namespace Vanara.PInvoke /// /// See TB_SETIMAGELIST for a discussion of how to assign bitmaps to toolbar buttons from one or more image lists. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-addbuttons TB_ADDBUTTONSA = WindowMessage.WM_USER + 20, /// Inserts a button in a toolbar. - /// Zero-based index of a button. The message inserts the new button to the left of this button. - /// Pointer to a TBBUTTON structure containing information about the button to insert. - /// Returns TRUE if successful, or FALSE otherwise. + /// Parameters + /// wParam + /// Zero-based index of a button. The message inserts the new button to the left of this button. + /// lParam + /// Pointer to a TBBUTTON structure containing information about the button to insert. + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-insertbutton TB_INSERTBUTTONA = WindowMessage.WM_USER + 21, /// Deletes a button from the toolbar. - /// Zero-based index of the button to delete. - /// Must be zero. - /// Returns TRUE if successful, or FALSE otherwise. + /// Parameters + /// wParam + /// Zero-based index of the button to delete. + /// lParam + /// Must be zero. + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-deletebutton TB_DELETEBUTTON = WindowMessage.WM_USER + 22, /// Retrieves information about the specified button in a toolbar. - /// Zero-based index of the button for which to retrieve information. - /// Pointer to the TBBUTTON structure that receives the button information. - /// Returns TRUE if successful, or FALSE otherwise. + /// Parameters + /// wParam + /// Zero-based index of the button for which to retrieve information. + /// lParam + /// Pointer to the TBBUTTON structure that receives the button information. + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-getbutton TB_GETBUTTON = WindowMessage.WM_USER + 23, /// Retrieves a count of the buttons currently in the toolbar. - /// Must be zero. - /// Must be zero. - /// Returns the count of the buttons. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns the count of the buttons. + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-buttoncount TB_BUTTONCOUNT = WindowMessage.WM_USER + 24, /// Retrieves the zero-based index for the button associated with the specified command identifier. - /// Command identifier associated with the button. - /// Must be zero. - /// Returns the zero-based index for the button or -1 if the specified command identifier is invalid. + /// Parameters + /// wParam + /// Command identifier associated with the button. + /// lParam + /// Must be zero. + /// Returns + /// Returns the zero-based index for the button or -1 if the specified command identifier is invalid. + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-commandtoindex TB_COMMANDTOINDEX = WindowMessage.WM_USER + 25, /// Send this message to initiate saving or restoring a toolbar state. - /// + /// Parameters + /// wParam + /// /// Save or restore flag. If this parameter is TRUE, the information is saved. If it is FALSE, the information is restored. - /// - /// + /// + /// lParam + /// /// Pointer to a TBSAVEPARAMS structure that specifies the registry key, subkey, and value name for the toolbar state information. - /// - /// No return value. + /// + /// Returns + /// No return value. /// /// - /// For version 4.72 and earlier, to use this message to save or restore a toolbar, the parent window of the toolbar control - /// must implement a handler for the TBN_GETBUTTONINFO notification code. The toolbar issues this notification to retrieve - /// information about each button as it is restored. + /// For version 4.72 and earlier, to use this message to save or restore a toolbar, the parent window of the toolbar control must + /// implement a handler for the TBN_GETBUTTONINFO notification code. The toolbar issues this notification to retrieve information + /// about each button as it is restored. /// /// /// Version 5.80 includes a new save/restore option. At the beginning of the process, and as each button is saved or restored, @@ -285,21 +376,26 @@ namespace Vanara.PInvoke /// handlers to provide the Shell with the bitmap and state information it needs to successfully save or restore the toolbar state. /// /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-saverestore TB_SAVERESTOREA = WindowMessage.WM_USER + 26, /// Send this message to initiate saving or restoring a toolbar state. - /// + /// Parameters + /// wParam + /// /// Save or restore flag. If this parameter is TRUE, the information is saved. If it is FALSE, the information is restored. - /// - /// + /// + /// lParam + /// /// Pointer to a TBSAVEPARAMS structure that specifies the registry key, subkey, and value name for the toolbar state information. - /// - /// No return value. + /// + /// Returns + /// No return value. /// /// - /// For version 4.72 and earlier, to use this message to save or restore a toolbar, the parent window of the toolbar control - /// must implement a handler for the TBN_GETBUTTONINFO notification code. The toolbar issues this notification to retrieve - /// information about each button as it is restored. + /// For version 4.72 and earlier, to use this message to save or restore a toolbar, the parent window of the toolbar control must + /// implement a handler for the TBN_GETBUTTONINFO notification code. The toolbar issues this notification to retrieve information + /// about each button as it is restored. /// /// /// Version 5.80 includes a new save/restore option. At the beginning of the process, and as each button is saved or restored, @@ -307,70 +403,101 @@ namespace Vanara.PInvoke /// handlers to provide the Shell with the bitmap and state information it needs to successfully save or restore the toolbar state. /// /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-saverestore TB_SAVERESTOREW = WindowMessage.WM_USER + 76, /// Displays the Customize Toolbar dialog box. - /// Must be zero. - /// Must be zero. - /// No return value. - /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// No return value. + /// + /// Note + /// + /// The toolbar must handle the TBN_QUERYINSERT and TBN_QUERYDELETE notifications for the Customize Toolbar dialog box to + /// appear. If the toolbar does not handle those notifications, TB_CUSTOMIZE has no effect. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-customize TB_CUSTOMIZE = WindowMessage.WM_USER + 27, /// Adds a new string to the toolbar's string pool. - /// + /// Parameters + /// wParam + /// /// Handle to the module instance with an executable file that contains the string resource. If lParam instead points to a /// character array with one or more strings, set this parameter to NULL. - /// - /// Resource identifier for the string resource, or a pointer to a TCHAR array. See Remarks. - /// Returns the index of the first new string if successful, or -1 otherwise. + /// + /// lParam + /// Resource identifier for the string resource, or a pointer to a TCHAR array. See Remarks. + /// Returns + /// Returns the index of the first new string if successful, or -1 otherwise. /// /// - /// If wParam is NULL, lParam points to a character array with one or more null-terminated strings. The last string in - /// the array must be terminated with two null characters. + /// If wParam is NULL, lParam points to a character array with one or more null-terminated strings. The last string in the + /// array must be terminated with two null characters. /// /// /// If wParam is the HINSTANCE of the application or of another module containing a string resource, lParam is the resource /// identifier of the string. Each item in the string must begin with an arbitrary separator character, and the string must end - /// with two such characters. For example, the text for three buttons might appear in the string table as "/New/Open/Save//". - /// The message returns the index of "New" in the toolbar's string pool, and the other items are in consecutive positions. + /// with two such characters. For example, the text for three buttons might appear in the string table as "/New/Open/Save//". The + /// message returns the index of "New" in the toolbar's string pool, and the other items are in consecutive positions. /// /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-addstring TB_ADDSTRINGA = WindowMessage.WM_USER + 28, /// Adds a new string to the toolbar's string pool. - /// + /// Parameters + /// wParam + /// /// Handle to the module instance with an executable file that contains the string resource. If lParam instead points to a /// character array with one or more strings, set this parameter to NULL. - /// - /// Resource identifier for the string resource, or a pointer to a TCHAR array. See Remarks. - /// Returns the index of the first new string if successful, or -1 otherwise. + /// + /// lParam + /// Resource identifier for the string resource, or a pointer to a TCHAR array. See Remarks. + /// Returns + /// Returns the index of the first new string if successful, or -1 otherwise. /// /// - /// If wParam is NULL, lParam points to a character array with one or more null-terminated strings. The last string in - /// the array must be terminated with two null characters. + /// If wParam is NULL, lParam points to a character array with one or more null-terminated strings. The last string in the + /// array must be terminated with two null characters. /// /// /// If wParam is the HINSTANCE of the application or of another module containing a string resource, lParam is the resource /// identifier of the string. Each item in the string must begin with an arbitrary separator character, and the string must end - /// with two such characters. For example, the text for three buttons might appear in the string table as "/New/Open/Save//". - /// The message returns the index of "New" in the toolbar's string pool, and the other items are in consecutive positions. + /// with two such characters. For example, the text for three buttons might appear in the string table as "/New/Open/Save//". The + /// message returns the index of "New" in the toolbar's string pool, and the other items are in consecutive positions. /// /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-addstring TB_ADDSTRINGW = WindowMessage.WM_USER + 77, /// Retrieves the bounding rectangle of a button in a toolbar. - /// Zero-based index of the button for which to retrieve information. - /// Pointer to a RECT structure that receives the client coordinates of the bounding rectangle. - /// Returns TRUE if successful, or FALSE otherwise. + /// Parameters + /// wParam + /// Zero-based index of the button for which to retrieve information. + /// lParam + /// Pointer to a RECT structure that receives the client coordinates of the bounding rectangle. + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. /// /// This message does not retrieve the bounding rectangle for buttons whose state is set to the TBSTATE_HIDDEN value. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-getitemrect TB_GETITEMRECT = WindowMessage.WM_USER + 29, /// Specifies the size of the TBBUTTON structure. - /// Size, in bytes, of the TBBUTTON structure. - /// Must be zero. - /// No return value. + /// Parameters + /// wParam + /// Size, in bytes, of the TBBUTTON structure. + /// lParam + /// Must be zero. + /// Returns + /// No return value. /// /// The system uses the size to determine which version of the common control dynamic-link library (DLL) is being used. /// @@ -379,14 +506,19 @@ namespace Vanara.PInvoke /// automatically sends TB_BUTTONSTRUCTSIZE, and the size of the TBBUTTON structure is a parameter of the function. /// /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-buttonstructsize TB_BUTTONSTRUCTSIZE = WindowMessage.WM_USER + 30, /// Sets the size of buttons on a toolbar. - /// Must be zero. - /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// /// The LOWORD specifies the width, in pixels, of the buttons. The HIWORD specifies the height, in pixels, of the buttons. - /// - /// Returns TRUE if successful, or FALSE otherwise. + /// + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. /// /// TB_SETBUTTONSIZE should generally be called after adding buttons. /// @@ -394,61 +526,88 @@ namespace Vanara.PInvoke /// TB_SETBUTTONSIZE to set the actual size of buttons. /// /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-setbuttonsize TB_SETBUTTONSIZE = WindowMessage.WM_USER + 31, /// Sets the size of the bitmapped images to be added to a toolbar. - /// Must be zero. - /// - /// The LOWORD specifies the width, in pixels, of the bitmapped images. The HIWORD specifies the height, in - /// pixels, of the bitmapped images. - /// - /// Returns TRUE if successful, or FALSE otherwise. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// + /// The LOWORD specifies the width, in pixels, of the bitmapped images. The HIWORD specifies the height, in pixels, + /// of the bitmapped images. + /// + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. /// - /// The size can be set only before adding any bitmaps to the toolbar. If an application does not explicitly set the bitmap - /// size, the size defaults to 16 by 15 pixels. + /// The size can be set only before adding any bitmaps to the toolbar. If an application does not explicitly set the bitmap size, + /// the size defaults to 16 by 15 pixels. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-setbitmapsize TB_SETBITMAPSIZE = WindowMessage.WM_USER + 32, /// Causes a toolbar to be resized. - /// Must be zero. - /// Must be zero. - /// No return value. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// No return value. /// /// An application sends the TB_AUTOSIZE message after causing the size of a toolbar to change either by setting the /// button or bitmap size or by adding strings for the first time. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-autosize TB_AUTOSIZE = WindowMessage.WM_USER + 33, /// Retrieves the handle to the tooltip control, if any, associated with the toolbar. - /// Must be zero. - /// Must be zero. - /// Returns the handle to the tooltip control, or NULL if the toolbar has no associated tooltip. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns the handle to the tooltip control, or NULL if the toolbar has no associated tooltip. + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-gettooltips TB_GETTOOLTIPS = WindowMessage.WM_USER + 35, /// Associates a tooltip control with a toolbar. - /// Handle to the tooltip control. - /// Must be zero. - /// No return value. + /// Parameters + /// wParam + /// Handle to the tooltip control. + /// lParam + /// Must be zero. + /// Returns + /// No return value. /// /// Any buttons added to a toolbar before sending the TB_SETTOOLTIPS message will not be registered with the tooltip control. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-settooltips TB_SETTOOLTIPS = WindowMessage.WM_USER + 36, /// Sets the window to which the toolbar control sends notification messages. - /// Handle to the window to receive notification messages. - /// Must be zero. - /// + /// Parameters + /// wParam + /// Handle to the window to receive notification messages. + /// lParam + /// Must be zero. + /// Returns + /// /// The return value is a handle to the previous notification window, or NULL if there is no previous notification window. - /// + /// /// /// The TB_SETPARENT message does not change the parent window that was specified when the control was created. Calling /// the GetParent function for a toolbar control will return the actual parent window, not the window specified in /// TB_SETPARENT. To change the control's parent window, call the SetParent function. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-setparent TB_SETPARENT = WindowMessage.WM_USER + 37, /// Sets the number of rows of buttons in a toolbar. - /// + /// Parameters + /// wParam /// /// The LOWORD specifies the number of rows requested. The minimum number of rows is one, and the maximum number of rows /// is equal to the number of buttons in the toolbar. @@ -458,46 +617,63 @@ namespace Vanara.PInvoke /// the number of rows specified by wParam. If TRUE, the system creates more rows. If FALSE, the system creates /// fewer rows. /// - /// - /// - /// Pointer to a RECT structure that receives the bounding rectangle of the toolbar after the rows are set. - /// - /// No return value. + /// lParam + /// Pointer to a RECT structure that receives the bounding rectangle of the toolbar after the rows are set. + /// Returns + /// No return value. /// - /// Because the system does not break up button groups when setting the number of rows, the resulting number of rows might - /// differ from the number requested. + /// Because the system does not break up button groups when setting the number of rows, the resulting number of rows might differ + /// from the number requested. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-setrows TB_SETROWS = WindowMessage.WM_USER + 39, /// Retrieves the number of rows of buttons in a toolbar with the TBSTYLE_WRAPABLE style. - /// Must be zero. - /// Must be zero. - /// Returns the number of rows. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns the number of rows. + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-getrows TB_GETROWS = WindowMessage.WM_USER + 40, /// Retrieves the flags that describe the type of bitmap to be used. - /// Must be zero. - /// Must be zero. - /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// /// Returns a DWORD value that describes the type of bitmap that should be used. If this return value has the TBBF_LARGE /// flag set, applications should use large bitmaps (24 x 24); otherwise, applications should use small bitmaps (16 x 16). All /// other bits are reserved. - /// + /// /// /// The value returned by TB_GETBITMAPFLAGS is only advisory. The toolbar control recommends large or small bitmaps based /// upon whether the user has chosen large or small fonts. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-getbitmapflags TB_GETBITMAPFLAGS = WindowMessage.WM_USER + 41, /// Sets the command identifier of a toolbar button. - /// Zero-based index of the button whose command identifier is to be set. - /// Command identifier. - /// Returns TRUE if successful, or FALSE otherwise. + /// Parameters + /// wParam + /// Zero-based index of the button whose command identifier is to be set. + /// lParam + /// Command identifier. + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-setcmdid TB_SETCMDID = WindowMessage.WM_USER + 42, /// Changes the bitmap for a button in a toolbar. - /// Command identifier of the button that is to receive a new bitmap. - /// + /// Parameters + /// wParam + /// Command identifier of the button that is to receive a new bitmap. + /// lParam /// /// Zero-based index of an image in the toolbar's image list. The system displays the specified image in the button. Set this /// parameter to I_IMAGECALLBACK, and the toolbar will send the TBN_GETDISPINFO notification to retrieve the image index @@ -507,23 +683,33 @@ namespace Vanara.PInvoke /// Version 5.81. Set this parameter to I_IMAGENONE to indicate that the button does not have an image. The button layout will /// not include any space for a bitmap, only text. /// - /// - /// Returns TRUE if successful, or FALSE otherwise. + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-changebitmap TB_CHANGEBITMAP = WindowMessage.WM_USER + 43, /// Retrieves the index of the bitmap associated with a button in a toolbar. - /// Command identifier of the button whose bitmap index is to be retrieved. - /// Must be zero. - /// Returns the index of the bitmap if successful, or zero otherwise. + /// Parameters + /// wParam + /// Command identifier of the button whose bitmap index is to be retrieved. + /// lParam + /// Must be zero. + /// Returns + /// Returns the index of the bitmap if successful, or zero otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-getbitmap TB_GETBITMAP = WindowMessage.WM_USER + 44, /// Retrieves the display text of a button on a toolbar. - /// Command identifier of the button whose text is to be retrieved. - /// Pointer to a buffer that receives the button text. - /// + /// Parameters + /// wParam + /// Command identifier of the button whose text is to be retrieved. + /// lParam + /// Pointer to a buffer that receives the button text. + /// Returns + /// /// Returns the length, in characters, of the string pointed to by lParam. The length does not include the terminating null /// character. If unsuccessful, the return value is -1. - /// + /// /// /// /// Security Warning: Using this message incorrectly might compromise the security of your program. This message does not @@ -533,15 +719,20 @@ namespace Vanara.PInvoke /// /// The returned string corresponds to the text that is currently displayed by the button. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-getbuttontext TB_GETBUTTONTEXTA = WindowMessage.WM_USER + 45, /// Retrieves the display text of a button on a toolbar. - /// Command identifier of the button whose text is to be retrieved. - /// Pointer to a buffer that receives the button text. - /// + /// Parameters + /// wParam + /// Command identifier of the button whose text is to be retrieved. + /// lParam + /// Pointer to a buffer that receives the button text. + /// Returns + /// /// Returns the length, in characters, of the string pointed to by lParam. The length does not include the terminating null /// character. If unsuccessful, the return value is -1. - /// + /// /// /// /// Security Warning: Using this message incorrectly might compromise the security of your program. This message does not @@ -551,40 +742,57 @@ namespace Vanara.PInvoke /// /// The returned string corresponds to the text that is currently displayed by the button. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-getbuttontext TB_GETBUTTONTEXTW = WindowMessage.WM_USER + 75, /// Replaces an existing bitmap with a new bitmap. - /// Must be zero. - /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// /// Pointer to a TBREPLACEBITMAP structure that contains the information of the bitmap to be replaced and the new bitmap. - /// - /// Returns nonzero if successful, or zero otherwise. + /// + /// Returns + /// Returns nonzero if successful, or zero otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-replacebitmap TB_REPLACEBITMAP = WindowMessage.WM_USER + 46, /// Sets the indentation for the first button in a toolbar control. - /// Value specifying the indentation, in pixels. - /// Must be zero. - /// Returns nonzero if successful, or zero otherwise. + /// Parameters + /// wParam + /// Value specifying the indentation, in pixels. + /// lParam + /// Must be zero. + /// Returns + /// Returns nonzero if successful, or zero otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-setindent TB_SETINDENT = WindowMessage.WM_USER + 47, /// Sets the image list that the toolbar uses to display buttons that are in their default state. - /// - /// Version 5.80. The index of the list. If you use only one image list, or an earlier version of the common controls, set - /// wParam to zero. See Remarks for details on using multiple image lists. - /// - /// - /// Handle to the image list to set. If this parameter is NULL, no images are displayed in the buttons. - /// - /// + /// Parameters + /// wParam + /// + /// Version 5.80. The index of the list. If you use only one image list, or an earlier version of the common controls, set wParam + /// to zero. See Remarks for details on using multiple image lists. + /// + /// lParam + /// Handle to the image list to set. If this parameter is NULL, no images are displayed in the buttons. + /// Returns + /// /// Returns the handle to the image list previously used to display buttons in their default state, or NULL if no image /// list was previously set. - /// + /// /// /// + /// Note + /// Your application is responsible for freeing the image list after the toolbar is destroyed. + /// + /// /// The TB_SETIMAGELIST message cannot be combined with TB_ADDBITMAP. It also cannot be used with toolbars created /// with CreateToolbarEx, which calls TB_ADDBITMAP internally. When you create a toolbar with - /// CreateToolbarEx or use TB_ADDBITMAP to add images, the toolbar manages the image list internally. Attempting - /// to modify it with TB_SETIMAGELIST has unpredictable consequences. + /// CreateToolbarEx or use TB_ADDBITMAP to add images, the toolbar manages the image list internally. Attempting to + /// modify it with TB_SETIMAGELIST has unpredictable consequences. /// /// /// With version 5.80 or later of the common controls, button images need not come from the same image list. To use multiple @@ -641,19 +849,26 @@ namespace Vanara.PInvoke /// //Enable multiple image lists SendMessage(hwndTB, CCM_SETVERSION, (WPARAM) 5, 0); //Set the image lists and assign them IDs of 0-2 SendMessage(hwndTB, TB_SETIMAGELIST, 0, (LPARAM)ahiml[0]); SendMessage(hwndTB, TB_SETIMAGELIST, 1, (LPARAM)ahiml[1]); SendMessage(hwndTB, TB_SETIMAGELIST, 2, (LPARAM)ahiml[2]); // Create the five buttons TBBUTTON rgtb[5]; //... initialize the TBBUTTON structures as usual ... //Assign images to each button rgtb[0].iBitmap = MAKELONG(1, 0); rgtb[1].iBitmap = MAKELONG(1, 1); rgtb[2].iBitmap = MAKELONG(1, 2); rgtb[3].iBitmap = MAKELONG(2, 0); rgtb[4].iBitmap = MAKELONG(3, 1); // Add the five buttons to the toolbar control SendMessage(hwndTB, TB_ADDBUTTONS, 5, (LPARAM)(&rgtb); /// /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-setimagelist TB_SETIMAGELIST = WindowMessage.WM_USER + 48, /// /// Retrieves the image list that a toolbar control uses to display buttons in their default state. A toolbar control uses this /// image list to display buttons when they are not hot or disabled. /// - /// Must be zero. - /// Must be zero. - /// Returns the handle to the image list, or NULL if no image list is set. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns the handle to the image list, or NULL if no image list is set. + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-getimagelist TB_GETIMAGELIST = WindowMessage.WM_USER + 49, /// Loads system-defined button images into a toolbar control's image list. - /// + /// Parameters + /// wParam /// Identifier of a system-defined button image list. This parameter can be set to one of the following values. /// /// @@ -661,242 +876,325 @@ namespace Vanara.PInvoke /// Meaning /// /// - /// IDB_HIST_LARGE_COLOR + /// IDB_HIST_LARGE_COLOR /// Windows Explorer bitmaps in large size. /// /// - /// IDB_HIST_SMALL_COLOR + /// IDB_HIST_SMALL_COLOR /// Windows Explorer bitmaps in small size. /// /// - /// IDB_STD_LARGE_COLOR + /// IDB_STD_LARGE_COLOR /// Standard bitmaps in large size. /// /// - /// IDB_STD_SMALL_COLOR + /// IDB_STD_SMALL_COLOR /// Standard bitmaps in small size. /// /// - /// IDB_VIEW_LARGE_COLOR + /// IDB_VIEW_LARGE_COLOR /// View bitmaps in large size. /// /// - /// IDB_VIEW_SMALL_COLOR + /// IDB_VIEW_SMALL_COLOR /// View bitmaps in small size. /// /// - /// IDB_HIST_NORMAL + /// IDB_HIST_NORMAL /// Windows Explorer travel buttons and favorites bitmaps in normal state. /// /// - /// IDB_HIST_HOT + /// IDB_HIST_HOT /// Windows Explorer travel buttons and favorites bitmaps in hot state. /// /// - /// IDB_HIST_DISABLED + /// IDB_HIST_DISABLED /// Windows Explorer travel buttons and favorites bitmaps in disabled state. /// /// - /// IDB_HIST_PRESSED + /// IDB_HIST_PRESSED /// Windows Explorer travel buttons and favorites bitmaps in pressed state. /// /// - /// - /// Instance handle. This parameter must be set to HINST_COMMCTRL. - /// + /// lParam + /// Instance handle. This parameter must be set to HINST_COMMCTRL. + /// Returns + /// /// The count of images in the image list. Returns zero if the toolbar has no image list or if the existing image list is empty. - /// + /// /// /// You must use the proper image index values when you prepare TBBUTTON structures prior to sending the /// TB_ADDBUTTONS message. For a list of image index values for these preset bitmaps, see Toolbar Standard Button Image /// Index Values. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-loadimages TB_LOADIMAGES = WindowMessage.WM_USER + 50, /// Retrieves the bounding rectangle for a specified toolbar button. - /// Command identifier of the button. - /// Pointer to a RECT structure that will receive the bounding rectangle information. - /// Returns nonzero if successful, or zero otherwise. + /// Parameters + /// wParam + /// Command identifier of the button. + /// lParam + /// Pointer to a RECT structure that will receive the bounding rectangle information. + /// Returns + /// Returns nonzero if successful, or zero otherwise. /// /// This message does not retrieve the bounding rectangle for buttons whose state is set to the TBSTATE_HIDDEN value. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-getrect TB_GETRECT = WindowMessage.WM_USER + 51, /// Sets the image list that the toolbar control will use to display hot buttons. - /// Must be zero. - /// Handle to the image list that will be set. - /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Handle to the image list that will be set. + /// Returns + /// /// Returns the handle to the image list previously used to display hot buttons, or NULL if no image list was previously set. - /// + /// /// /// A button is hot when the cursor is over it. Toolbar controls must have the TBSTYLE_FLAT or TBSTYLE_LIST style /// to have hot items. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-sethotimagelist TB_SETHOTIMAGELIST = WindowMessage.WM_USER + 52, /// Retrieves the image list that a toolbar control uses to display hot buttons. - /// Must be zero. - /// Must be zero. - /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// /// Returns the handle to the image list that the control uses to display hot buttons, or NULL if no hot image list is set. - /// + /// /// /// A button is hot when the cursor is over it. Toolbar controls must have the TBSTYLE_FLAT or TBSTYLE_LIST style /// to have hot items. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-gethotimagelist TB_GETHOTIMAGELIST = WindowMessage.WM_USER + 53, /// Sets the image list that the toolbar control will use to display disabled buttons. - /// Must be zero. - /// Handle to the image list that will be set. - /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Handle to the image list that will be set. + /// Returns + /// /// Returns the handle to the image list previously used to display disabled buttons, or NULL if no image list was /// previously set. - /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-setdisabledimagelist TB_SETDISABLEDIMAGELIST = WindowMessage.WM_USER + 54, /// Retrieves the image list that a toolbar control uses to display inactive buttons. - /// Must be zero. - /// Must be zero. - /// Returns the handle to the inactive image list, or NULL if no inactive image list is set. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns the handle to the inactive image list, or NULL if no inactive image list is set. + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-getdisabledimagelist TB_GETDISABLEDIMAGELIST = WindowMessage.WM_USER + 55, /// Sets the style for a toolbar control. - /// Must be zero. - /// - /// Value specifying the styles to be set for the control. This value can be a combination of toolbar control styles. - /// - /// No return value. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Value specifying the styles to be set for the control. This value can be a combination of toolbar control styles. + /// Returns + /// No return value. + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-setstyle TB_SETSTYLE = WindowMessage.WM_USER + 56, /// Retrieves the styles currently in use for a toolbar control. - /// Must be zero. - /// Must be zero. - /// Returns a DWORD value that is a combination of toolbar control styles. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns a DWORD value that is a combination of toolbar control styles. + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-getstyle TB_GETSTYLE = WindowMessage.WM_USER + 57, /// Retrieves the current width and height of toolbar buttons, in pixels. - /// Must be zero. - /// Must be zero. - /// Returns a DWORD value that contains the width and height values in the low word and high word, respectively. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns a DWORD value that contains the width and height values in the low word and high word, respectively. + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-getbuttonsize TB_GETBUTTONSIZE = WindowMessage.WM_USER + 58, /// Sets the minimum and maximum button widths in the toolbar control. - /// Must be zero. - /// - /// - /// The LOWORD specifies the minimum button width, in pixels. Toolbar buttons will never be narrower than this value. - /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// The LOWORD specifies the minimum button width, in pixels. Toolbar buttons will never be narrower than this value. /// /// The HIWORD specifies the maximum button width, in pixels. If button text is too wide, the control displays it with /// ellipsis points. /// - /// - /// Returns nonzero if successful, or zero otherwise. + /// Returns + /// Returns nonzero if successful, or zero otherwise. /// /// Use TB_SETBUTTONWIDTH to set the maximum and minimum allowed widths for buttons before they are added. Use /// TB_SETBUTTONSIZE to set the actual size of buttons. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-setbuttonwidth TB_SETBUTTONWIDTH = WindowMessage.WM_USER + 59, /// Sets the maximum number of text rows displayed on a toolbar button. - /// Maximum number of rows of text that can be displayed. - /// Must be zero. - /// Returns nonzero if successful, or zero otherwise. + /// Parameters + /// wParam + /// Maximum number of rows of text that can be displayed. + /// lParam + /// Must be zero. + /// Returns + /// Returns nonzero if successful, or zero otherwise. /// - /// To cause text to wrap, you must set the maximum button width by sending a TB_SETBUTTONWIDTH message. The text wraps - /// at a word break; line breaks ("\n") in the text are ignored. Text in TBSTYLE_LIST toolbars is always shown on a single line. + /// To cause text to wrap, you must set the maximum button width by sending a TB_SETBUTTONWIDTH message. The text wraps at + /// a word break; line breaks ("\n") in the text are ignored. Text in TBSTYLE_LIST toolbars is always shown on a single line. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-setmaxtextrows TB_SETMAXTEXTROWS = WindowMessage.WM_USER + 60, /// Retrieves the maximum number of text rows that can be displayed on a toolbar button. - /// Must be zero. - /// Must be zero. - /// Returns an INT value representing the maximum number of text rows that the control will display for a button. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns an INT value representing the maximum number of text rows that the control will display for a button. + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-gettextrows TB_GETTEXTROWS = WindowMessage.WM_USER + 61, /// Retrieves the IDropTarget for a toolbar control. - /// Identifier of the interface being requested. This value must point to IID_IDropTarget. - /// - /// Address that receives the interface pointer. If an error occurs, a NULL pointer is placed in this address. - /// - /// Returns an HRESULT value indicating success or failure of the operation. + /// Parameters + /// wParam + /// Identifier of the interface being requested. This value must point to IID_IDropTarget. + /// lParam + /// Address that receives the interface pointer. If an error occurs, a NULL pointer is placed in this address. + /// Returns + /// Returns an HRESULT value indicating success or failure of the operation. /// The toolbar's IDropTarget is used by the toolbar when objects are dragged over or dropped onto it. + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-getobject TB_GETOBJECT = WindowMessage.WM_USER + 62, /// Retrieves extended information for a button in a toolbar. - /// Command identifier of the button. - /// + /// Parameters + /// wParam + /// Command identifier of the button. + /// lParam + /// /// Pointer to a TBBUTTONINFO structure that receives the button information. The cbSize and dwMask members /// of this structure must be filled in prior to sending this message. - /// - /// Returns the zero-based index of the button, or -1 if an error occurs. + /// + /// Returns + /// Returns the zero-based index of the button, or -1 if an error occurs. /// /// When you use TB_ADDBUTTONS or TB_INSERTBUTTON to place buttons on the toolbar, the button text is commonly /// specified by its string pool index. TB_GETBUTTONINFO will not retrieve this string. To use TB_GETBUTTONINFO to - /// retrieve button text, you must first set the text string with TB_SETBUTTONINFO. Once you have set the button text - /// with TB_SETBUTTONINFO, you can no longer use the string pool index. + /// retrieve button text, you must first set the text string with TB_SETBUTTONINFO. Once you have set the button text with + /// TB_SETBUTTONINFO, you can no longer use the string pool index. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-getbuttoninfo TB_GETBUTTONINFOW = WindowMessage.WM_USER + 63, /// Sets the information for an existing button in a toolbar. - /// Button identifier. - /// + /// Parameters + /// wParam + /// Button identifier. + /// lParam + /// /// Pointer to a TBBUTTONINFO structure that contains the new button information. The cbSize and dwMask /// members of this structure must be filled in prior to sending this message. - /// - /// Returns nonzero if successful, or zero otherwise. + /// + /// Returns + /// Returns nonzero if successful, or zero otherwise. /// /// Text is commonly assigned to buttons when they are added to a toolbar by specifying the index of a string in the toolbar's /// string pool. If you use a TB_SETBUTTONINFO to assign new text to a button, it will permanently override the text from /// the string pool. You can change the text by calling TB_SETBUTTONINFO again, but you cannot reassign the string from /// the string pool. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-setbuttoninfo TB_SETBUTTONINFOW = WindowMessage.WM_USER + 64, /// Retrieves extended information for a button in a toolbar. - /// Command identifier of the button. - /// + /// Parameters + /// wParam + /// Command identifier of the button. + /// lParam + /// /// Pointer to a TBBUTTONINFO structure that receives the button information. The cbSize and dwMask members /// of this structure must be filled in prior to sending this message. - /// - /// Returns the zero-based index of the button, or -1 if an error occurs. + /// + /// Returns + /// Returns the zero-based index of the button, or -1 if an error occurs. /// /// When you use TB_ADDBUTTONS or TB_INSERTBUTTON to place buttons on the toolbar, the button text is commonly /// specified by its string pool index. TB_GETBUTTONINFO will not retrieve this string. To use TB_GETBUTTONINFO to - /// retrieve button text, you must first set the text string with TB_SETBUTTONINFO. Once you have set the button text - /// with TB_SETBUTTONINFO, you can no longer use the string pool index. + /// retrieve button text, you must first set the text string with TB_SETBUTTONINFO. Once you have set the button text with + /// TB_SETBUTTONINFO, you can no longer use the string pool index. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-getbuttoninfo TB_GETBUTTONINFOA = WindowMessage.WM_USER + 65, /// Sets the information for an existing button in a toolbar. - /// Button identifier. - /// + /// Parameters + /// wParam + /// Button identifier. + /// lParam + /// /// Pointer to a TBBUTTONINFO structure that contains the new button information. The cbSize and dwMask /// members of this structure must be filled in prior to sending this message. - /// - /// Returns nonzero if successful, or zero otherwise. + /// + /// Returns + /// Returns nonzero if successful, or zero otherwise. /// /// Text is commonly assigned to buttons when they are added to a toolbar by specifying the index of a string in the toolbar's /// string pool. If you use a TB_SETBUTTONINFO to assign new text to a button, it will permanently override the text from /// the string pool. You can change the text by calling TB_SETBUTTONINFO again, but you cannot reassign the string from /// the string pool. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-setbuttoninfo TB_SETBUTTONINFOA = WindowMessage.WM_USER + 66, /// Inserts a button in a toolbar. - /// Zero-based index of a button. The message inserts the new button to the left of this button. - /// Pointer to a TBBUTTON structure containing information about the button to insert. - /// Returns TRUE if successful, or FALSE otherwise. + /// Parameters + /// wParam + /// Zero-based index of a button. The message inserts the new button to the left of this button. + /// lParam + /// Pointer to a TBBUTTON structure containing information about the button to insert. + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-insertbutton TB_INSERTBUTTONW = WindowMessage.WM_USER + 67, /// Adds one or more buttons to a toolbar. - /// Number of buttons to add. - /// + /// Parameters + /// wParam + /// Number of buttons to add. + /// lParam + /// /// Pointer to an array of TBBUTTON structures that contain information about the buttons to add. There must be the same /// number of elements in the array as buttons specified by wParam. - /// - /// Returns TRUE if successful, or FALSE otherwise. + /// + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. /// /// /// If the toolbar was created using the CreateWindowEx function, you must send the TB_BUTTONSTRUCTSIZE message to @@ -904,208 +1202,310 @@ namespace Vanara.PInvoke /// /// See TB_SETIMAGELIST for a discussion of how to assign bitmaps to toolbar buttons from one or more image lists. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-addbuttons TB_ADDBUTTONSW = WindowMessage.WM_USER + 68, /// Determines where a point lies in a toolbar control. - /// Must be zero. - /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// /// Pointer to a POINT structure that contains the x-coordinate of the hit test in the x member and the /// y-coordinate of the hit test in the y member. The coordinates are relative to the toolbar's client area. - /// - /// + /// + /// Returns + /// /// Returns an integer value. If the return value is zero or a positive value, it is the zero-based index of the nonseparator /// item in which the point lies. If the return value is negative, the point does not lie within a button. The absolute value of /// the return value is the index of a separator item or the nearest nonseparator item. - /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-hittest TB_HITTEST = WindowMessage.WM_USER + 69, /// Sets the text drawing flags for the toolbar. - /// + /// Parameters + /// wParam + /// /// One or more of the DT_ flags, specified in DrawText, that indicate which bits in lParam will be used when drawing the text. - /// - /// + /// + /// lParam + /// /// One or more of the DT_ flags, specified in DrawText, that indicate how the button text will be drawn. This value will /// be passed to the DrawText function when the button text is drawn. - /// - /// Returns the previous text drawing flags. + /// + /// Returns + /// Returns the previous text drawing flags. /// /// The wParam parameter allows you to specify which flags will be used when drawing the text, even if these flags are turned /// off. For example, if you do not want the DT_CENTER flag used when drawing text, you would add the DT_CENTER flag to wParam /// and not specify the DT_CENTER flag in lParam. This prevents the control from passing the DT_CENTER flag to the /// DrawText function. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-setdrawtextflags TB_SETDRAWTEXTFLAGS = WindowMessage.WM_USER + 70, /// Retrieves the index of the hot item in a toolbar. - /// Must be zero. - /// Must be zero. - /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// /// Returns the index of the hot item, or -1 if no hot item is set. Toolbar controls that do not have the TBSTYLE_FLAT /// style do not have hot items. - /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-gethotitem TB_GETHOTITEM = WindowMessage.WM_USER + 71, /// Sets the hot item in a toolbar. - /// Index of the item that will be made hot. If this value is -1, none of the items will be hot. - /// Must be zero. - /// Returns the index of the previous hot item, or -1 if there was no hot item. + /// Parameters + /// wParam + /// Index of the item that will be made hot. If this value is -1, none of the items will be hot. + /// lParam + /// Must be zero. + /// Returns + /// Returns the index of the previous hot item, or -1 if there was no hot item. /// The behavior of this message is not defined for toolbars that do not have the TBSTYLE_FLAT style. + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-sethotitem TB_SETHOTITEM = WindowMessage.WM_USER + 72, /// Sets the anchor highlight setting for a toolbar. - /// - /// BOOL value that specifies if anchor highlighting is enabled or disabled. If this value is nonzero, anchor - /// highlighting will be enabled. If this value is zero, anchor highlighting will be disabled. - /// - /// Must be zero. - /// + /// Parameters + /// wParam + /// + /// BOOL value that specifies if anchor highlighting is enabled or disabled. If this value is nonzero, anchor highlighting + /// will be enabled. If this value is zero, anchor highlighting will be disabled. + /// + /// lParam + /// Must be zero. + /// Returns + /// /// Returns the previous anchor highlight setting. If this value is nonzero, anchor highlighting was enabled. If this value is /// zero, anchor highlighting was disabled. - /// + /// /// /// Anchor highlighting in a toolbar means that the last highlighted item will remain highlighted until another item is /// highlighted. This occurs even if the cursor leaves the toolbar control. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-setanchorhighlight TB_SETANCHORHIGHLIGHT = WindowMessage.WM_USER + 73, /// Retrieves the anchor highlight setting for a toolbar. - /// Must be zero. - /// Must be zero. - /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// /// Returns a Boolean value that indicates if anchor highlighting is set. If this value is nonzero, anchor highlighting is /// enabled. If this value is zero, it is disabled. - /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-getanchorhighlight TB_GETANCHORHIGHLIGHT = WindowMessage.WM_USER + 74, /// Determines the ID of the button that corresponds to the specified accelerator character. - /// The accelerator character. - /// + /// Parameters + /// wParam + /// The accelerator character. + /// lParam + /// /// Pointer to a UINT. On return, if successful, this parameter will hold the id of the button that has wParam as its /// accelerator character. - /// - /// Returns a nonzero value if one of the buttons has wParam as its accelerator character, or zero otherwise. + /// + /// Returns + /// Returns a nonzero value if one of the buttons has wParam as its accelerator character, or zero otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-mapaccelerator TB_MAPACCELERATORA = WindowMessage.WM_USER + 78, /// Retrieves the current insertion mark for the toolbar. - /// Must be zero. - /// Pointer to a TBINSERTMARK structure that receives the insertion mark. - /// Always returns TRUE. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Pointer to a TBINSERTMARK structure that receives the insertion mark. + /// Returns + /// Always returns TRUE. + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-getinsertmark TB_GETINSERTMARK = WindowMessage.WM_USER + 79, /// Sets the current insertion mark for the toolbar. - /// Must be zero. - /// Pointer to a TBINSERTMARK structure that contains the insertion mark. - /// The return value for this message is not used. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Pointer to a TBINSERTMARK structure that contains the insertion mark. + /// Returns + /// The return value for this message is not used. + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-setinsertmark TB_SETINSERTMARK = WindowMessage.WM_USER + 80, /// Retrieves the insertion mark information for a point in a toolbar. - /// - /// Pointer to a POINT structure that contains the hit test coordinates, relative to the client area of the toolbar. - /// - /// Pointer to a TBINSERTMARK structure that receives the insertion mark information. - /// Returns nonzero if the point is an insertion mark, or zero otherwise. + /// Parameters + /// wParam + /// Pointer to a POINT structure that contains the hit test coordinates, relative to the client area of the toolbar. + /// lParam + /// Pointer to a TBINSERTMARK structure that receives the insertion mark information. + /// Returns + /// Returns nonzero if the point is an insertion mark, or zero otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-insertmarkhittest TB_INSERTMARKHITTEST = WindowMessage.WM_USER + 81, /// Moves a button from one index to another. - /// Zero-based index of the button to be moved. - /// Zero-based index where the button will be moved. - /// Returns nonzero if successful, or zero otherwise. + /// Parameters + /// wParam + /// Zero-based index of the button to be moved. + /// lParam + /// Zero-based index where the button will be moved. + /// Returns + /// Returns nonzero if successful, or zero otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-movebutton TB_MOVEBUTTON = WindowMessage.WM_USER + 82, /// Retrieves the total size of all of the visible buttons and separators in the toolbar. - /// Must be zero. - /// Pointer to a SIZE structure that receives the size of the items. - /// Returns nonzero if successful, or zero otherwise. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Pointer to a SIZE structure that receives the size of the items. + /// Returns + /// Returns nonzero if successful, or zero otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-getmaxsize TB_GETMAXSIZE = WindowMessage.WM_USER + 83, /// Sets the extended styles for a toolbar control. - /// Must be zero. - /// Value specifying the new extended styles. This parameter can be a combination of extended styles. - /// - /// Returns a DWORD that represents the previous extended styles. This value can be a combination of extended styles. - /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Value specifying the new extended styles. This parameter can be a combination of extended styles. + /// Returns + /// Returns a DWORD that represents the previous extended styles. This value can be a combination of extended styles. + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-setextendedstyle TB_SETEXTENDEDSTYLE = WindowMessage.WM_USER + 84, /// Retrieves the extended styles for a toolbar control. - /// Must be zero. - /// Must be zero. - /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// /// Returns a DWORD that represents the styles currently in use for the toolbar control. This value can be a combination /// of extended styles. - /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-getextendedstyle TB_GETEXTENDEDSTYLE = WindowMessage.WM_USER + 85, /// Retrieves the padding for a toolbar control. - /// Must be zero. - /// Must be zero. - /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// /// Returns a DWORD value that contains the horizontal padding in the low word and the vertical padding in the high word, /// in pixels. - /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-getpadding TB_GETPADDING = WindowMessage.WM_USER + 86, /// Sets the padding for a toolbar control. - /// Must be zero. - /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// /// The LOWORD specifies the horizontal padding, in pixels. The HIWORD specifies the vertical padding, in pixels. - /// - /// + /// + /// Returns + /// /// Returns a DWORD value that contains the previous horizontal padding in the LOWORD and the previous vertical /// padding in the HIWORD, in pixels. - /// + /// /// /// The padding values are used to create a blank area between the edge of the button and the button's image and/or text. Where /// and how much padding is actually applied depends on the type of the button and whether it has an image. The horizontal /// padding is applied to both the right and left of the button, and the vertical padding is applied to both the top and bottom /// of the button. Padding is only applied to buttons that have the TBSTYLE_AUTOSIZE style. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-setpadding TB_SETPADDING = WindowMessage.WM_USER + 87, /// Sets the color used to draw the insertion mark for the toolbar. - /// Must be zero. - /// COLORREF value that contains the new insertion mark color. - /// Returns a COLORREF value that contains the previous insertion mark color. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// COLORREF value that contains the new insertion mark color. + /// Returns + /// Returns a COLORREF value that contains the previous insertion mark color. + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-setinsertmarkcolor TB_SETINSERTMARKCOLOR = WindowMessage.WM_USER + 88, /// Retrieves the color used to draw the insertion mark for the toolbar. - /// Must be zero. - /// Must be zero. - /// Returns a COLORREF value that contains the current insertion mark color. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns a COLORREF value that contains the current insertion mark color. + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-getinsertmarkcolor TB_GETINSERTMARKCOLOR = WindowMessage.WM_USER + 89, /// Determines the ID of the button that corresponds to the specified accelerator character. - /// The accelerator character. - /// + /// Parameters + /// wParam + /// The accelerator character. + /// lParam + /// /// Pointer to a UINT. On return, if successful, this parameter will hold the id of the button that has wParam as its /// accelerator character. - /// - /// Returns a nonzero value if one of the buttons has wParam as its accelerator character, or zero otherwise. + /// + /// Returns + /// Returns a nonzero value if one of the buttons has wParam as its accelerator character, or zero otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-mapaccelerator TB_MAPACCELERATORW = WindowMessage.WM_USER + 90, /// Retrieves a string from a toolbar's string pool. - /// + /// Parameters + /// wParam + /// /// The LOWORD specifies the length of the lParam buffer, in bytes. The HIWORD specifies the index of the string. - /// - /// Pointer to a buffer used to return the string. - /// Returns the string length if successful, or -1 otherwise. + /// + /// lParam + /// Pointer to a buffer used to return the string. + /// Returns + /// Returns the string length if successful, or -1 otherwise. /// /// This message returns the specified string from the toolbar's string pool. It does not necessarily correspond to the text /// string currently being displayed by a button. To retrieve a button's current text string, send the toolbar a /// TB_GETBUTTONTEXT message. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-getstring TB_GETSTRINGW = WindowMessage.WM_USER + 91, /// Retrieves a string from a toolbar's string pool. - /// + /// Parameters + /// wParam + /// /// The LOWORD specifies the length of the lParam buffer, in bytes. The HIWORD specifies the index of the string. - /// - /// Pointer to a buffer used to return the string. - /// Returns the string length if successful, or -1 otherwise. + /// + /// lParam + /// Pointer to a buffer used to return the string. + /// Returns + /// Returns the string length if successful, or -1 otherwise. /// /// This message returns the specified string from the toolbar's string pool. It does not necessarily correspond to the text /// string currently being displayed by a button. To retrieve a button's current text string, send the toolbar a /// TB_GETBUTTONTEXT message. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-getstring TB_GETSTRINGA = WindowMessage.WM_USER + 92, /// @@ -1114,26 +1514,34 @@ namespace Vanara.PInvoke /// /// Sets the bounding size for a multi-column toolbar control. /// - /// Must be zero. - /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// /// Pointer to a SIZE structure whose cy member contains the bounding height. The cx member (the width) is ignored. - /// - /// The return value is not used. + /// + /// Returns + /// The return value is not used. /// /// The bounding size controls how buttons are organized into columns. If the toolbar control does not have the /// TBSTYLE_EX_MULTICOLUMN style, this message has no effect. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-setboundingsize TB_SETBOUNDINGSIZE = WindowMessage.WM_USER + 93, /// Sets the hot item in a toolbar. - /// Index of the item that will be made hot. If this value is -1, none of the items will be hot. - /// + /// Parameters + /// wParam + /// Index of the item that will be made hot. If this value is -1, none of the items will be hot. + /// lParam /// A combination of HICF\_xxx flags. See /// **NMTBHOTITEM** /// . - /// - /// Returns the index of the previous hot item, or -1 if there was no hot item. + /// Returns + /// Returns the index of the previous hot item, or -1 if there was no hot item. /// The behavior of this message is not defined for toolbars that do not have the TBSTYLE_FLAT style. + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-sethotitem2 TB_SETHOTITEM2 = WindowMessage.WM_USER + 94, /// @@ -1142,90 +1550,141 @@ namespace Vanara.PInvoke /// /// Retrieves a count of toolbar buttons that have the specified accelerator character. /// - /// A WCHAR representing the input accelerator character to test. - /// Pointer to an int that receives the number of buttons that have the accelerator character. - /// The return value is not used. + /// Parameters + /// wParam + /// A WCHAR representing the input accelerator character to test. + /// lParam + /// Pointer to an int that receives the number of buttons that have the accelerator character. + /// Returns + /// The return value is not used. /// /// First, the system queries all toolbar buttons for matching accelerators. If no matches are found, the system sends the /// TBN_MAPACCELERATOR notification to the parent window, requesting the index of the button that has the specified accelerator /// character. If the parent provides an index, the count is set to 1. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-hasaccelerator TB_HASACCELERATOR = WindowMessage.WM_USER + 95, /// Sets the distance between the toolbar buttons on a specific toolbar. - /// The gap, in pixels, between buttons on the toolbar. - /// Ignored. - /// No return value. + /// Parameters + /// wParam + /// The gap, in pixels, between buttons on the toolbar. + /// lParam + /// Ignored. + /// Returns + /// No return value. /// /// The gap between buttons only applies to the toolbar control window that receives this message. Receipt of this message /// triggers a repaint of the toolbar, if the toolbar is currently visible. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-setlistgap TB_SETLISTGAP = WindowMessage.WM_USER + 96, /// Gets the number of image lists associated with the toolbar. - /// Must be zero. - /// Must be zero. - /// Returns the number of image lists. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns the number of image lists. + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-getimagelistcount TB_GETIMAGELISTCOUNT = WindowMessage.WM_USER + 98, /// Gets the ideal size of the toolbar. - /// + /// Parameters + /// wParam + /// /// A **BOOL** that indicates whether to retrieve the ideal height or width of the toolbar. Use **TRUE** to retrieve the ideal /// height, **FALSE** to retrieve the ideal width. - /// - /// + /// + /// lParam + /// /// Pointer to a SIZE structure that receives the height or width at which all buttons would be displayed. If wParam is /// TRUE, only the cy member (height) is valid. If wParam is FALSE, only the cx member (width) is valid. - /// - /// Returns TRUE if successful, or FALSE otherwise. + /// + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-getidealsize TB_GETIDEALSIZE = WindowMessage.WM_USER + 99, /// Retrieves the metrics of a toolbar control. - /// Must be zero. - /// Pointer to a TBMETRICS structure that receives the toolbar metrics. - /// The return value is not used. - /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Pointer to a TBMETRICS structure that receives the toolbar metrics. + /// Returns + /// The return value is not used. + /// + /// Note + /// + /// To use this message, you must provide a manifest specifying Comclt32.dll version 6.0. For more information on manifests, see + /// Enabling Visual Styles. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-getmetrics TB_GETMETRICS = WindowMessage.WM_USER + 101, /// Sets the metrics of a toolbar control. - /// Must be zero. - /// TBMETRICS structure that contains the toolbar metrics to set. - /// The return value is not used. - /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// TBMETRICS structure that contains the toolbar metrics to set. + /// Returns + /// The return value is not used. + /// + /// Note + /// + /// To use this message, you must provide a manifest specifying Comclt32.dll version 6.0. For more information on manifests, see + /// Enabling Visual Styles. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-setmetrics TB_SETMETRICS = WindowMessage.WM_USER + 102, /// Gets the bounding rectangle of the dropdown window for a toolbar item with style BTNS_DROPDOWN. - /// The zero-based index of the toolbar control item for which to retrieve the bounding rectangle. - /// + /// Parameters + /// wParam + /// The zero-based index of the toolbar control item for which to retrieve the bounding rectangle. + /// lParam /// A pointer to a /// **RECT** /// - /// structure to receive the bounding rectangle information. The message sender is responsible for allocating this structure. - /// The coordinates returned in the **RECT** structure are expressed as client coordinates. + /// structure to receive the bounding rectangle information. The message sender is responsible for allocating this structure. The + /// coordinates returned in the **RECT** structure are expressed as client coordinates. /// - /// - /// Always returns nonzero. + /// Returns + /// Always returns nonzero. /// The item must have the BTNS_DROPDOWN style. + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-getitemdropdownrect TB_GETITEMDROPDOWNRECT = WindowMessage.WM_USER + 103, /// Sets the image list that the toolbar uses to display buttons that are in a pressed state. - /// + /// Parameters + /// wParam + /// /// The index of the image list. If you use only one image list, set this parameter to zero. See Remarks for details on using /// multiple image lists. - /// - /// - /// Handle to the image list to set. If this parameter is NULL, no images are displayed in the buttons. - /// - /// + /// + /// lParam + /// Handle to the image list to set. If this parameter is NULL, no images are displayed in the buttons. + /// Returns + /// /// Returns the handle to the image list previously used to display buttons in their pressed state, or NULL if no such /// image list was previously set. - /// + /// /// /// + /// Note + /// Your application is responsible for freeing the image list after the toolbar is destroyed. + /// + /// /// The TB_SETPRESSEDIMAGELIST message cannot be combined with TB_ADDBITMAP. It also cannot be used with toolbars /// created with CreateToolbarEx, which calls TB_ADDBITMAP internally. When you create a toolbar with - /// CreateToolbarEx or use TB_ADDBITMAP to add images, the toolbar manages the image list internally. Attempting - /// to modify it with TB_SETPRESSEDIMAGELIST has unpredictable consequences. + /// CreateToolbarEx or use TB_ADDBITMAP to add images, the toolbar manages the image list internally. Attempting to + /// modify it with TB_SETPRESSEDIMAGELIST has unpredictable consequences. /// /// Button images need not come from the same image list. To use multiple image lists for your toolbar button images: /// @@ -1279,12 +1738,18 @@ namespace Vanara.PInvoke /// // Enable multiple image lists SendMessage(hwndTB, CCM_SETVERSION, (WPARAM) 5, 0); //Set the image lists and assign them IDs of 0-2 SendMessage(hwndTB, TB_SETPRESSEDIMAGELIST, 0, (LPARAM)ahiml[0]); SendMessage(hwndTB, TB_SETPRESSEDIMAGELIST, 1, (LPARAM)ahiml[1]); SendMessage(hwndTB, TB_SETPRESSEDIMAGELIST, 2, (LPARAM)ahiml[2]); // Create the five buttons TBBUTTON rgtb[5]; //... initialize the TBBUTTON structures as usual ... //Assign images to each button rgtb[0].iBitmap = MAKELONG(1, 0); rgtb[1].iBitmap = MAKELONG(1, 1); rgtb[2].iBitmap = MAKELONG(1, 2); rgtb[3].iBitmap = MAKELONG(2, 0); rgtb[4].iBitmap = MAKELONG(3, 1); // Add the five buttons to the toolbar control SendMessage(hwndTB, TB_ADDBUTTONS, 5, (LPARAM)(&rgtb); /// /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-setpressedimagelist TB_SETPRESSEDIMAGELIST = WindowMessage.WM_USER + 104, /// Gets the image list that a toolbar control uses to display buttons in a pressed state. - /// Must be zero. - /// Must be zero. - /// Returns the handle to the image list, or NULL if no image list is set. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns the handle to the image list, or NULL if no image list is set. + // https://docs.microsoft.com/en-us/windows/win32/controls/tb-getpressedimagelist TB_GETPRESSEDIMAGELIST = WindowMessage.WM_USER + 105, } @@ -1301,18 +1766,21 @@ namespace Vanara.PInvoke /// TBN_GETBUTTONINFO lpnmtb = (LPNMTOOLBAR) lParam; /// /// - /// + /// Parameters + /// lParam + /// /// Pointer to an NMTOOLBAR structure. The iItem member specifies a zero-based index that provides a count of the /// buttons the Customize Toolbar dialog box displays as both available and present on the toolbar. The pszText member /// specifies the address of the current button text, and cchText specifies its length in characters. The application /// should fill the structure with information about the button. - /// - /// Returns TRUE if button information was copied to the specified structure, or FALSE otherwise. + /// + /// Returns + /// Returns TRUE if button information was copied to the specified structure, or FALSE otherwise. /// /// The toolbar control allocates a buffer, and the receiver (parent window) must copy the text into that buffer. The - /// cchText member contains the length of the buffer allocated by the toolbar when TBN_GETBUTTONINFO is sent to the - /// parent window. + /// cchText member contains the length of the buffer allocated by the toolbar when TBN_GETBUTTONINFO is sent to the parent window. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tbn-getbuttoninfo TBN_GETBUTTONINFOA = TBN_FIRST - 0, /// @@ -1324,25 +1792,33 @@ namespace Vanara.PInvoke /// TBN_BEGINDRAG lpnmtb = (LPNMTOOLBAR) lParam; /// /// - /// + /// Parameters + /// lParam + /// /// Pointer to an NMTOOLBAR structure. The iItem member contains the command identifier of the button being dragged. - /// - /// No return value. + /// + /// Returns + /// No return value. + // https://docs.microsoft.com/en-us/windows/win32/controls/tbn-begindrag TBN_BEGINDRAG = TBN_FIRST - 1, /// /// - /// Notifies the toolbar's parent window that the user has stopped dragging a button in a toolbar. This notification code is - /// sent in the form of a WM_NOTIFY message. + /// Notifies the toolbar's parent window that the user has stopped dragging a button in a toolbar. This notification code is sent + /// in the form of a WM_NOTIFY message. /// /// /// TBN_ENDDRAG lpnmtb = (LPNMTOOLBAR) lParam; /// /// - /// + /// Parameters + /// lParam + /// /// Pointer to an NMTOOLBAR structure. The iItem member contains the command identifier of the button being dragged. - /// - /// No return value. + /// + /// Returns + /// No return value. + // https://docs.microsoft.com/en-us/windows/win32/controls/tbn-enddrag TBN_ENDDRAG = TBN_FIRST - 2, /// @@ -1354,8 +1830,12 @@ namespace Vanara.PInvoke /// TBN_BEGINADJUST lpnmhdr = (LPNMHDR) lParam; /// /// - /// Pointer to an NMHDR structure that contains information about the notification code. - /// No return value. + /// Parameters + /// lParam + /// Pointer to an NMHDR structure that contains information about the notification code. + /// Returns + /// No return value. + // https://docs.microsoft.com/en-us/windows/win32/controls/tbn-beginadjust TBN_BEGINADJUST = TBN_FIRST - 3, /// @@ -1367,8 +1847,12 @@ namespace Vanara.PInvoke /// TBN_ENDADJUST lpnmhdr = (LPNMHDR) lParam; /// /// - /// Pointer to an NMHDR structure that contains information about the notification code. - /// No return value. + /// Parameters + /// lParam + /// Pointer to an NMHDR structure that contains information about the notification code. + /// Returns + /// No return value. + // https://docs.microsoft.com/en-us/windows/win32/controls/tbn-endadjust TBN_ENDADJUST = TBN_FIRST - 4, /// @@ -1380,8 +1864,12 @@ namespace Vanara.PInvoke /// TBN_RESET lpnmhdr = (LPNMHDR) lParam; /// /// - /// Pointer to an NMHDR structure that contains information about the notification code. - /// Return TBNRF_ENDCUSTOMIZE to close the Customize Toolbar dialog box. All other return values are ignored. + /// Parameters + /// lParam + /// Pointer to an NMHDR structure that contains information about the notification code. + /// Returns + /// Return TBNRF_ENDCUSTOMIZE to close the Customize Toolbar dialog box. All other return values are ignored. + // https://docs.microsoft.com/en-us/windows/win32/controls/tbn-reset TBN_RESET = TBN_FIRST - 5, /// @@ -1393,13 +1881,17 @@ namespace Vanara.PInvoke /// TBN_QUERYINSERT lpnmtb = (LPNMTOOLBAR) lParam; /// /// - /// + /// Parameters + /// lParam + /// /// Pointer to an NMTOOLBAR structure. The iItem member contains the zero-based index of the button to be inserted. - /// - /// + /// + /// Returns + /// /// Return TRUE to allow a button to be inserted in front of the given button, or FALSE to prevent the button from /// being inserted. - /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tbn-queryinsert TBN_QUERYINSERT = TBN_FIRST - 6, /// @@ -1411,10 +1903,14 @@ namespace Vanara.PInvoke /// TBN_QUERYDELETE lpnmtb = (LPNMTOOLBAR) lParam; /// /// - /// + /// Parameters + /// lParam + /// /// Pointer to an NMTOOLBAR structure. The iItem member contains the zero-based index of the button to be deleted. - /// - /// Returns TRUE to allow the button to be deleted, or FALSE to prevent the button from being deleted. + /// + /// Returns + /// Returns TRUE to allow the button to be deleted, or FALSE to prevent the button from being deleted. + // https://docs.microsoft.com/en-us/windows/win32/controls/tbn-querydelete TBN_QUERYDELETE = TBN_FIRST - 7, /// @@ -1426,8 +1922,12 @@ namespace Vanara.PInvoke /// TBN_TOOLBARCHANGE lpnmhdr = (LPNMHDR) lParam; /// /// - /// Pointer to an NMHDR structure that contains information about the notification code. - /// No return value. + /// Parameters + /// lParam + /// Pointer to an NMHDR structure that contains information about the notification code. + /// Returns + /// No return value. + // https://docs.microsoft.com/en-us/windows/win32/controls/tbn-toolbarchange TBN_TOOLBARCHANGE = TBN_FIRST - 8, /// @@ -1439,8 +1939,12 @@ namespace Vanara.PInvoke /// TBN_CUSTHELP lpnmhdr = (LPNMHDR) lParam; /// /// - /// Pointer to an NMHDR structure that contains information about the notification code. - /// No return value. + /// Parameters + /// lParam + /// Pointer to an NMHDR structure that contains information about the notification code. + /// Returns + /// No return value. + // https://docs.microsoft.com/en-us/windows/win32/controls/tbn-custhelp TBN_CUSTHELP = TBN_FIRST - 9, /// @@ -1452,11 +1956,13 @@ namespace Vanara.PInvoke /// TBN_DROPDOWN lpnmtb = (LPNMTOOLBAR) lParam; /// /// - /// + /// Parameters + /// lParam + /// /// Pointer to an NMTOOLBAR structure that contains information about this notification code. For this notification code, /// only the hdr and iItem members of this structure are valid. - /// - /// + /// + /// Returns /// Returns one of the following values: /// /// @@ -1464,20 +1970,29 @@ namespace Vanara.PInvoke /// Description /// /// - /// TBDDRET_DEFAULT + /// TBDDRET_DEFAULT /// The drop-down was handled. /// /// - /// TBDDRET_NODEFAULT + /// TBDDRET_NODEFAULT /// The drop-down was not handled. /// /// - /// TBDDRET_TREATPRESSED + /// TBDDRET_TREATPRESSED /// The drop-down was handled, but treat the button like a regular button. /// /// - /// - /// + /// + /// Note + /// + /// Dropdown buttons can be plain ( BTNS_DROPDOWN style), display an arrow next to the button image ( + /// BTNS_WHOLEDROPDOWN style), or display an arrow that is separated from the image ( TBSTYLE_EX_DRAWDDARROWS + /// style). If a separated arrow is used, TBN_DROPDOWN is sent only if the user clicks the arrow portion of the button. If the + /// user clicks the main part of the button, a WM_COMMAND message with button's ID is sent, just as with a standard + /// button. For the other two styles of dropdown button, TBN_DROPDOWN is sent when the user clicks any part of the button. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tbn-dropdown TBN_DROPDOWN = TBN_FIRST - 10, /// @@ -1489,11 +2004,14 @@ namespace Vanara.PInvoke /// TBN_GETOBJECT lpnmon = (LPNMOBJECTNOTIFY) lParam; /// /// - /// + /// Parameters + /// lParam + /// /// Pointer to an NMOBJECTNOTIFY structure that contains information about the button that the pointer passed over and /// receives data the application provides in response to this notification code. - /// - /// The application processing this notification code must return zero. + /// + /// Returns + /// The application processing this notification code must return zero. /// /// /// To provide an object, an application must set values in some members of the NMOBJECTNOTIFY structure at lParam. The @@ -1504,6 +2022,7 @@ namespace Vanara.PInvoke /// If an application does not provide an object, it must set pObject to NULL and hResult to a failure flag. /// /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tbn-getobject TBN_GETOBJECT = TBN_FIRST - 12, /// @@ -1515,8 +2034,12 @@ namespace Vanara.PInvoke /// TBN_HOTITEMCHANGE lpnmhi = (LPNMTBHOTITEM) lParam; /// /// - /// Pointer to an NMTBHOTITEM structure that contains information about this notification code. - /// Return zero to allow the item to be highlighted, or nonzero to prevent the item from being highlighted. + /// Parameters + /// lParam + /// Pointer to an NMTBHOTITEM structure that contains information about this notification code. + /// Returns + /// Return zero to allow the item to be highlighted, or nonzero to prevent the item from being highlighted. + // https://docs.microsoft.com/en-us/windows/win32/controls/tbn-hotitemchange TBN_HOTITEMCHANGE = TBN_FIRST - 13, /// @@ -1528,16 +2051,20 @@ namespace Vanara.PInvoke /// TBN_DRAGOUT lpnmtb = (LPNMTOOLBAR) lParam; /// /// - /// + /// Parameters + /// lParam + /// /// Pointer to an NMTOOLBAR structure that contains information about this notification code. For this notification code, /// only the hdr and iItem members of this structure are valid. The iItem member of this structure contains /// the command identifier of the button being dragged. - /// - /// The return value is ignored. + /// + /// Returns + /// The return value is ignored. /// /// This notification code allows an application to implement drag-and-drop functionality for toolbar buttons. When processing /// this notification code, the application will begin the drag-and-drop operation. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tbn-dragout TBN_DRAGOUT = TBN_FIRST - 14, /// @@ -1549,12 +2076,16 @@ namespace Vanara.PInvoke /// TBN_DELETINGBUTTON lpnmtb = (LPNMTOOLBAR) lParam; /// /// - /// + /// Parameters + /// lParam + /// /// Pointer to an NMTOOLBAR structure that contains information about the button being deleted. For this notification /// code, only the hdr and iItem members of this structure are valid. The iItem member of this structure /// contains the command identifier of the button being deleted. - /// - /// The return value is ignored. + /// + /// Returns + /// The return value is ignored. + // https://docs.microsoft.com/en-us/windows/win32/controls/tbn-deletingbutton TBN_DELETINGBUTTON = TBN_FIRST - 15, /// @@ -1565,12 +2096,16 @@ namespace Vanara.PInvoke /// TBN_GETDISPINFO lptbdi = (LPNMTBDISPINFO) lParam; /// /// - /// + /// Parameters + /// lParam + /// /// Pointer to an NMTBDISPINFO structure. The idCommand member specifies the item's command identifier, the - /// lParam member contains the item's application-defined data, and the dwMask member specifies what information - /// is being requested. - /// - /// The return value is ignored by the control. + /// lParam member contains the item's application-defined data, and the dwMask member specifies what information is + /// being requested. + /// + /// Returns + /// The return value is ignored by the control. + // https://docs.microsoft.com/en-us/windows/win32/controls/tbn-getdispinfo TBN_GETDISPINFOA = TBN_FIRST - 16, /// @@ -1581,12 +2116,16 @@ namespace Vanara.PInvoke /// TBN_GETDISPINFO lptbdi = (LPNMTBDISPINFO) lParam; /// /// - /// + /// Parameters + /// lParam + /// /// Pointer to an NMTBDISPINFO structure. The idCommand member specifies the item's command identifier, the - /// lParam member contains the item's application-defined data, and the dwMask member specifies what information - /// is being requested. - /// - /// The return value is ignored by the control. + /// lParam member contains the item's application-defined data, and the dwMask member specifies what information is + /// being requested. + /// + /// Returns + /// The return value is ignored by the control. + // https://docs.microsoft.com/en-us/windows/win32/controls/tbn-getdispinfo TBN_GETDISPINFOW = TBN_FIRST - 17, /// @@ -1597,14 +2136,16 @@ namespace Vanara.PInvoke /// TBN_GETINFOTIP lptbgit = (LPNMTBGETINFOTIP) lParam; /// /// - /// - /// Pointer to an NMTBGETINFOTIP structure that contains item information and receives infotip information. - /// - /// The return value is ignored by the control. + /// Parameters + /// lParam + /// Pointer to an NMTBGETINFOTIP structure that contains item information and receives infotip information. + /// Returns + /// The return value is ignored by the control. /// /// The infotip support in the toolbar allows the toolbar to display tooltips for items that are as large as INFOTIPSIZE /// characters. If this notification code is not processed, the toolbar will use the item's text for the infotip. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tbn-getinfotip TBN_GETINFOTIPA = TBN_FIRST - 18, /// @@ -1615,14 +2156,16 @@ namespace Vanara.PInvoke /// TBN_GETINFOTIP lptbgit = (LPNMTBGETINFOTIP) lParam; /// /// - /// - /// Pointer to an NMTBGETINFOTIP structure that contains item information and receives infotip information. - /// - /// The return value is ignored by the control. + /// Parameters + /// lParam + /// Pointer to an NMTBGETINFOTIP structure that contains item information and receives infotip information. + /// Returns + /// The return value is ignored by the control. /// /// The infotip support in the toolbar allows the toolbar to display tooltips for items that are as large as INFOTIPSIZE /// characters. If this notification code is not processed, the toolbar will use the item's text for the infotip. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tbn-getinfotip TBN_GETINFOTIPW = TBN_FIRST - 19, /// @@ -1634,18 +2177,21 @@ namespace Vanara.PInvoke /// TBN_GETBUTTONINFO lpnmtb = (LPNMTOOLBAR) lParam; /// /// - /// + /// Parameters + /// lParam + /// /// Pointer to an NMTOOLBAR structure. The iItem member specifies a zero-based index that provides a count of the /// buttons the Customize Toolbar dialog box displays as both available and present on the toolbar. The pszText member /// specifies the address of the current button text, and cchText specifies its length in characters. The application /// should fill the structure with information about the button. - /// - /// Returns TRUE if button information was copied to the specified structure, or FALSE otherwise. + /// + /// Returns + /// Returns TRUE if button information was copied to the specified structure, or FALSE otherwise. /// /// The toolbar control allocates a buffer, and the receiver (parent window) must copy the text into that buffer. The - /// cchText member contains the length of the buffer allocated by the toolbar when TBN_GETBUTTONINFO is sent to the - /// parent window. + /// cchText member contains the length of the buffer allocated by the toolbar when TBN_GETBUTTONINFO is sent to the parent window. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tbn-getbuttoninfo TBN_GETBUTTONINFOW = TBN_FIRST - 20, /// @@ -1657,18 +2203,22 @@ namespace Vanara.PInvoke /// TBN_RESTORE lpnmtb = (LPNMTBRESTORE) lParam; /// /// - /// Pointer to an NMTBRESTORE structure. - /// - /// The application should return zero in response to the first TBN_RESTORE notification code received at the start of - /// the restore process to continue restoring the button information. If the application returns a nonzero value, the restore - /// process is canceled. - /// + /// Parameters + /// lParam + /// Pointer to an NMTBRESTORE structure. + /// Returns + /// + /// The application should return zero in response to the first TBN_RESTORE notification code received at the start of the + /// restore process to continue restoring the button information. If the application returns a nonzero value, the restore process + /// is canceled. + /// /// /// The application will receive this notification code once at the start of the restore process and once for each button. This /// notification code gives you an opportunity to extract the information from the data stream that you saved previously. If you /// haven't saved any information, ignore the notification code. See Toolbar Customization for a more detailed discussion of how /// to handle TBN_RESTORE. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tbn-restore TBN_RESTORE = TBN_FIRST - 21, /// @@ -1680,13 +2230,17 @@ namespace Vanara.PInvoke /// TBN_SAVE lpnmtb = (LPNMTBSAVE) lParam; /// /// - /// Pointer to an NMTBSAVE structure. - /// No return value. + /// Parameters + /// lParam + /// Pointer to an NMTBSAVE structure. + /// Returns + /// No return value. /// /// The application will receive this notification code once at the start of the save process and once for each button. This /// notification code gives you an opportunity to add your own information to that saved by the Shell. If you do not wish to add /// information, ignore the notification code. See Toolbar Customization for a more detailed discussion of how to handle TBN_SAVE. /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tbn-save TBN_SAVE = TBN_FIRST - 22, /// @@ -1698,30 +2252,38 @@ namespace Vanara.PInvoke /// TBN_INITCUSTOMIZE lpnmhdr = (LPNMHDR) lParam; /// /// - /// Pointer to the toolbar's NMHDR structure. - /// Returns TBNRF_HIDEHELP to suppress the Help button. + /// Parameters + /// lParam + /// Pointer to the toolbar's NMHDR structure. + /// Returns + /// Returns TBNRF_HIDEHELP to suppress the Help button. + // https://docs.microsoft.com/en-us/windows/win32/controls/tbn-initcustomize TBN_INITCUSTOMIZE = TBN_FIRST - 23, /// /// - /// Notifies an application with two or more toolbars that the hot item is about to change. This notification code is sent in - /// the form of a WM_NOTIFY message. + /// Notifies an application with two or more toolbars that the hot item is about to change. This notification code is sent in the + /// form of a WM_NOTIFY message. /// /// /// TBN_WRAPHOTITEM lpnmtb = (NMTBWRAPHOTITEM) lParam; /// /// - /// + /// Parameters + /// lParam + /// /// A pointer to a structure that contains the old hot item ( iStart) and whether the new hot item is before it ( /// iDir = -1) or after it ( iDir = 1), as well as a reason why the hot item is changing. - /// - /// TRUE if the application is handling the hot item change itself; otherwise FALSE. + /// + /// Returns + /// TRUE if the application is handling the hot item change itself; otherwise FALSE. /// /// The NMTBWRAPHOTITEM structure must be defined by the application as follows: /// /// typedef struct tagNMTBWRAPHOTITEM { NMHDR hdr; int iStart; int iDir; UINT nReason; // HICF_* flags } NMTBWRAPHOTITEM, *LPNMTBWRAPHOTITEM; /// /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tbn-wraphotitem TBN_WRAPHOTITEM = TBN_FIRST - 24, /// @@ -1733,17 +2295,21 @@ namespace Vanara.PInvoke /// TBN_DUPACCELERATOR lpnmtb = (NMTBDUPACCELERATOR) lParam; /// /// - /// + /// Parameters + /// lParam + /// /// A pointer to a structure that provides an accelerator and that receives a value specifying whether multiple toolbars respond /// to the same character. - /// - /// Returns TRUE if successful, otherwise FALSE. + /// + /// Returns + /// Returns TRUE if successful, otherwise FALSE. /// /// The application must declare the NMTBDUPACCELERATOR structure as follows: /// /// typedef struct tagNMTBDUPACCELERATOR { NMHDR hdr; UINT ch; // The accelerator. BOOL fDup; // TRUE if multiple toolbars respond to the accelerator. } NMTBDUPACCELERATOR, *LPNMTBDUPACCELERATOR; /// /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tbn-dupaccelerator TBN_DUPACCELERATOR = TBN_FIRST - 25, /// @@ -1755,11 +2321,14 @@ namespace Vanara.PInvoke /// TBN_WRAPACCELERATOR lpnmtb = (NMTBWRAPACCELERATOR) lParam; /// /// - /// + /// Parameters + /// lParam + /// /// A pointer to a structure that contains the accelerator key character, and that receives the index of the corresponding /// button. The index is -1 if the accelerator does not correspond to a command. - /// - /// TRUE if an index is returned, otherwise FALSE. + /// + /// Returns + /// TRUE if an index is returned, otherwise FALSE. /// /// Applications with one or more toolbars may receive this notification code. /// The NMTBWRAPACCELERATOR structure must be defined by the application as follows: @@ -1767,6 +2336,7 @@ namespace Vanara.PInvoke /// typedef struct tagNMTBWRAPACCELERATOR { NMHDR hdr; UINT ch; int iButton; } NMTBWRAPACCELERATOR, *LPNMTBWRAPACCELERATOR; /// /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tbn-wrapaccelerator TBN_WRAPACCELERATOR = TBN_FIRST - 26, /// @@ -1778,8 +2348,12 @@ namespace Vanara.PInvoke /// TBN_DRAGOVER lpnmtb = (NMTBHOTITEM*) lParam; /// /// - /// A pointer to an NMTBHOTITEM structure that specifies which item is being dragged over. - /// FALSE if the toolbar should send a TB_MARKBUTTON message; otherwise TRUE. + /// Parameters + /// lParam + /// A pointer to an NMTBHOTITEM structure that specifies which item is being dragged over. + /// Returns + /// FALSE if the toolbar should send a TB_MARKBUTTON message; otherwise TRUE. + // https://docs.microsoft.com/en-us/windows/win32/controls/tbn-dragover TBN_DRAGOVER = TBN_FIRST - 27, /// @@ -1791,16 +2365,18 @@ namespace Vanara.PInvoke /// TBN_MAPACCELERATOR lpnmtb = (NMCHAR*) lParam; /// /// - /// + /// Parameters + /// lParam + /// /// A pointer to an NMCHAR structure that contains the accelerator key character and that receives the index of the /// corresponding button. The dwItemNext field is -1 if the accelerator does not correspond to a command. - /// - /// TRUE if NMCHAR.dwItemNext is set to a value. + /// + /// Returns + /// TRUE if NMCHAR.dwItemNext is set to a value. + // https://docs.microsoft.com/en-us/windows/win32/controls/tbn-mapaccelerator TBN_MAPACCELERATOR = TBN_FIRST - 28, } -#pragma warning restore CS1572 // XML comment has a param tag, but there is no parameter by that name - /// Toolbar Control and Button Styles [PInvokeData("CommCtrl.h")] [Flags] diff --git a/PInvoke/ComCtl32/CommCtrl.Trackbar.cs b/PInvoke/ComCtl32/CommCtrl.Trackbar.cs index 0dbc1797..82188c65 100644 --- a/PInvoke/ComCtl32/CommCtrl.Trackbar.cs +++ b/PInvoke/ComCtl32/CommCtrl.Trackbar.cs @@ -29,72 +29,331 @@ namespace Vanara.PInvoke /// Retrieves the current logical position of the slider in a trackbar. The logical positions are the integer values in the /// trackbar's range of minimum to maximum slider positions. /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns a 32-bit value that specifies the current logical position of the trackbar's slider. + // https://docs.microsoft.com/en-us/windows/win32/controls/tbm-getpos TBM_GETPOS = WindowMessage.WM_USER, /// Retrieves the minimum position for the slider in a trackbar. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns a 32-bit value that specifies the minimum position in the trackbar's range of minimum to maximum slider positions. + // https://docs.microsoft.com/en-us/windows/win32/controls/tbm-getrangemin TBM_GETRANGEMIN = WindowMessage.WM_USER + 1, /// Retrieves the maximum position for the slider in a trackbar. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns a 32-bit value that specifies the maximum position in the trackbar's range of minimum to maximum slider positions. + // https://docs.microsoft.com/en-us/windows/win32/controls/tbm-getrangemax TBM_GETRANGEMAX = WindowMessage.WM_USER + 2, /// /// Retrieves the logical position of a tick mark in a trackbar. The logical position can be any of the integer values in the /// trackbar's range of minimum to maximum slider positions. /// + /// Parameters + /// wParam + /// + /// Zero-based index identifying a tick mark. Valid indexes are in the range from zero to two less than the tick count returned + /// by the TBM_GETNUMTICS message. + /// + /// lParam + /// Must be zero. + /// Returns + /// Returns the logical position of the specified tick mark, or -1 if wParam does not specify a valid index. + // https://docs.microsoft.com/en-us/windows/win32/controls/tbm-gettic TBM_GETTIC = WindowMessage.WM_USER + 3, /// Sets a tick mark in a trackbar at the specified logical position. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// + /// Position of the tick mark. This parameter can be any of the integer values in the trackbar's range of minimum to maximum + /// slider positions. + /// + /// Returns + /// Returns TRUE if the tick mark is set, or FALSE otherwise. + /// + /// A trackbar creates its own first and last tick marks. Do not use this message to set the first and last tick marks. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tbm-settic TBM_SETTIC = WindowMessage.WM_USER + 4, /// Sets the current logical position of the slider in a trackbar. + /// Parameters + /// wParam + /// + /// Redraw flag. If this parameter is TRUE, the message redraws the control with the slider at the position given by + /// lParam. If this parameter is FALSE, the message does not redraw the slider at the new position. Note that the message + /// sets the value of the slider position (as returned by the TBM_GETPOS message) regardless of the wParam parameter. + /// + /// lParam + /// + /// New logical position of the slider. Valid logical positions are the integer values in the trackbar's range of minimum to + /// maximum slider positions. If this value is outside the control's maximum and minimum range, the position is set to the + /// maximum or minimum value. + /// + /// Returns + /// No return value. + // https://docs.microsoft.com/en-us/windows/win32/controls/tbm-setpos TBM_SETPOS = WindowMessage.WM_USER + 5, /// Sets the range of minimum and maximum logical positions for the slider in a trackbar. + /// Parameters + /// wParam + /// + /// Redraw flag. If this parameter is TRUE, the trackbar is redrawn after the range is set. If this parameter is + /// FALSE, the message sets the range but does not redraw the trackbar. + /// + /// lParam + /// The LOWORD specifies the minimum position for the slider, and the HIWORD specifies the maximum position. + /// Returns + /// No return value. + /// + /// + /// If the current slider position is outside the new range, the TBM_SETRANGE message sets the slider position to the new + /// maximum or minimum value. + /// + /// + /// Because this message takes two 16-bit unsigned integer values, the maximum range that this message can specify is from 0 to + /// 65,535. To specify larger range values, use the TBM_SETRANGEMIN and TBM_SETRANGEMAX messages. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tbm-setrange TBM_SETRANGE = WindowMessage.WM_USER + 6, /// Sets the minimum logical position for the slider in a trackbar. + /// Parameters + /// wParam + /// + /// Redraw flag. If this parameter is TRUE, the message redraws the trackbar after the range is set. If this parameter is + /// FALSE, the message sets the range but does not redraw the trackbar. + /// + /// lParam + /// Minimum position for the slider. + /// Returns + /// No return value. + /// + /// If the current slider position is less than the new minimum, the TBM_SETRANGEMIN message sets the slider position to + /// the new minimum value. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tbm-setrangemin TBM_SETRANGEMIN = WindowMessage.WM_USER + 7, /// Sets the maximum logical position for the slider in a trackbar. + /// Parameters + /// wParam + /// + /// Redraw flag. If this parameter is TRUE, the trackbar is redrawn after the range is set. If this parameter is + /// FALSE, the message sets the range but does not redraw the trackbar. + /// + /// lParam + /// Maximum position for the slider. + /// Returns + /// No return value. + /// + /// If the current slider position is greater than the new maximum, the TBM_SETRANGEMAX message sets the slider position + /// to the new maximum value. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tbm-setrangemax TBM_SETRANGEMAX = WindowMessage.WM_USER + 8, /// /// Removes the current tick marks from a trackbar. This message does not remove the first and last tick marks, which are created /// automatically by the trackbar. /// + /// Parameters + /// wParam + /// + /// Redraw flag. If this parameter is TRUE, the trackbar is redrawn after the tick marks are cleared. If this parameter is + /// FALSE, the message clears the tick marks but does not redraw the trackbar. + /// + /// lParam + /// Must be zero. + /// Returns + /// No return value. + // https://docs.microsoft.com/en-us/windows/win32/controls/tbm-cleartics TBM_CLEARTICS = WindowMessage.WM_USER + 9, /// Sets the starting and ending positions for the available selection range in a trackbar. + /// Parameters + /// wParam + /// + /// Redraw flag. If this parameter is TRUE, the message redraws the trackbar after the selection range is set. If this + /// parameter is FALSE, the message sets the selection range but does not redraw the trackbar. + /// + /// lParam + /// + /// The LOWORD specifies the starting logical position for the selection range, and the HIWORD specifies the ending + /// logical position. + /// + /// Returns + /// No return value. + /// + /// This message is ignored if the trackbar does not have the TBS_ENABLESELRANGE style. + /// TBM_SETSEL allows you to restrict the pointer to only a portion of the range available to the progress bar. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tbm-setsel TBM_SETSEL = WindowMessage.WM_USER + 10, /// /// Sets the starting logical position of the current selection range in a trackbar. This message is ignored if the trackbar does - /// not have the TBS_ENABLESELRANGE style. + /// not have the TBS_ENABLESELRANGE style. /// + /// Parameters + /// wParam + /// + /// Redraw flag. If this parameter is TRUE, the message redraws the trackbar after the selection range is set. If this + /// parameter is FALSE, the message sets the selection range but does not redraw the trackbar. + /// + /// lParam + /// Starting position of the selection range. + /// Returns + /// No return value. + // https://docs.microsoft.com/en-us/windows/win32/controls/tbm-setselstart TBM_SETSELSTART = WindowMessage.WM_USER + 11, /// /// Sets the ending logical position of the current selection range in a trackbar. This message is ignored if the trackbar does - /// not have the TBS_ENABLESELRANGE style. + /// not have the TBS_ENABLESELRANGE style. /// + /// Parameters + /// wParam + /// + /// Redraw flag. If this parameter is TRUE, the message redraws the trackbar after the selection range is set. If this + /// parameter is FALSE, the message sets the selection range but does not redraw the trackbar. + /// + /// lParam + /// Ending logical position of the selection range. + /// Returns + /// No return value. + // https://docs.microsoft.com/en-us/windows/win32/controls/tbm-setselend TBM_SETSELEND = WindowMessage.WM_USER + 12, /// Retrieves the address of an array that contains the positions of the tick marks for a trackbar. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// + /// Returns the address of an array of DWORD values. The elements of the array specify the logical positions of the + /// trackbar's tick marks, not including the first and last tick marks created by the trackbar. The logical positions can be any + /// of the integer values in the trackbar's range of minimum to maximum slider positions. + /// + /// + /// The number of elements in the array is two less than the tick count returned by the TBM_GETNUMTICS message. Note that + /// the values in the array may include duplicate positions and may not be in sequential order. The returned pointer is valid + /// until you change the trackbar's tick marks. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tbm-getptics TBM_GETPTICS = WindowMessage.WM_USER + 14, /// Retrieves the current physical position of a tick mark in a trackbar. + /// Parameters + /// wParam + /// + /// Zero-based index identifying a tick mark. The positions of the first and last tick marks are not directly available via this message. + /// + /// lParam + /// Must be zero. + /// Returns + /// + /// Returns the distance, in client coordinates, from the left or top of the trackbar's client area to the specified tick mark. + /// The return value is the x-coordinate of the tick mark for a horizontal trackbar or the y-coordinate for a vertical trackbar. + /// If wParam is not a valid index, the return value is -1. + /// + /// + /// + /// Because the first and last tick marks are not available through this message, valid indexes are offset from their tick + /// position on the trackbar. If the difference between TBM_GETRANGEMIN and TBM_GETRANGEMAX is less than two, then + /// there is no valid index and this message will fail. + /// + /// + /// The following illustrates the relation between the ticks on a trackbar, the ticks available through this message, and their + /// zero-based indexes. + /// + /// + /// 0 1 2 3 4 5 6 7 8 9 // Tick positions seen on the trackbar. 1 2 3 4 5 6 7 8 // Tick positions whose position can be identified. 0 1 2 3 4 5 6 7 // Index numbers for the identifiable positions. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tbm-getticpos TBM_GETTICPOS = WindowMessage.WM_USER + 15, /// Retrieves the number of tick marks in a trackbar. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// + /// If no tick flag is set, it returns 2 for the beginning and ending ticks. If TBS_NOTICKS is set, it returns zero. + /// Otherwise, it takes the difference between the range minimum and maximum, divides by the tick frequency, and adds 2. + /// + /// + /// The TBM_GETNUMTICS message counts all of the tick marks, including the first and last tick marks created by the trackbar. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tbm-getnumtics TBM_GETNUMTICS = WindowMessage.WM_USER + 16, /// Retrieves the starting position of the current selection range in a trackbar. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns a 32-bit value that specifies the starting position of the current selection range. + /// + /// A trackbar can have a selection range only if you specified the TBS_ENABLESELRANGE style when you created it. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tbm-getselstart TBM_GETSELSTART = WindowMessage.WM_USER + 17, /// Retrieves the ending position of the current selection range in a trackbar. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns a 32-bit value that specifies the ending position of the current selection range. + /// + /// A trackbar can have a selection range only if you specified the TBS_ENABLESELRANGE style when you created it. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tbm-getselend TBM_GETSELEND = WindowMessage.WM_USER + 18, /// Clears the current selection range in a trackbar. + /// Parameters + /// wParam + /// Redraw flag. If this parameter is TRUE, the trackbar is redrawn after the selection is cleared. + /// lParam + /// Must be zero. + /// Returns + /// No return value. + /// + /// A trackbar can have a selection range only if you specified the TBS_ENABLESELRANGE style when you created it. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tbm-clearsel TBM_CLEARSEL = WindowMessage.WM_USER + 19, /// @@ -102,6 +361,15 @@ namespace Vanara.PInvoke /// displayed for every other increment in the trackbar's range. The default setting for the frequency is one; that is, every /// increment in the range is associated with a tick mark. /// + /// Parameters + /// wParam + /// Frequency of the tick marks. + /// lParam + /// Must be zero. + /// Returns + /// No return value. + /// The trackbar must have the TBS_AUTOTICKS style to use this message. + // https://docs.microsoft.com/en-us/windows/win32/controls/tbm-setticfreq TBM_SETTICFREQ = WindowMessage.WM_USER + 20, /// @@ -109,6 +377,18 @@ namespace Vanara.PInvoke /// input, such as clicks in the trackbar's channel. The logical positions are the integer increments in the trackbar's range of /// minimum to maximum slider positions. /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// New page size. + /// Returns + /// Returns a 32-bit value that specifies the previous page size. + /// + /// The trackbar also sends a WM_HSCROLL or WM_VSCROLL message with the TB_PAGEUP and TB_PAGEDOWN notification + /// codes to its parent window when it receives keyboard or mouse input that scrolls the page. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tbm-setpagesize TBM_SETPAGESIZE = WindowMessage.WM_USER + 21, /// @@ -116,70 +396,310 @@ namespace Vanara.PInvoke /// mouse input, such as clicks in the trackbar's channel. The logical positions are the integer increments in the trackbar's /// range of minimum to maximum slider positions. /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns a 32-bit value that specifies the page size for the trackbar. + /// + /// The trackbar also sends a WM_HSCROLL or WM_VSCROLL message with the TB_PAGEUP and TB_PAGEDOWN notification + /// codes to its parent window when it receives keyboard or mouse input that scrolls the page. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tbm-getpagesize TBM_GETPAGESIZE = WindowMessage.WM_USER + 22, /// /// Sets the number of logical positions the trackbar's slider moves in response to keyboard input from the arrow keys, such as /// the or keys. The logical positions are the integer increments in the trackbar's range of minimum to maximum slider positions. /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// New line size. + /// Returns + /// Returns a 32-bit value that specifies the previous line size. + /// + /// The default setting for the line size is 1. + /// + /// The trackbar also sends a WM_HSCROLL or WM_VSCROLL message with the TB_LINEUP and TB_LINEDOWN notification + /// codes to its parent window when the user presses the arrow keys. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tbm-setlinesize TBM_SETLINESIZE = WindowMessage.WM_USER + 23, /// /// Retrieves the number of logical positions the trackbar's slider moves in response to keyboard input from the arrow keys, such /// as the or keys. The logical positions are the integer increments in the trackbar's range of minimum to maximum slider positions. /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns a 32-bit value that specifies the line size for the trackbar. + /// + /// The default setting for the line size is 1. + /// + /// The trackbar also sends a WM_HSCROLL or WM_VSCROLL message with the TB_LINEUP and TB_LINEDOWN notification + /// codes to its parent window when the user presses the arrow keys. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tbm-getlinesize TBM_GETLINESIZE = WindowMessage.WM_USER + 24, /// Retrieves the size and position of the bounding rectangle for the slider in a trackbar. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// + /// Pointer to a RECT structure. The message fills this structure with the bounding rectangle of the trackbar's slider in + /// client coordinates of the trackbar's window. + /// + /// Returns + /// No return value. + // https://docs.microsoft.com/en-us/windows/win32/controls/tbm-getthumbrect TBM_GETTHUMBRECT = WindowMessage.WM_USER + 25, /// /// Retrieves the size and position of the bounding rectangle for a trackbar's channel. (The channel is the area over which the /// slider moves. It contains the highlight when a range is selected.) /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// + /// Pointer to a RECT structure. The message fills this structure with the channel's bounding rectangle, in client + /// coordinates of the trackbar's window. + /// + /// Returns + /// No return value. + // https://docs.microsoft.com/en-us/windows/win32/controls/tbm-getchannelrect TBM_GETCHANNELRECT = WindowMessage.WM_USER + 26, /// - /// Sets the length of the slider in a trackbar. This message is ignored if the trackbar does not have the TBS_FIXEDLENGTH style. + /// Sets the length of the slider in a trackbar. This message is ignored if the trackbar does not have the TBS_FIXEDLENGTH style. /// + /// Parameters + /// wParam + /// Length, in pixels, of the slider. + /// lParam + /// Must be zero. + /// Returns + /// No return value. + // https://docs.microsoft.com/en-us/windows/win32/controls/tbm-setthumblength TBM_SETTHUMBLENGTH = WindowMessage.WM_USER + 27, /// Retrieves the length of the slider in a trackbar. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns the length, in pixels, of the slider. + // https://docs.microsoft.com/en-us/windows/win32/controls/tbm-getthumblength TBM_GETTHUMBLENGTH = WindowMessage.WM_USER + 28, /// Assigns a tooltip control to a trackbar control. + /// Parameters + /// wParam + /// Handle to an existing tooltip control. + /// lParam + /// Must be zero. + /// Returns + /// The return value for this message is not used. + /// + /// When a trackbar control is created with the TBS_TOOLTIPS style, it creates a default tooltip control that appears next + /// to the slider, displaying the slider's current position. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tbm-settooltips TBM_SETTOOLTIPS = WindowMessage.WM_USER + 29, /// Retrieves the handle to the tooltip control assigned to the trackbar, if any. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// + /// Returns the handle to the tooltip control assigned to the trackbar, or NULL if tooltips are not in use. If the + /// trackbar control does not use the TBS_TOOLTIPS style, the return value is NULL. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tbm-gettooltips TBM_GETTOOLTIPS = WindowMessage.WM_USER + 30, /// - /// Positions a tooltip control used by a trackbar control. TrackBar controls that use the TBS_TOOLTIPS style display tooltips. + /// Positions a tooltip control used by a trackbar control. Trackbar controls that use the TBS_TOOLTIPS style display tooltips. /// + /// Parameters + /// wParam + /// Value representing the location at which to display the tooltip control. This value can be one of the following: + /// + /// + /// Value + /// Meaning + /// + /// + /// TBTS_TOP + /// The tooltip control will be positioned above the trackbar. This flag is for use with horizontal trackbars. + /// + /// + /// TBTS_LEFT + /// The tooltip control will be positioned to the left of the trackbar. This flag is for use with vertical trackbars. + /// + /// + /// TBTS_BOTTOM + /// The tooltip control will be positioned below the trackbar. This flag is for use with horizontal trackbars. + /// + /// + /// TBTS_RIGHT + /// The tooltip control will be positioned to the right of the trackbar. This flag is for use with vertical trackbars. + /// + /// + /// lParam + /// Must be zero. + /// Returns + /// + /// Returns a value that represents the tooltip control's previous location. The return value equals one of the possible values + /// for wParam. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tbm-settipside TBM_SETTIPSIDE = WindowMessage.WM_USER + 31, /// - /// Assigns a window as the buddy window for a trackbar control. TrackBar buddy windows are automatically displayed in a location + /// Assigns a window as the buddy window for a trackbar control. Trackbar buddy windows are automatically displayed in a location /// relative to the control's orientation (horizontal or vertical). /// + /// Parameters + /// wParam + /// Value specifying the location at which to display the buddy window. This value can be one of the following: + /// + /// + /// Value + /// Meaning + /// + /// + /// TRUE + /// + /// The buddy will appear to the left of the trackbar if the trackbar control uses the TBS_HORZ style. If the trackbar + /// uses the TBS_VERT style, the buddy appears above the trackbar control. + /// + /// + /// + /// FALSE + /// + /// The buddy will appear to the right of the trackbar if the trackbar control uses the TBS_HORZ style. If the trackbar + /// uses the TBS_VERT style, the buddy appears below the trackbar control. + /// + /// + /// + /// lParam + /// Handle to the window that will be set as the trackbar control's buddy. + /// Returns + /// Returns the handle to the window that was previously assigned to the control at that location. + /// + /// Note + /// + /// Trackbar controls support up to two buddy windows. This can be useful when you must display text or images at each end of the control. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tbm-setbuddy TBM_SETBUDDY = WindowMessage.WM_USER + 32, /// /// Retrieves the handle to a trackbar control buddy window at a given location. The specified location is relative to the /// control's orientation (horizontal or vertical). /// + /// Parameters + /// wParam + /// Value indicating which buddy window handle will be retrieved, by relative location. This value can be one of the following: + /// + /// + /// Value + /// Meaning + /// + /// + /// TRUE + /// + /// Retrieves the handle to the buddy to the left of the trackbar. If the trackbar control uses the TBS_VERT style, the + /// message will retrieve the buddy above the trackbar. + /// + /// + /// + /// FALSE + /// + /// Retrieves the handle to the buddy to the right of the trackbar. If the trackbar control uses the TBS_VERT style, the + /// message will retrieve the buddy below the trackbar. + /// + /// + /// + /// lParam + /// Must be zero. + /// Returns + /// + /// Returns the handle to the buddy window at the location specified by wParam, or NULL if no buddy window exists at that location. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tbm-getbuddy TBM_GETBUDDY = WindowMessage.WM_USER + 33, /// Sets the current logical position of the slider in a trackbar. + /// Parameters + /// wParam + /// wParam is unused. + /// lParam + /// + /// New logical position of the slider. Valid logical positions are the integer values in the trackbar's range of minimum to + /// maximum slider positions. If this value is outside the control's maximum and minimum range, the position is set to the + /// maximum or minimum value. + /// + /// Returns + /// No return value. + /// + /// Calling TBM_SETPOSNOTIFY will set the trackbar slider location like TBM_SETPOS would, but it will also cause + /// the trackbar to notify its parent of a move via a WM_HSCROLL or WM_VSCROLL message. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tbm-setposnotify TBM_SETPOSNOTIFY = WindowMessage.WM_USER + 34, /// /// Sets the Unicode character format flag for the control. This message allows you to change the character set used by the /// control at run time rather than having to re-create the control. /// + /// Parameters + /// wParam + /// + /// Determines the character set that is used by the control. If this value is nonzero, the control will use Unicode characters. + /// If this value is zero, the control will use ANSI characters. + /// + /// lParam + /// Must be zero. + /// Returns + /// Returns the previous Unicode format flag for the control. + /// See the remarks for CCM_SETUNICODEFORMAT for a discussion of this message. + // https://docs.microsoft.com/en-us/windows/win32/controls/tbm-setunicodeformat TBM_SETUNICODEFORMAT = CommonControlMessage.CCM_SETUNICODEFORMAT, /// Retrieves the Unicode character format flag for the control. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// + /// Returns the Unicode format flag for the control. If this value is nonzero, the control is using Unicode characters. If this + /// value is zero, the control is using ANSI characters. + /// + /// See the remarks for CCM_GETUNICODEFORMAT for a discussion of this message. + // https://docs.microsoft.com/en-us/windows/win32/controls/tbm-getunicodeformat TBM_GETUNICODEFORMAT = CommonControlMessage.CCM_GETUNICODEFORMAT } @@ -188,18 +708,23 @@ namespace Vanara.PInvoke public enum TrackBarNotification { /// - /// Notifies that the thumb position on a trackbar is changing. This notification code is sent in the form of a WM_NOTIFY message. - /// - /// - /// Send this notification to clients that do not listen for WM_HSCROLL or WM_VSCROLL messages. - /// lPara value /// - /// Pointer to a NMTRBTHUMBPOSCHANGING structure. The caller is responsible for allocating this structure and setting its - /// members, including the members of the contained NMHDR structure. + /// Notifies that the thumb position on a trackbar is changing. This notification code is sent in the form of a WM_NOTIFY message. /// - /// Return value - /// The return value is ignored. - /// + /// + /// TRBN_THUMBPOSCHANGING lpNMTrbThumbPosChanging = (NMTRBTHUMBPOSCHANGING*) lParam; + /// + /// + /// Parameters + /// lParam + /// + /// Pointer to a NMTRBTHUMBPOSCHANGING structure. The caller is responsible for allocating this structure and setting its + /// members, including the members of the contained NMHDR structure. + /// + /// Returns + /// Return TRUE to prevent the thumb from moving to the specified position. + /// Send this notification to clients that do not listen for WM_HSCROLL or WM_VSCROLL messages. + // https://docs.microsoft.com/en-us/windows/win32/controls/trbn-thumbposchanging TRBN_THUMBPOSCHANGING = TRBN_FIRST } diff --git a/PInvoke/ComCtl32/CommCtrl.TreeView.cs b/PInvoke/ComCtl32/CommCtrl.TreeView.cs index d2ac21ce..6ab3448b 100644 --- a/PInvoke/ComCtl32/CommCtrl.TreeView.cs +++ b/PInvoke/ComCtl32/CommCtrl.TreeView.cs @@ -334,84 +334,1748 @@ namespace Vanara.PInvoke [PInvokeData("Commctrl.h", MSDNShortId = "ff486106")] public enum TreeViewMessage { -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + /// + /// Removes an item and all its children from a tree-view control. You can send this message explicitly or by using the + /// TreeView_DeleteItem macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// + /// HTREEITEM handle to the item to delete. If lParam is set to TVI_ROOT or to NULL, all items are deleted. You can + /// also use the TreeView_DeleteAllItems macro to delete all items. + /// + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + /// + /// It is not safe to delete items in response to a notification such as TVN_SELCHANGING. + /// Once an item is deleted, its handle is invalid and cannot be used. + /// The parent window receives a TVN_DELETEITEM notification code when each item is removed. + /// + /// If the item label is being edited, the edit operation is canceled and the parent window receives the TVN_ENDLABELEDIT + /// notification code. + /// + /// + /// If you delete all items in a tree-view control that has the TVS_NOSCROLL style, items subsequently added may not + /// display properly. For more information, see TreeView_DeleteAllItems. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tvm-deleteitem TVM_DELETEITEM = TV_FIRST + 1, + + /// + /// The TVM_EXPAND message expands or collapses the list of child items associated with the specified parent item, if any. + /// You can send this message explicitly or by using the TreeView_Expand macro. + /// + /// Parameters + /// wParam + /// Action flag. This parameter can be one or more of the following values: + /// + /// + /// Value + /// Meaning + /// + /// + /// TVE_COLLAPSE + /// Collapses the list. + /// + /// + /// TVE_COLLAPSERESET + /// + /// Collapses the list and removes the child items. The TVIS_EXPANDEDONCE state flag is reset. This flag must be used with + /// the TVE_COLLAPSE flag. + /// + /// + /// + /// TVE_EXPAND + /// Expands the list. + /// + /// + /// TVE_EXPANDPARTIAL + /// + /// Version 4.70. Partially expands the list. In this state the child items are visible and the parent item's plus sign (+), + /// indicating that it can be expanded, is displayed. This flag must be used in combination with the TVE_EXPAND flag. + /// + /// + /// + /// TVE_TOGGLE + /// Collapses the list if it is expanded or expands it if it is collapsed. + /// + /// + /// lParam + /// Handle to the parent item to expand or collapse. + /// Returns + /// Returns nonzero if the operation was successful, or zero otherwise. + /// + /// + /// Expanding a node that is already expanded is considered a successful operation and SendMessage returns a nonzero + /// value. Collapsing a node returns zero if the node is already collapsed; otherwise it returns nonzero. Attempting to expand or + /// collapse a node that has no children is considered a failure and SendMessage returns zero. + /// + /// + /// When an item is first expanded by a TVM_EXPAND message, the action generates TVN_ITEMEXPANDING and TVN_ITEMEXPANDED + /// notification codes and the item's TVIS_EXPANDEDONCE state flag is set. As long as this state flag remains set, + /// subsequent TVM_EXPAND messages do not generate TVN_ITEMEXPANDING or TVN_ITEMEXPANDED notifications. To reset the + /// TVIS_EXPANDEDONCE state flag, you must send a TVM_EXPAND message with the TVE_COLLAPSE and TVE_COLLAPSERESET + /// flags set. Attempting to explicitly set TVIS_EXPANDEDONCE will result in unpredictable behavior. + /// + /// + /// The expand operation may fail if the owner of the treeview control denies the operation in response to a TVN_ITEMEXPANDING notification. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tvm-expand TVM_EXPAND = TV_FIRST + 2, + + /// + /// Retrieves the bounding rectangle for a tree-view item and indicates whether the item is visible. You can send this message + /// explicitly or by using the TreeView_GetItemRect macro. + /// + /// Parameters + /// wParam + /// + /// Value specifying the portion of the item for which to retrieve the bounding rectangle. If this parameter is TRUE, the + /// bounding rectangle includes only the text of the item. Otherwise, it includes the entire line that the item occupies in the + /// tree-view control. + /// + /// lParam + /// + /// Pointer to a RECT structure that, when sending the message, contains the handle of the item to retrieve the rectangle + /// for. See the example below for more information on how to place the item handle in this parameter. After returning from the + /// message, this parameter contains the bounding rectangle. The coordinates are relative to the upper-left corner of the + /// tree-view control. + /// + /// Returns + /// + /// If the item is visible and the bounding rectangle was successfully retrieved, the return value is TRUE. Otherwise, the + /// message returns FALSE and does not retrieve the bounding rectangle. + /// + /// + /// + /// When sending this message, the lParam parameter contains the handle of the item that the rectangle is being retrieved for. + /// The handle is placed in lParam as shown in the following example: + /// + /// + /// RECT rc; *(HTREEITEM*)&rc = hTreeItem; SendMessage(hwndTreeView, TVM_GETITEMRECT, FALSE, (LPARAM)&rc); + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tvm-getitemrect TVM_GETITEMRECT = TV_FIRST + 4, + + /// + /// Retrieves a count of the items in a tree-view control. You can send this message explicitly or by using the + /// TreeView_GetCount macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns the count of items. + /// + /// The node count returned by TreeView_GetCount is limited to integer values. If you add a node beyond 32767 the macro + /// returns a negative value. After adding 65536 nodes the count returns to zero. When this occurs, the tree-view control appears + /// empty with no scrollbars. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tvm-getcount TVM_GETCOUNT = TV_FIRST + 5, + + /// + /// Retrieves the amount, in pixels, that child items are indented relative to their parent items. You can send this message + /// explicitly or by using the TreeView_GetIndent macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns the amount of indentation. + // https://docs.microsoft.com/en-us/windows/win32/controls/tvm-getindent TVM_GETINDENT = TV_FIRST + 6, + + /// + /// Sets the width of indentation for a tree-view control and redraws the control to reflect the new width. You can send this + /// message explicitly or by using the TreeView_SetIndent macro. + /// + /// Parameters + /// wParam + /// + /// Width, in pixels, of the indentation. If this parameter is less than the system-defined minimum width, the new width is set + /// to the system-defined minimum. + /// + /// lParam + /// Must be zero. + /// Returns + /// No return value. + /// + /// The system-defined minimum indent value is typically five pixels, but it is not fixed. To retrieve the exact value of the + /// minimum indent on a particular system, send a TVM_SETINDENT message with wParam set to zero. Then send a + /// TVM_GETINDENT message to retrieve the minimum indent value. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tvm-setindent TVM_SETINDENT = TV_FIRST + 7, + + /// + /// Retrieves the handle to the normal or state image list associated with a tree-view control. You can send this message + /// explicitly or by using the TreeView_GetImageList macro. + /// + /// Parameters + /// wParam + /// Type of image list to retrieve. This parameter can be one of the following values: + /// + /// + /// Value + /// Meaning + /// + /// + /// TVSIL_NORMAL + /// + /// Indicates the normal image list, which contains selected, nonselected, and overlay images for the items of a tree-view control. + /// + /// + /// + /// TVSIL_STATE + /// + /// Indicates the state image list. You can use state images to indicate application-defined item states. A state image is + /// displayed to the left of an item's selected or nonselected image. + /// + /// + /// + /// lParam + /// Must be zero. + /// Returns + /// Returns an HIMAGELIST handle to the specified image list. + // https://docs.microsoft.com/en-us/windows/win32/controls/tvm-getimagelist TVM_GETIMAGELIST = TV_FIRST + 8, + + /// + /// Sets the normal or state image list for a tree-view control and redraws the control using the new images. You can send this + /// message explicitly or by using the TreeView_SetImageList macro. + /// + /// Parameters + /// wParam + /// Type of image list to set. This parameter can be one of the following values: + /// + /// + /// Value + /// Meaning + /// + /// + /// TVSIL_NORMAL + /// + /// Indicates the normal image list, which contains selected, nonselected, and overlay images for the items of a tree-view control. + /// + /// + /// + /// TVSIL_STATE + /// + /// Indicates the state image list. You can use state images to indicate application-defined item states. A state image is + /// displayed to the left of an item's selected or nonselected image. + /// + /// + /// + /// lParam + /// + /// Handle to the image list. If lParam is NULL, the message removes the specified image list from the tree-view control. + /// + /// Returns + /// Returns the handle to the previous image list, if any, or NULL otherwise. + /// + /// The tree-view control will not destroy the image list specified with this message. Your application must destroy the image + /// list when it is no longer needed. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tvm-setimagelist TVM_SETIMAGELIST = TV_FIRST + 9, + + /// + /// Retrieves the tree-view item that bears the specified relationship to a specified item. You can send this message explicitly, + /// by using the TreeView_GetNextItem macro. + /// + /// Parameters + /// wParam + /// Flag specifying the item to retrieve. This parameter can be one of the following values: + /// + /// + /// Value + /// Meaning + /// + /// + /// TVGN_CARET + /// Retrieves the currently selected item. You can use the TreeView_GetSelection macro to send this message. + /// + /// + /// TVGN_CHILD + /// + /// Retrieves the first child item of the item specified by the hitem parameter. You can use the TreeView_GetChild + /// macro to send this message. + /// + /// + /// + /// TVGN_DROPHILITE + /// + /// Retrieves the item that is the target of a drag-and-drop operation. You can use the TreeView_GetDropHilight macro to + /// send this message. + /// + /// + /// + /// TVGN_FIRSTVISIBLE + /// + /// Retrieves the first item that is visible in the tree-view window. You can use the TreeView_GetFirstVisible macro to + /// send this message. + /// + /// + /// + /// TVGN_LASTVISIBLE + /// + /// Version 4.71. Retrieves the last expanded item in the tree. This does not retrieve the last item visible in the tree-view + /// window. You can use the TreeView_GetLastVisible macro to send this message. + /// + /// + /// + /// TVGN_NEXT + /// Retrieves the next sibling item. You can use the TreeView_GetNextSibling macro to send this message. + /// + /// + /// TVGN_NEXTSELECTED + /// + /// Windows Vista and later. Retrieves the next selected item. You can use the TreeView_GetNextSelected macro to + /// send this message. + /// + /// + /// + /// TVGN_NEXTVISIBLE + /// + /// Retrieves the next visible item that follows the specified item. The specified item must be visible. Use the + /// TVM_GETITEMRECT message to determine whether an item is visible. You can use the TreeView_GetNextVisible macro + /// to send this message. + /// + /// + /// + /// TVGN_PARENT + /// Retrieves the parent of the specified item. You can use the TreeView_GetParent macro to send this message. + /// + /// + /// TVGN_PREVIOUS + /// Retrieves the previous sibling item. You can use the TreeView_GetPrevSibling macro to send this message. + /// + /// + /// TVGN_PREVIOUSVISIBLE + /// + /// Retrieves the first visible item that precedes the specified item. The specified item must be visible. Use the + /// TVM_GETITEMRECT message to determine whether an item is visible. You can use the TreeView_GetPrevVisible macro + /// to send this message. + /// + /// + /// + /// TVGN_ROOT + /// + /// Retrieves the topmost or very first item of the tree-view control. You can use the TreeView_GetRoot macro to send this message. + /// + /// + /// + /// lParam + /// Handle to an item. + /// Returns + /// + /// Returns the handle to the item if successful. For most cases, the message returns a NULL value to indicate an error. + /// See the Remarks section for details. + /// + /// + /// + /// This message will return NULL if the item being retrieved is the root node of the tree. For example, if you use this + /// message with the TVGN_PARENT flag on a first-level child of the tree view's root node, the message will return NULL. + /// + /// You can also use one of these related macros: + /// + /// + /// + /// + /// + /// TreeView_GetChild + /// + /// + /// TreeView_GetDropHilight + /// + /// + /// TreeView_GetFirstVisible + /// + /// + /// TreeView_GetLastVisible + /// + /// + /// TreeView_GetNextSibling + /// + /// + /// TreeView_GetNextVisible + /// + /// + /// TreeView_GetParent + /// + /// + /// TreeView_GetPrevSibling + /// + /// + /// TreeView_GetPrevVisible + /// + /// + /// TreeView_GetRoot + /// + /// + /// TreeView_GetSelection + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tvm-getnextitem TVM_GETNEXTITEM = TV_FIRST + 10, + + /// + /// Selects the specified tree-view item, scrolls the item into view, or redraws the item in the style used to indicate the + /// target of a drag-and-drop operation. You can send this message explicitly or by using the TreeView_Select, + /// TreeView_SelectItem, or TreeView_SelectDropTarget macro. + /// + /// Parameters + /// wParam + /// Action flag. This parameter can be one of the following values: + /// + /// + /// Value + /// Meaning + /// + /// + /// TVGN_CARET + /// + /// Sets the selection to the specified item. The tree-view control's parent window receives the TVN_SELCHANGING and + /// TVN_SELCHANGED notification codes. + /// + /// + /// + /// TVGN_DROPHILITE + /// Redraws the specified item in the style used to indicate the target of a drag-and-drop operation. + /// + /// + /// TVGN_FIRSTVISIBLE + /// + /// Ensures that the specified item is visible, and, if possible, displays it at the top of the control's window. Tree-view + /// controls display as many items as will fit in the window. If the specified item is near the bottom of the control's hierarchy + /// of items, it might not become the first visible item, depending on how many items fit in the window. + /// + /// + /// + /// TVSI_NOSINGLEEXPAND + /// + /// When a single item is selected, ensures that the treeview does not expand the children of that item. This is valid only if + /// used with the TVGN_CARET flag. + /// + /// + /// + /// lParam + /// Handle to an item. If lParam is NULL, the control is set to have no selected item. + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + /// + /// + /// If the specified item is the child of a collapsed parent item, the parent's list of child items is expanded to reveal the + /// specified item. In this case, the control's parent window receives the TVN_ITEMEXPANDING and TVN_ITEMEXPANDED notification codes. + /// + /// + /// Using the TreeView_SelectItem macro is equivalent to sending the TVM_SELECTITEM message with wParam set to the + /// TVGN_CARET value. Using the TreeView_SelectDropTarget macro is equivalent to sending the TVM_SELECTITEM message + /// with wParam set to the TVGN_DROPHILITE value. Using TreeView_SelectSetFirstVisible is equivalent to sending the + /// TVM_SELECTITEM message with wParam set to the TVGN_FIRSTVISIBLE value. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tvm-selectitem TVM_SELECTITEM = TV_FIRST + 11, + + /// + /// Retrieves the handle to the edit control being used to edit a tree-view item's text. You can send this message explicitly or + /// by using the TreeView_GetEditControl macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns the handle to the edit control if successful, or NULL otherwise. + /// + /// + /// When label editing begins, an edit control is created, but not positioned or displayed. Before it is displayed, the tree-view + /// control sends its parent window an TVN_BEGINLABELEDIT notification code. + /// + /// + /// To customize label editing, implement a handler for TVN_BEGINLABELEDIT and have it send a TVM_GETEDITCONTROL message + /// to the tree-view control. If a label is being edited, the return value will be a handle to the edit control. Use this handle + /// to customize the edit control by sending the usual EM_XXX messages. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tvm-geteditcontrol TVM_GETEDITCONTROL = TV_FIRST + 15, + + /// + /// Obtains the number of items that can be fully visible in the client window of a tree-view control. You can send this message + /// explicitly or by using the TreeView_GetVisibleCount macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns the number of items that can be fully visible in the client window of the tree-view control. + /// + /// + /// The number of items that can be fully visible may be greater than the number of items in the control. The control calculates + /// this value by dividing the height of the client window by the height of an item. + /// + /// + /// Note that the return value is the number of items that can be fully visible. If you can see all of 20 items and part of one + /// more item, the return value is 20. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tvm-getvisiblecount TVM_GETVISIBLECOUNT = TV_FIRST + 16, + + /// + /// Determines the location of the specified point relative to the client area of a tree-view control. You can send this message + /// explicitly or by using the TreeView_HitTest macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// + /// Pointer to a TVHITTESTINFO structure. When the message is sent, the pt member specifies the coordinates of the + /// point to test. When the message returns, the hItem member is the handle to the item at the specified point or + /// NULL if no item occupies the point. Also, when the message returns, the flags member is a hit test value that + /// indicates the location of the specified point. For a list of hit test values, see the description of the TVHITTESTINFO structure. + /// + /// Returns + /// + /// Returns the handle to the tree-view item that occupies the specified point, or NULL if no item occupies the point. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tvm-hittest TVM_HITTEST = TV_FIRST + 17, + + /// + /// Creates a dragging bitmap for the specified item in a tree-view control. The message also creates an image list for the + /// bitmap and adds the bitmap to the image list. An application can display the image when dragging the item by using the image + /// list functions. You can send this message explicitly or by using the TreeView_CreateDragImage macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Handle to the item that receives the new dragging bitmap. + /// Returns + /// Returns the handle to the image list to which the dragging bitmap was added if successful, or NULL otherwise. + /// + /// + /// If you create a tree-view control without an associated image list, you cannot use the TVM_CREATEDRAGIMAGE message to + /// create the image to display during a drag operation. You must implement your own method of creating a drag cursor. + /// + /// Your application is responsible for destroying the image list when it is no longer needed. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tvm-createdragimage TVM_CREATEDRAGIMAGE = TV_FIRST + 18, + + /// + /// Sorts the child items of the specified parent item in a tree-view control. You can send this message explicitly or by using + /// the TreeView_SortChildren macro. + /// + /// Parameters + /// wParam + /// + /// Value that specifies whether the sorting is recursive. Set wParam to TRUE to sort all levels of child items below the + /// parent item. Otherwise, only the parent's immediate children are sorted. + /// + /// lParam + /// Handle to the parent item whose child items are to be sorted. + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + /// + /// This message alphabetizes the tree items using lstrcmpi on the item name. You can use the TVM_SORTCHILDRENCB + /// message to customize the ordering behavior. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tvm-sortchildren TVM_SORTCHILDREN = TV_FIRST + 19, + + /// + /// Ensures that a tree-view item is visible, expanding the parent item or scrolling the tree-view control, if necessary. You can + /// send this message explicitly or by using the TreeView_EnsureVisible macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Handle to the item. + /// Returns + /// + /// Returns nonzero if the system scrolled the items in the tree-view control and no items were expanded. Otherwise, the message + /// returns zero. + /// + /// + /// If the TVM_ENSUREVISIBLE message expands the parent item, the parent window receives the TVN_ITEMEXPANDING and + /// TVN_ITEMEXPANDED notification codes. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tvm-ensurevisible TVM_ENSUREVISIBLE = TV_FIRST + 20, + + /// + /// Sorts tree-view items using an application-defined callback function that compares the items. You can send this message + /// explicitly or by using the TreeView_SortChildrenCB macro. + /// + /// Parameters + /// wParam + /// Reserved. Must be zero. + /// lParam + /// + /// Pointer to a TVSORTCB structure. The lpfnCompare member is the address of the application-defined callback + /// function, which is called during the sort operation each time the relative order of two list items needs to be compared. For + /// more information about the callback function, see the description of TVSORTCB. + /// + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/tvm-sortchildrencb TVM_SORTCHILDRENCB = TV_FIRST + 21, + + /// + /// Ends the editing of a tree-view item's label. You can send this message explicitly or by using the + /// TreeView_EndEditLabelNow macro. + /// + /// Parameters + /// wParam + /// + /// Variable that indicates whether the editing is canceled without being saved to the label. If this parameter is TRUE, + /// the system cancels editing without saving the changes. Otherwise, the system saves the changes to the label. + /// + /// lParam + /// Must be zero. + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + /// This message causes the TVN_ENDLABELEDIT notification code to be sent to the parent window of the tree-view control. + // https://docs.microsoft.com/en-us/windows/win32/controls/tvm-endeditlabelnow TVM_ENDEDITLABELNOW = TV_FIRST + 22, + + /// + /// Sets a tree-view control's child tooltip control. You can send this message explicitly or by using the + /// TreeView_SetToolTips macro. + /// + /// Parameters + /// wParam + /// Handle to a tooltip control. + /// lParam + /// Must be zero. + /// Returns + /// + /// Returns the handle to tooltip control previously set for the tree-view control, or NULL if tooltips were not + /// previously used. + /// + /// + /// When created, tree-view controls automatically create a child tooltip control. To prevent a tree-view control from using + /// tooltips, create the control with the TVS_NOTOOLTIPS style. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tvm-settooltips TVM_SETTOOLTIPS = TV_FIRST + 24, + + /// + /// Retrieves the handle to the child tooltip control used by a tree-view control. You can send this message explicitly or by + /// using the TreeView_GetToolTips macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns the handle to the child tooltip control, or NULL if the control is not using tooltips. + /// + /// When created, tree-view controls automatically create a child tooltip control. To cause a tree-view control not to use + /// tooltips, create the control with the TVS_NOTOOLTIPS style. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tvm-gettooltips TVM_GETTOOLTIPS = TV_FIRST + 25, + + /// + /// Sets the insertion mark in a tree-view control. You can send this message explicitly or by using the + /// TreeView_SetInsertMark macro. + /// + /// Parameters + /// wParam + /// + /// BOOL value that specifies if the insertion mark is placed before or after the specified item. If this argument is + /// nonzero, the insertion mark will be placed after the item. If this argument is zero, the insertion mark will be placed before + /// the item. + /// + /// lParam + /// + /// HTREEITEM that specifies at which item the insertion mark will be placed. If this argument is NULL, the + /// insertion mark is removed. + /// + /// Returns + /// Returns nonzero if successful, or zero otherwise. + /// + /// In some circumstances, the insert mark can appear in two places after a node is expanded. If you are using insertion marks, + /// it is recommended that you force a refresh of the control after expanding a node. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tvm-setinsertmark TVM_SETINSERTMARK = TV_FIRST + 26, + + /// + /// Sets the Unicode character format flag for the control. This message allows you to change the character set used by the + /// control at run time rather than having to re-create the control. You can send this message explicitly or use the + /// TreeView_SetUnicodeFormat macro. + /// + /// Parameters + /// wParam + /// + /// Determines the character set that is used by the control. If this value is nonzero, the control will use Unicode characters. + /// If this value is zero, the control will use ANSI characters. + /// + /// lParam + /// Must be zero. + /// Returns + /// Returns the previous Unicode format flag for the control. + /// See the remarks for CCM_SETUNICODEFORMAT for a discussion of this message. + // https://docs.microsoft.com/en-us/windows/win32/controls/tvm-setunicodeformat TVM_SETUNICODEFORMAT = CommonControlMessage.CCM_SETUNICODEFORMAT, + + /// + /// Retrieves the Unicode character format flag for the control. You can send this message explicitly or use the + /// TreeView_GetUnicodeFormat macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// + /// Returns the Unicode format flag for the control. If this value is nonzero, the control is using Unicode characters. If this + /// value is zero, the control is using ANSI characters. + /// + /// See the remarks for CCM_GETUNICODEFORMAT for a discussion of this message. + // https://docs.microsoft.com/en-us/windows/win32/controls/tvm-getunicodeformat TVM_GETUNICODEFORMAT = CommonControlMessage.CCM_GETUNICODEFORMAT, + + /// + /// Sets the height of the tree-view items. You can send this message explicitly or by using the TreeView_SetItemHeight macro. + /// + /// Parameters + /// wParam + /// + /// New height of every item in the tree view, in pixels. Heights less than 1 will be set to 1. If this argument is not even and + /// the tree-view control does not have the TVS_NONEVENHEIGHT style, this value will be rounded down to the nearest even + /// value. If this argument is -1, the control will revert to using its default item height. + /// + /// lParam + /// Must be zero. + /// Returns + /// Returns the previous height of the items, in pixels. + /// + /// The tree-view control uses this value for the height of all items. To modify the height of individual items, see the + /// description of the iIntegral member of the TVITEMEX structure. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tvm-setitemheight TVM_SETITEMHEIGHT = TV_FIRST + 27, + + /// + /// Retrieves the current height of the each tree-view item. You can send this message explicitly or by using the + /// TreeView_GetItemHeight macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns the height of each item, in pixels. + // https://docs.microsoft.com/en-us/windows/win32/controls/tvm-getitemheight TVM_GETITEMHEIGHT = TV_FIRST + 28, + + /// + /// Sets the background color of the control. You can send this message explicitly or by using the TreeView_SetBkColor macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// + /// COLORREF value that contains the new background color. If this value is -1, the control will revert to using the + /// system color for the background color. + /// + /// Returns + /// + /// Returns a COLORREF value that represents the previous background color. If this value is -1, the control was using the + /// system color for the background color. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tvm-setbkcolor TVM_SETBKCOLOR = TV_FIRST + 29, + + /// + /// Sets the text color of the control. You can send this message explicitly or by using the TreeView_SetTextColor macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// + /// COLORREF value that contains the new text color. If this argument is -1, the control will revert to using the system + /// color for the text color. + /// + /// Returns + /// + /// Returns a COLORREF value that represents the previous text color. If this value is -1, the control was using the + /// system color for the text color. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tvm-settextcolor TVM_SETTEXTCOLOR = TV_FIRST + 30, + + /// + /// Retrieves the current background color of the control. You can send this message explicitly or by using the + /// TreeView_GetBkColor macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// + /// Returns a COLORREF value that represents the current background color. If this value is -1, the control is using the + /// system color for the background color. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tvm-getbkcolor TVM_GETBKCOLOR = TV_FIRST + 31, + + /// + /// Retrieves the current text color of the control. You can send this message explicitly or by using the + /// TreeView_GetTextColor macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// + /// Returns a COLORREF value that represents the current text color. If this value is -1, the control is using the system + /// color for the text color. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tvm-gettextcolor TVM_GETTEXTCOLOR = TV_FIRST + 32, + + /// + /// Sets the maximum scroll time for the tree-view control. You can send this message explicitly or by using the + /// TreeView_SetScrollTime macro. + /// + /// Parameters + /// wParam + /// New maximum scroll time, in milliseconds. + /// lParam + /// Must be zero. + /// Returns + /// Returns the previous maximum scroll time, in milliseconds. + /// + /// The maximum scroll time is the longest amount of time that a scroll operation can take. Scrolling will be adjusted so that + /// the scroll will take place within the maximum scroll time. A scroll operation may take less time than the maximum. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tvm-setscrolltime TVM_SETSCROLLTIME = TV_FIRST + 33, + + /// + /// Retrieves the maximum scroll time for the tree-view control. You can send this message explicitly or by using the + /// TreeView_GetScrollTime macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns the maximum scroll time, in milliseconds. + /// + /// The maximum scroll time is the longest amount of time that a scroll operation can take. The scrolling will be adjusted so + /// that the scroll will take place within the maximum scroll time. A scroll operation may take less time than the maximum. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tvm-getscrolltime TVM_GETSCROLLTIME = TV_FIRST + 34, + + /// + /// Sets the color used to draw the insertion mark for the tree view. You can send this message explicitly or by using the + /// TreeView_SetInsertMarkColor macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// COLORREF value that contains the new insertion mark color. + /// Returns + /// Returns a COLORREF value that contains the previous insertion mark color. + // https://docs.microsoft.com/en-us/windows/win32/controls/tvm-setinsertmarkcolor TVM_SETINSERTMARKCOLOR = TV_FIRST + 37, + + /// + /// Retrieves the color used to draw the insertion mark for the tree view. You can send this message explicitly or by using the + /// TreeView_GetInsertMarkColor macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns a COLORREF value that contains the current insertion mark color. + // https://docs.microsoft.com/en-us/windows/win32/controls/tvm-getinsertmarkcolor TVM_GETINSERTMARKCOLOR = TV_FIRST + 38, + + /// + /// Intended for internal use; not recommended for use in applications. + /// + /// Sets the size of the border for the items in a tree-view control. You can send the message explicitly or by using the + /// TreeView_SetBorder macro. + /// + /// + /// Parameters + /// wParam + /// Action flags. This parameter can be one or more of the following values: + /// + /// + /// Value + /// Meaning + /// + /// + /// TVSBF_XBORDER + /// Applies the specified border size to the left side of the items in the tree-view control. + /// + /// + /// TVSBF_YBORDER + /// Applies the specified border size to the top of the items in the tree-view control. + /// + /// + /// lParam + /// + /// The LOWORD is a SHORT that specifies the size of the left border, in pixels. The HIWORD is a + /// SHORT that specifies the size of the top border, in pixels. + /// + /// Returns + /// + /// Returns a LONG value that contains the previous border size, in pixels. The LOWORD contains the previous size + /// of the horizontal border, and the HIWORD contains the previous size of the vertical border. + /// + /// + /// Security Warning: Using this message might compromise the security of your program. + /// The item border is set just for spacing purposes. A successful setting triggers a recalculation of the scroll bars. + /// + /// This message may not be supported in future versions of Comctl32.dll. Also, this message is not defined in commctrl.h. Add + /// the following definitions to the source files of your application to use the message: + /// + /// + /// #define TVM_SETBORDER (TV_FIRST + 35) #define TVSBF_XBORDER 0x00000001 #define TVSBF_YBORDER 0x00000002 + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tvm-setborder TVM_SETBORDER = TV_FIRST + 35, + + /// + /// Retrieves some or all of a tree-view item's state attributes. You can send this message explicitly or by using the + /// TreeView_GetItemState macro. + /// + /// Parameters + /// wParam + /// Handle to the item. + /// lParam + /// Mask used to specify the states to query for. It is equivalent to the stateMask member of TVITEMEX. + /// Returns + /// + /// Returns a UINT value with the appropriate state bits set to TRUE. Only those bits that are specified by lParam + /// and that are TRUE will be set. This value is equivalent to the state member of TVITEMEX. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tvm-getitemstate TVM_GETITEMSTATE = TV_FIRST + 39, + + /// The TVM_SETLINECOLOR message sets the current line color. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// New line color. Use the CLR_DEFAULT value to restore the system default colors. + /// Returns + /// Returns the previous line color. + /// + /// This message only changes line colors. To change the colors of the '+' and '-' inside the buttons, use the + /// TVM_SETTEXTCOLOR message. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tvm-setlinecolor TVM_SETLINECOLOR = TV_FIRST + 40, + + /// The TVM_GETLINECOLOR message gets the current line color. + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns the current line color, or the CLR_DEFAULT value if none has been specified. + /// + /// This message only retrieves line colors. To retrieve the colors of the '+' and '-' inside the buttons, use the + /// TVM_GETTEXTCOLOR message. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tvm-getlinecolor TVM_GETLINECOLOR = TV_FIRST + 41, + + /// Maps an accessibility ID to an HTREEITEM. + /// Parameters + /// wParam + /// **UINT** that contains the accessibility ID to map to an **HTREEITEM**. + /// lParam + /// Must be zero. + /// Returns + /// Returns the HTREEITEM that the specified accessibility ID is mapped to. + /// + /// When you add an item to a tree-view control an HTREEITEM returns, which uniquely identifies the item. + /// + /// Note + /// + /// To use this message, you must provide a manifest specifying Comclt32.dll version 6.0. For more information on manifests, see + /// Enabling Visual Styles. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tvm-mapaccidtohtreeitem TVM_MAPACCIDTOHTREEITEM = TV_FIRST + 42, + + /// Maps an HTREEITEM to an accessibility ID. + /// Parameters + /// wParam + /// **HTREEITEM** that is mapped to an accessibility ID. + /// lParam + /// Must be zero. + /// Returns + /// Returns an accessibility ID. + /// + /// When you add an item to a tree-view control an HTREEITEM handle is returned that uniquely identifies the item. + /// + /// Note + /// + /// To use this message, you must provide a manifest specifying Comclt32.dll version 6.0. For more information on manifests, see + /// Enabling Visual Styles. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tvm-maphtreeitemtoaccid TVM_MAPHTREEITEMTOACCID = TV_FIRST + 43, + + /// Informs the tree-view control to set extended styles. Send this message or use the macro TreeView_SetExtendedStyle. + /// Parameters + /// wParam + /// Mask used to select the styles to be set. + /// lParam + /// Value that indicates the extended style. For more information on styles, see Tree-View Control Extended Styles. + /// Returns + /// If this message succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code. + /// + /// The extended styles for a tree-view control have nothing to do with the extended styles used with function + /// CreateWindowEx or function SetWindowLong. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tvm-setextendedstyle TVM_SETEXTENDEDSTYLE = TV_FIRST + 44, + + /// + /// Retrieves the extended style for a tree-view control. Send this message explicitly or by using the + /// TreeView_GetExtendedStyle macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// Returns + /// Returns the value of extended style.For more information on styles, see Tree-View Control Extended Styles. + /// + /// The extended styles for a tree-view control have nothing to do with the extended styles used with function + /// CreateWindowEx or function SetWindowLong. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tvm-getextendedstyle TVM_GETEXTENDEDSTYLE = TV_FIRST + 45, + + /// + /// Inserts a new item in a tree-view control. You can send this message explicitly or by using the TreeView_InsertItem macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Pointer to a TVINSERTSTRUCT structure that specifies the attributes of the tree-view item. + /// Returns + /// Returns the HTREEITEM handle to the new item if successful, or NULL otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/tvm-insertitem TVM_INSERTITEM = TV_FIRST + 50, + + /// + /// Sets information used to determine auto-scroll characteristics. You can send this message explicitly or by using the + /// TreeView_SetAutoScrollInfo macro. + /// + /// Parameters + /// wParam + /// Specifies pixels per second. The offset to scroll is divided by the wParam to determine the total duration of the auto-scroll. + /// lParam + /// + /// Specifies the redraw time interval. Redraw at every elasped interval, until the item is scrolled into view. Given wParam, the + /// location of the item is calculated and a repaint occurs. Set this value to create smooth scrolling. + /// + /// Returns + /// Returns TRUE. + /// + /// Autoscroll information is used to scroll a nonvisible item into view. The control must have the TVS_EX_AUTOHSCROLL + /// extended style. For information on extended styles, see Tree-View Control Extended Styles. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tvm-setautoscrollinfo TVM_SETAUTOSCROLLINFO = TV_FIRST + 59, + + /// + /// + /// [Intended for internal use; not recommended for use in applications. This message may not be supported in future versions of Windows.] + /// + /// + /// Sets the hot item for a tree-view control. You can send this message explicitly or by using the TreeView_SetHot macro. + /// + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Handle to the new hot item. If this value is NULL, the tree-view control will be set to have no hot item. + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + /// + /// + /// The hot item is the item that the mouse is hovering over. This message makes an item look like it is the hot item even if the + /// mouse is not hovering over it. + /// + /// This message has no visible effect if the TVS_TRACKSELECT style is not set. + /// If it succeeds, this message causes the hot item to be redrawn. + /// This message is ignored if lParam is NULL and the tree-view control is tracking the mouse. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tvm-sethot TVM_SETHOT = TV_FIRST + 58, + + /// + /// Retrieves some or all of a tree-view item's attributes. You can send this message explicitly or by using the + /// TreeView_GetItem macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// + /// Pointer to a TVITEM structure that specifies the information to retrieve and receives information about the item. With + /// version 4.71 and later, you can use a TVITEMEX structure instead. + /// + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + /// + /// + /// When the message is sent, the hItem member of the TVITEM or TVITEMEX structure identifies the item to + /// retrieve information about, and the mask member specifies the attributes to retrieve. + /// + /// + /// If the TVIF_TEXT flag is set in the mask member of the TVITEM or TVITEMEX structure, the pszText + /// member must point to a valid buffer and the cchTextMax member must be set to the number of characters in that buffer. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tvm-getitem TVM_GETITEM = TV_FIRST + 62, + + /// + /// The TVM_SETITEM message sets some or all of a tree-view item's attributes. You can send this message explicitly or by + /// using the TreeView_SetItem macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// + /// Pointer to a TVITEM structure that contains the new item attributes. With version 4.71 and later, you can use a + /// TVITEMEX structure instead. + /// + /// Returns + /// Returns TRUE if successful, or FALSE otherwise. + /// + /// The hItem member of the TVITEM or TVITEMEX structure identifies the item, and the mask member + /// specifies which attributes to set. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tvm-setitem TVM_SETITEM = TV_FIRST + 63, + + /// + /// Retrieves the incremental search string for a tree-view control. The tree-view control uses the incremental search string to + /// select an item based on characters typed by the user. You can send this message explicitly or by using the + /// TreeView_GetISearchString macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Pointer to the buffer that receives the incremental search string. + /// Returns + /// Returns the number of characters in the incremental search string. + /// + /// + /// Security Warning: Using this message incorrectly might compromise the security of your program. You must allocate a + /// large enough buffer to hold the string. First call the message passing NULL in lParam. This returns the number of + /// characters, excluding NULL, that are required. Then call the message a second time to retrieve the string. You should + /// review Security Considerations: Microsoft Windows Controls before continuing. + /// + /// If the tree-view control is not in incremental search mode, the return value is zero. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tvm-getisearchstring TVM_GETISEARCHSTRING = TV_FIRST + 64, + + /// + /// Begins in-place editing of the specified item's text, replacing the text of the item with a single-line edit control + /// containing the text. This message implicitly selects and focuses the specified item. You can send this message explicitly or + /// by using the TreeView_EditLabel macro. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Handle to the item to edit. + /// Returns + /// Returns the handle to the edit control used to edit the item text if successful, or NULL otherwise. + /// + /// This message sends a TVN_BEGINLABELEDIT notification code to the parent of the tree-view control. + /// + /// When the user completes or cancels editing, the edit control is destroyed and the handle is no longer valid. You can subclass + /// the edit control, but do not destroy it. + /// + /// + /// The control must have the focus before you send this message to the control. Focus can be set using the SetFocus function. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tvm-editlabel TVM_EDITLABEL = TV_FIRST + 65, + + /// This message is not implemented. + // https://docs.microsoft.com/en-us/windows/win32/controls/tvm-getselectedcount TVM_GETSELECTEDCOUNT = TV_FIRST + 70, + + /// + /// Shows the infotip for a specified item in a tree-view control. You can send this message explicitly or by using the + /// TreeView_ShowInfoTip macro.. + /// + /// Parameters + /// wParam + /// Must be zero. + /// lParam + /// Handle to the item. + /// Returns + /// Returns zero. + /// + /// Most applications do not use this message. Infotips are shown automatically. For more information, see Using Tree-view + /// Infotips in the About Tree-View Controls overview. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tvm-showinfotip TVM_SHOWINFOTIP = TV_FIRST + 71, + + /// This message is not implemented. + // https://docs.microsoft.com/en-us/windows/win32/controls/tvm-getitempartrect TVM_GETITEMPARTRECT = TV_FIRST + 72, -#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member } /// Tree View Notifications [PInvokeData("Commctrl.h", MSDNShortId = "ff486107")] public enum TreeViewNotification { -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + /// + /// + /// Sent by a tree-view control to its parent when the drawing of a icon or overlay has failed. This notification code is sent in + /// the form of a WM_NOTIFY message. + /// + /// + /// TVN_ASYNCDRAW pnmTVAsynchDraw = (NMTVASYNCDRAW *) lParam; + /// + /// + /// Parameters + /// lParam + /// Pointer to an NMTVASYNCDRAW structure. The NMTVASYNCDRAW structure contains the reason the draw failed. + /// Returns + /// No return value. + /// + /// + /// The tree-view control must have the TVS_EX_DRAWIMAGEASYNC extended style. Note that this is equivalent to list-view's + /// LVN_ASYNCDRAWN flag and its corresponding style. + /// + /// + /// This control does not draw asynchronously. Asynchronous is used in the context that the tree-view control does not + /// synchronously extract an image if it is not available. (For instance, the image may not be available if the tree-view control + /// uses a sparse image list, since the image may be unloaded.) Instead, when an image is not available, the control + /// synchronously asks the parent what action to take by sending the parent an TVN_ASYNCDRAW notification with a + /// NMTVASYNCDRAW structure. The hr member of this structure describes the reason the control's draw failed. An + /// hr result of E_PENDING means the image is not present at all (the image needs to be extracted). Success indicates that + /// the image is present but not at the required image quality. + /// + /// + /// The parent sets the dwRetFlags member of the structure to inform the control how to proceed. For instance, the parent + /// may return another image, in the iRetImageIndex member, for the control to draw. In this case, the parent sets the + /// dwRetFlags member to ADRF_DRAWIMAGE. If the control finds the returned image has not been extracted, yet another + /// TVN_ASYNCDRAW notification may be sent by the control. + /// + /// + /// If an image is not available, the idea behind asynchronous is to allow the parent do the extraction in the background so that + /// extraction does not block the UI thread, that is, the thread the control is on. The parent may return ADRF_DRAWNOTHING to the + /// control, then launch a background thread to extract the icon. Once extracted, the parent may set the icon in the treeview + /// control with macro TreeView_SetItem. This causes tree-view to invalidate the item and eventually repaint it with the + /// extracted image in the image list. + /// + /// + /// The following code example, to be used as part of a larger program, shows how a parent may process two possible return codes + /// in this notification by a control, and decide what action the control should take. Setting dwRetFlags is not shown. + /// + /// + /// case TVN_ASYNCDRAW: NMTVASYNCDRAW *pnm = (NMTVASYNCDRAW *)lParam short dwDrawSuccessFlags = ShortFromResult(pnm->hr); if (dwDrawSuccessFlags & ILDRF_IMAGELOWQUALITY) { // Need to re-extract the icon } if (dwDrawSuccessFlags & ILDRF_OVERLAYLOWQUALITY) { // Need to re-extract the overlay } + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tvn-asyncdraw TVN_ASYNCDRAW = TVN_FIRST - 20, + + /// + /// + /// Notifies a tree-view control's parent window that a drag-and-drop operation involving the left mouse button is being + /// initiated. This notification code is sent in the form of a WM_NOTIFY message. + /// + /// + /// TVN_BEGINDRAG pnmtv = (LPNMTREEVIEW) lParam + /// + /// + /// Parameters + /// lParam + /// + /// Pointer to an NMTREEVIEW structure. The itemNew member is a TVITEM structure that contains valid + /// information about the item being dragged in the hItem, state, and lParam members. The ptDrag + /// member specifies the current screen coordinates of the mouse. + /// + /// Returns + /// The return value is ignored. + /// A tree-view control that has the TVS_DISABLEDRAGDROP style does not send this notification code. + // https://docs.microsoft.com/en-us/windows/win32/controls/tvn-begindrag TVN_BEGINDRAG = TVN_FIRST - 56, + + /// + /// + /// Notifies a tree-view control's parent window about the start of label editing for an item. This notification code is sent in + /// the form of a WM_NOTIFY message. + /// + /// + /// TVN_BEGINLABELEDIT ptvdi = (LPNMTVDISPINFO) lParam + /// + /// + /// Parameters + /// lParam + /// + /// Pointer to an NMTVDISPINFO structure. The item member is a TVITEM structure that contains valid + /// information about the item being edited in the hItem, state, lParam, and pszText members. + /// + /// Returns + /// Returns TRUE to cancel label editing. + /// + /// + /// When label editing begins, an edit control is created but not positioned or displayed. Before it is displayed, the tree-view + /// control sends its parent window a TVN_BEGINLABELEDIT notification code. + /// + /// + /// To customize label editing, implement a handler for TVN_BEGINLABELEDIT and have it send a TVM_GETEDITCONTROL message + /// to the tree-view control. If a label is being edited, the return value will be a handle to the edit control. Use this handle + /// to customize the edit control by sending the usual EM_XXX messages. + /// + /// When the user cancels or completes the editing, the parent window receives a TVN_ENDLABELEDIT notification code. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tvn-beginlabeledit TVN_BEGINLABELEDIT = TVN_FIRST - 59, + + /// + /// + /// Notifies a tree-view control's parent window about the initiation of a drag-and-drop operation involving the right mouse + /// button. This notification code is sent in the form of a WM_NOTIFY message. + /// + /// + /// TVN_BEGINRDRAG pnmtv = (LPNMTREEVIEW) lParam + /// + /// + /// Parameters + /// lParam + /// + /// Pointer to an NMTREEVIEW structure. The itemNew member is a TVITEM structure that contains valid + /// information in the hItem, state, and lParam members about the item to be dragged. The ptDrag + /// member specifies the current screen coordinates of the mouse. + /// + /// Returns + /// The return value is ignored. + // https://docs.microsoft.com/en-us/windows/win32/controls/tvn-beginrdrag TVN_BEGINRDRAG = TVN_FIRST - 57, + + /// + /// + /// Notifies a tree-view control's parent window that an item is being deleted. This notification code is sent in the form of a + /// WM_NOTIFY message. + /// + /// + /// TVN_DELETEITEM pnmtv = (LPNMTREEVIEW) lParam + /// + /// + /// Parameters + /// lParam + /// + /// Pointer to an NMTREEVIEW structure. The itemOld member is a TVITEM structure whose hItem and + /// lParam members contain valid information about the item being deleted. + /// + /// Returns + /// The return value is ignored. + /// + /// If the lParam member of the TVITEM structure points to memory allocated by your application, you can free it + /// when you receive the TVN_DELETEITEM notification code. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tvn-deleteitem TVN_DELETEITEM = TVN_FIRST - 58, + + /// + /// + /// Notifies a tree-view control's parent window about the end of label editing for an item. This notification code is sent in + /// the form of a WM_NOTIFY message. + /// + /// + /// TVN_ENDLABELEDIT ptvdi = (LPNMTVDISPINFO) lParam + /// + /// + /// Parameters + /// lParam + /// + /// Pointer to an NMTVDISPINFO structure. The item member of this structure is a TVITEM structure whose + /// hItem, lParam, and pszText members contain valid information about the item that was edited. If label + /// editing was canceled, the pszText member of the TVITEM structure is NULL; otherwise, pszText is + /// the address of the edited text. + /// + /// Returns + /// + /// If the pszText member is non- NULL, return TRUE to set the item's label to the edited text. Return + /// FALSE to reject the edited text and revert to the original label. + /// + /// + /// If the pszText member is NULL, the return value is ignored. + /// + /// If you specified the LPSTR_TEXTCALLBACK value for this item and the pszText member is non- NULL, your + /// TVN_ENDLABELEDIT handler should copy the text from pszText to your local storage. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tvn-endlabeledit TVN_ENDLABELEDIT = TVN_FIRST - 60, + + /// + /// + /// Requests that a tree-view control's parent window provide information needed to display or sort an item. This notification + /// code is sent in the form of a WM_NOTIFY message. + /// + /// + /// TVN_GETDISPINFO lptvdi = (LPNMTVDISPINFO) lParam + /// + /// + /// Parameters + /// lParam + /// + /// Pointer to an NMTVDISPINFO structure. The item member is a TVITEM structure whose mask, + /// hItem, state, and lParam members specify the type of information required. You must fill the members of + /// the structure with the appropriate information. + /// + /// Returns + /// The return value is ignored. + /// + /// This notification code is sent under the following circumstances: + /// + /// + /// + /// If the pszText member of the item's TVITEM structure is the LPSTR_TEXTCALLBACK value, the control sends this + /// notification code to retrieve the item's text. In this case, the mask member of lParam will have the TVIF_TEXT flag set. + /// + /// + /// + /// + /// If the iImage or iSelectedImage member of the item's TVITEM structure is the I_IMAGECALLBACK value, the + /// control sends this notification code to retrieve the index of an item's icons in the control's image list. In this case, if + /// the item is selected, the mask member of lParam will have the TVIF_SELECTEDIMAGE flag set. If the item is not + /// selected, the mask member of lParam will have the TVIF_IMAGE flag set. + /// + /// + /// + /// + /// If the cChildren member of the item's TVITEM structure is the I_CHILDRENCALLBACK value, the control sends this + /// notification code to retrieve a value that indicates whether the item has child items. In this case, the mask member + /// of lParam will have the TVIF_CHILDREN flag set. + /// + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tvn-getdispinfo TVN_GETDISPINFO = TVN_FIRST - 52, + + /// + /// + /// Sent by a tree-view control that has the TVS_INFOTIP style. This notification code is sent when the control is + /// requesting additional text information to be displayed in a tooltip. The notification code is sent in the form of a + /// WM_NOTIFY message. + /// + /// + /// TVN_GETINFOTIP lpGetInfoTip = (LPNMTVGETINFOTIP)lParam; + /// + /// + /// Parameters + /// lParam + /// Pointer to an NMTVGETINFOTIP structure that contains information about this notification code. + /// Returns + /// The control ignores the return value for this notification code. + /// This notification code is only sent by tree-view controls that have the TVS_INFOTIP style. + // https://docs.microsoft.com/en-us/windows/win32/controls/tvn-getinfotip TVN_GETINFOTIP = TVN_FIRST - 14, + + /// + /// + /// Notifies a tree-view control's parent window that item attributes have changed. This notification code is sent in the form of + /// a WM_NOTIFY message. + /// + /// + /// TVN_ITEMCHANGED pnm = (NMTVITEMCHANGE *) lParam; + /// + /// + /// Parameters + /// lParam + /// + /// Pointer to a NMTVITEMCHANGE structure describing the item that changed. The uChanged member is set to TVIF_STATE. + /// + /// Returns + /// Returns FALSE to accept the change, or TRUE to prevent the change. + // https://docs.microsoft.com/en-us/windows/win32/controls/tvn-itemchanged TVN_ITEMCHANGED = TVN_FIRST - 19, + + /// + /// + /// Notifies a tree-view control's parent window that item attributes are about to change. This notification code is sent in the + /// form of a WM_NOTIFY message. + /// + /// + /// TVN_ITEMCHANGING pnm = (NMTVITEMCHANGE *) lParam; + /// + /// + /// Parameters + /// lParam + /// + /// Pointer to an NMTVITEMCHANGE structure describing the item that is changing. The uChanged member is set to TVIF_STATE. + /// + /// Returns + /// Returns FALSE to accept the change, or TRUE to prevent the change. + // https://docs.microsoft.com/en-us/windows/win32/controls/tvn-itemchanging TVN_ITEMCHANGING = TVN_FIRST - 17, + + /// + /// + /// Notifies a tree-view control's parent window that a parent item's list of child items has expanded or collapsed. This + /// notification code is sent in the form of a WM_NOTIFY message. + /// + /// + /// TVN_ITEMEXPANDED pnmtv = (LPNMTREEVIEW) lParam + /// + /// + /// Parameters + /// lParam + /// + /// Pointer to an NMTREEVIEW structure. The itemNew member is a TVITEM structure that contains valid + /// information about the parent item in the hItem, state, and lParam members. The action member + /// indicates whether the list expanded or collapsed. For a list of possible values, see the description of the TVM_EXPAND message. + /// + /// Returns + /// The return value is ignored. + // https://docs.microsoft.com/en-us/windows/win32/controls/tvn-itemexpanded TVN_ITEMEXPANDED = TVN_FIRST - 55, + + /// + /// + /// Notifies a tree-view control's parent window that a parent item's list of child items is about to expand or collapse. This + /// notification code is sent in the form of a WM_NOTIFY message. + /// + /// + /// TVN_ITEMEXPANDING pnmtv = (LPNMTREEVIEW) lParam + /// + /// + /// Parameters + /// lParam + /// + /// Pointer to an NMTREEVIEW structure. The itemNew member is a TVITEM structure that contains valid + /// information about the parent item in the hItem, state, and lParam members. The action member + /// indicates whether the list is to expand or collapse. For a list of possible values, see the description of the + /// TVM_EXPAND message. + /// + /// Returns + /// Returns TRUE to prevent the list from expanding or collapsing. + // https://docs.microsoft.com/en-us/windows/win32/controls/tvn-itemexpanding TVN_ITEMEXPANDING = TVN_FIRST - 54, + + /// + /// + /// Notifies a tree-view control's parent window that the user pressed a key and the tree-view control has the input focus. This + /// notification code is sent in the form of a WM_NOTIFY message. + /// + /// + /// TVN_KEYDOWN ptvkd = (LPNMTVKEYDOWN) lParam + /// + /// + /// Parameters + /// lParam + /// Pointer to an NMTVKEYDOWN structure. The wVKey member specifies the virtual key code. + /// Returns + /// + /// If the wVKey member of lParam is a character key code, the character will be used as part of an incremental search. + /// Return nonzero to exclude the character from the incremental search, or zero to include the character in the search. For all + /// other keys, the return value is ignored. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tvn-keydown TVN_KEYDOWN = TVN_FIRST - 12, + + /// + /// + /// Notifies a tree-view control's parent window that the selection has changed from one item to another. This notification code + /// is sent in the form of a WM_NOTIFY message. + /// + /// + /// TVN_SELCHANGED pnmtv = (LPNMTREEVIEW) lParam + /// + /// + /// Parameters + /// lParam + /// + /// Pointer to an NMTREEVIEW structure. The itemOld and itemNew members of the NMTREEVIEW structure + /// are TVITEM structures that contain information about the previously selected item and the newly selected item. Only + /// the mask, hItem, state, and lParam members of these structures are valid. The stateMask + /// members of the TVITEM structures specified by itemOld and itemNew are undefined on input. The + /// action member of the NMTREEVIEW structure indicates the type of action that caused the selection to change. It + /// can be one of the following values: + /// + /// + /// + /// Requirement + /// Value + /// + /// + /// TVC_BYKEYBOARD + /// By a keystroke. + /// + /// + /// TVC_BYMOUSE + /// By a mouse click. + /// + /// + /// TVC_UNKNOWN + /// Unknown. + /// + /// + /// Returns + /// The return value is ignored. + // https://docs.microsoft.com/en-us/windows/win32/controls/tvn-selchanged TVN_SELCHANGED = TVN_FIRST - 51, + + /// + /// + /// Notifies a tree-view control's parent window that the selection is about to change from one item to another. This + /// notification code is sent in the form of a WM_NOTIFY message. + /// + /// + /// TVN_SELCHANGING pnmtv = (LPNMTREEVIEW) lParam + /// + /// + /// Parameters + /// lParam + /// + /// Pointer to an NMTREEVIEW structure. The itemOld and itemNew members contain valid information about the + /// currently selected item and the newly selected item. The action member indicates whether a mouse or keyboard action is + /// causing the selection to change. For a list of possible values, see the description of the TVN_SELCHANGED notification code. + /// + /// Returns + /// Returns TRUE to prevent the selection from changing. + /// + /// When responding to this notification code, applications should not delete the items that are gaining or losing the selection. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tvn-selchanging TVN_SELCHANGING = TVN_FIRST - 50, + + /// + /// + /// Notifies a tree-view control's parent window that it must update the information it maintains about an item. This + /// notification code is sent in the form of a WM_NOTIFY message. + /// + /// + /// TVN_SETDISPINFO lptvdi = (LPNMTVDISPINFO) lParam + /// + /// + /// Parameters + /// lParam + /// + /// Pointer to an NMTVDISPINFO structure that describes the item being updated. The hItem member of the + /// TVITEM structure specifies the item being updated, and the mask member specifies which attributes of the item + /// are being updated. + /// + /// Returns + /// The return value is ignored. + /// + /// + /// If the pszText member of the item's TVITEM structure is the LPSTR_TEXTCALLBACK value, the control sends this + /// notification to set the item's text. In this case, the mask member of lParam will have the TVIF_TEXT flag set. + /// + /// + /// If the iImage or iSelectedImage member of the item's TVITEM structure is the I_IMAGECALLBACK value, the + /// control sends this notification to retrieve the index of the icon image to display. In this case, the mask member of + /// lParam will have the TVIF_IMAGE or TVIF_SELECTEDIMAGE flag set. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tvn-setdispinfo TVN_SETDISPINFO = TVN_FIRST - 53, + + /// + /// + /// Sent by a tree-view control with the TVS_SINGLEEXPAND style when the user opens or closes a tree item using a single + /// click of the mouse. This notification code is sent in the form of a WM_NOTIFY message. + /// + /// + /// TVN_SINGLEEXPAND lpnmtv = (LPNMTREEVIEW)lParam; + /// + /// + /// Parameters + /// lParam + /// Pointer to an NMTREEVIEW structure that contains information about this notification code. + /// Returns + /// Return TVNRET_DEFAULT to allow the default behavior to occur. To modify the default behavior, return: + /// + /// + /// Return code + /// Description + /// + /// + /// TVNRET_SKIPOLD + /// Skip default processing of the item being unselected. + /// + /// + /// TVNRET_SKIPNEW + /// Skip default processing of the item being selected. + /// + /// + /// + /// + /// To skip default processing of selected and unselected items, return both TVNRET_SKIPOLD and TVNRET_SKIPNEW by combining them + /// with a logical OR. + /// + /// This notification code is only sent by tree-view controls that have the TVS_SINGLEEXPAND style. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/tvn-singleexpand TVN_SINGLEEXPAND = TVN_FIRST - 15, -#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member } /// Used as return values to the TVN_SINGLEEXPAND notification. diff --git a/PInvoke/ComCtl32/CommCtrl.UpDown.cs b/PInvoke/ComCtl32/CommCtrl.UpDown.cs index 9989632b..6e27d67e 100644 --- a/PInvoke/ComCtl32/CommCtrl.UpDown.cs +++ b/PInvoke/ComCtl32/CommCtrl.UpDown.cs @@ -21,57 +21,251 @@ namespace Vanara.PInvoke public enum UpDownMessage : uint { /// Retrieves acceleration information for an up-down control. + /// + /// Parameters + /// + /// wParam + /// Number of elements in the array specified by lParam. + /// lParam + /// Pointer to an array of UDACCEL structures that receive acceleration information. + /// + /// Returns + /// + /// The return value is the number of accelerators currently set for the control. + // https://docs.microsoft.com/en-us/windows/win32/controls/udm-getaccel UDM_GETACCEL = WindowMessage.WM_USER + 108, /// Retrieves the current radix base (that is, either base 10 or 16) for an up-down control. + /// + /// Parameters + /// + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// + /// Returns + /// + /// The return value is the current base value. + // https://docs.microsoft.com/en-us/windows/win32/controls/udm-getbase UDM_GETBASE = WindowMessage.WM_USER + 110, /// Retrieves the handle to the current buddy window. + /// + /// Parameters + /// + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// + /// Returns + /// + /// The return value is the handle to the current buddy window. + // https://docs.microsoft.com/en-us/windows/win32/controls/udm-getbuddy UDM_GETBUDDY = WindowMessage.WM_USER + 106, - /// Retrieves the current position of an up-down control with 16-bit precision. + /// Returns the 32-bit position of an up-down control. + /// + /// Parameters + /// + /// wParam + /// Must be zero. + /// lParam + /// Pointer to a BOOL value that is set to zero if the value is successfully retrieved or nonzero if an error occurs. If this parameter is set to NULL, errors are not reported. + /// If UDM_GETPOS32 is used in a cross-process situation, this parameter must be NULL. + /// + /// Returns + /// + /// Returns the position of an up-down control with 32-bit precision. Applications must check the lParam value to determine whether the return value is valid. + /// When it processes this message, the up-down control updates its current position based on the caption of the buddy window. It returns an error if there is no buddy window or if the caption specifies an invalid or out-of-range value. + // https://docs.microsoft.com/en-us/windows/win32/controls/udm-getpos32 UDM_GETPOS = WindowMessage.WM_USER + 104, /// Returns the 32-bit position of an up-down control. + /// + /// Parameters + /// + /// wParam + /// Must be zero. + /// lParam + /// Pointer to a BOOL value that is set to zero if the value is successfully retrieved or nonzero if an error occurs. If this parameter is set to NULL, errors are not reported. + /// If UDM_GETPOS32 is used in a cross-process situation, this parameter must be NULL. + /// + /// Returns + /// + /// Returns the position of an up-down control with 32-bit precision. Applications must check the lParam value to determine whether the return value is valid. + /// When it processes this message, the up-down control updates its current position based on the caption of the buddy window. It returns an error if there is no buddy window or if the caption specifies an invalid or out-of-range value. + // https://docs.microsoft.com/en-us/windows/win32/controls/udm-getpos32 UDM_GETPOS32 = WindowMessage.WM_USER + 114, /// Retrieves the minimum and maximum positions (range) for an up-down control. + /// + /// Parameters + /// + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// + /// Returns + /// + /// The return value is a 32-bit value that contains the minimum and maximum positions. The LOWORD is the maximum position for the control, and the HIWORD is the minimum position. + // https://docs.microsoft.com/en-us/windows/win32/controls/udm-getrange UDM_GETRANGE = WindowMessage.WM_USER + 102, /// Retrieves the 32-bit range of an up-down control. + /// + /// Parameters + /// + /// wParam + /// Pointer to a signed integer that receives the lower limit of the up-down control range. This parameter may be NULL. + /// lParam + /// Pointer to a signed integer that receives the upper limit of the up-down control range. This parameter may be NULL. + /// + /// Returns + /// + /// The return value for this message is not used. + // https://docs.microsoft.com/en-us/windows/win32/controls/udm-getrange32 UDM_GETRANGE32 = WindowMessage.WM_USER + 112, /// Retrieves the Unicode character format flag for the control. + /// + /// Parameters + /// + /// wParam + /// Must be zero. + /// lParam + /// Must be zero. + /// + /// Returns + /// + /// Returns the Unicode format flag for the control. If this value is nonzero, the control is using Unicode characters. If this value is zero, the control is using ANSI characters. + /// See the remarks for CCM_GETUNICODEFORMAT for a discussion of this message. + // https://docs.microsoft.com/en-us/windows/win32/controls/udm-getunicodeformat UDM_GETUNICODEFORMAT = CommonControlMessage.CCM_GETUNICODEFORMAT, /// Sets the acceleration for an up-down control. + /// + /// Parameters + /// + /// wParam + /// Number of UDACCEL structures specified by aAccels. + /// lParam + /// Pointer to an array of UDACCEL structures that contain acceleration information. Elements should be sorted in ascending order based on the nSec member. + /// + /// Returns + /// + /// Returns TRUE if successful, or FALSE otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/udm-setaccel UDM_SETACCEL = WindowMessage.WM_USER + 107, - /// - /// Sets the radix base for an up-down control. The base value determines whether the buddy window displays numbers in decimal or - /// hexadecimal digits. Hexadecimal numbers are always unsigned, and decimal numbers are signed. - /// + /// Sets the radix base for an up-down control. The base value determines whether the buddy window displays numbers in decimal or hexadecimal digits. Hexadecimal numbers are always unsigned, and decimal numbers are signed. + /// + /// Parameters + /// + /// wParam + /// New base value for the control. This parameter can be 10 for decimal or 16 for hexadecimal. + /// lParam + /// Must be zero. + /// + /// Returns + /// + /// The return value is the previous base value. If an invalid base is given, the return value is zero. + // https://docs.microsoft.com/en-us/windows/win32/controls/udm-setbase UDM_SETBASE = WindowMessage.WM_USER + 109, /// Sets the buddy window for an up-down control. + /// + /// Parameters + /// + /// wParam + /// Handle to the new buddy window. + /// lParam + /// Must be zero. + /// + /// Returns + /// + /// The return value is the handle to the previous buddy window. + // https://docs.microsoft.com/en-us/windows/win32/controls/udm-setbuddy UDM_SETBUDDY = WindowMessage.WM_USER + 105, /// Sets the current position for an up-down control with 16-bit precision. + /// + /// Parameters + /// + /// wParam + /// Must be zero. + /// lParam + /// New position for the up-down control. If the parameter is outside the control's specified range, lParam will be set to the nearest valid value. + /// + /// Returns + /// + /// The return value is the previous position. + /// This message only supports 16-bit positions. If 32-bit values have been enabled for an up-down control with UDM_SETRANGE32, use UDM_SETPOS32. + // https://docs.microsoft.com/en-us/windows/win32/controls/udm-setpos UDM_SETPOS = WindowMessage.WM_USER + 103, /// Sets the position of an up-down control with 32-bit precision. + /// + /// Parameters + /// + /// wParam + /// Must be zero. + /// lParam + /// Variable of type integer that specifies the new position for the up-down control. If the parameter is outside the control's specified range, lParam is set to the nearest valid value. + /// + /// Returns + /// + /// Returns the previous position. + // https://docs.microsoft.com/en-us/windows/win32/controls/udm-setpos32 UDM_SETPOS32 = WindowMessage.WM_USER + 113, /// Sets the minimum and maximum positions (range) for an up-down control. + /// + /// Parameters + /// + /// wParam + /// Must be zero. + /// lParam + /// The LOWORD is a short that specifies the maximum position for the up-down control, and the HIWORD is a short that specifies the minimum position. Neither position can be greater than the UD_MAXVAL value or less than the UD_MINVAL value. In addition, the difference between the two positions cannot exceed UD_MAXVAL. + /// + /// Returns + /// + /// No return value. + /// The maximum position can be less than the minimum position. Clicking the up arrow button moves the current position closer to the maximum position, and clicking the down arrow button moves toward the minimum position. + // https://docs.microsoft.com/en-us/windows/win32/controls/udm-setrange UDM_SETRANGE = WindowMessage.WM_USER + 101, /// Sets the 32-bit range of an up-down control. + /// + /// Parameters + /// + /// wParam + /// Signed integer value that represents the new lower limit of the up-down control range. + /// lParam + /// Signed integer value that represents the new upper limit of the up-down control range. + /// + /// Returns + /// + /// The return value for this message is not used. + // https://docs.microsoft.com/en-us/windows/win32/controls/udm-setrange32 UDM_SETRANGE32 = WindowMessage.WM_USER + 111, - /// - /// Sets the Unicode character format flag for the control. This message allows you to change the character set used by the - /// control at run time rather than having to re-create the control. - /// + /// Sets the Unicode character format flag for the control. This message allows you to change the character set used by the control at run time rather than having to re-create the control. + /// + /// Parameters + /// + /// wParam + /// Determines the character set that is used by the control. If this value is TRUE, the control will use Unicode characters. If this value is FALSE, the control will use ANSI characters. + /// lParam + /// Must be zero. + /// + /// Returns + /// + /// Returns the previous Unicode format flag for the control. + /// See the remarks for CCM_SETUNICODEFORMAT for a discussion of this message. + // https://docs.microsoft.com/en-us/windows/win32/controls/udm-setunicodeformat UDM_SETUNICODEFORMAT = CommonControlMessage.CCM_SETUNICODEFORMAT, } @@ -79,16 +273,36 @@ namespace Vanara.PInvoke public enum UpDownNotification : int { /// - /// Notifies an up-down control's parent window that the control is releasing mouse capture. This notification is sent in the - /// form of a WM_NOTIFY message. + /// Notifies a control's parent window that the control is releasing mouse capture. This notification code is sent in the form of a WM_NOTIFY message. + /// NM_RELEASEDCAPTURE lpnmh = (LPNMHDR) lParam; /// + /// + /// Parameters + /// + /// lParam + /// A pointer to an NMHDR structure that contains additional information about this notification. + /// + /// Returns + /// + /// Unless otherwise specified, the control ignores the return value from this notification code. + // https://docs.microsoft.com/en-us/windows/win32/controls/nm-releasedcapture NM_RELEASEDCAPTURE = UDN_FIRST - 1, /// - /// Sent by the operating system to the parent window of an up-down control when the position of the control is about to - /// change.This happens when the user requests a change in the value by pressing the control's up or down arrow. The UDN_DELTAPOS - /// message is sent in the form of a WM_NOTIFY message. + /// Sent by the operating system to the parent window of an up-down control when the position of the control is about to change. This happens when the user requests a change in the value by pressing the control's up or down arrow. This notification code is sent in the form of a WM_NOTIFY message. + /// UDN_DELTAPOS lpnmud = (LPNMUPDOWN) lParam; /// + /// + /// Parameters + /// + /// lParam + /// Pointer to an NMUPDOWN structure that contains information about the position change. The iPos member of this structure contains the current position of the control. The iDelta member of the structure is a signed integer that contains the proposed change in position. If the user has clicked the up button, this is a positive value. If the user has clicked the down button, this is a negative value. + /// + /// Returns + /// + /// Return nonzero to prevent the change in the control's position, or zero to allow the change. + /// The UDN_DELTAPOS notification code is sent before the WM_VSCROLL or WM_HSCROLL message, which actually changes the control's position. This lets you examine, allow, modify, or disallow the change. + // https://docs.microsoft.com/en-us/windows/win32/controls/udn-deltapos UDN_DELTAPOS = UDN_FIRST } @@ -205,7 +419,7 @@ namespace Vanara.PInvoke // nUpper, int nLower, int nPos); https://msdn.microsoft.com/en-us/library/windows/desktop/bb759977(v=vs.85).aspx [DllImport(Lib.ComCtl32, SetLastError = false, ExactSpelling = true)] [PInvokeData("Commctrl.h", MSDNShortId = "bb759977")] - public static extern IntPtr CreateUpDownControl(uint dwStyle, int x, int y, int cx, int cy, HWND hParent, int nID, HINSTANCE hInst, HWND hBuddy, int nUpper, int nLower, int nPos); + public static extern HWND CreateUpDownControl(uint dwStyle, int x, int y, int cx, int cy, HWND hParent, int nID, HINSTANCE hInst, HWND hBuddy, int nUpper, int nLower, int nPos); /// /// Contains information specific to up-down control notification messages. It is identical to and replaces the NM_UPDOWN structure. diff --git a/PInvoke/ComCtl32/CommCtrl.cs b/PInvoke/ComCtl32/CommCtrl.cs index 0b50cae7..3cbd6f38 100644 --- a/PInvoke/ComCtl32/CommCtrl.cs +++ b/PInvoke/ComCtl32/CommCtrl.cs @@ -135,83 +135,170 @@ namespace Vanara.PInvoke public enum CommonControlNotification { /// + /// /// Notifies a control's parent window that the control could not complete an operation because there was not enough memory - /// available. This notification code is sent in the form of a WM_NOTIFY message. - /// - /// - /// lParam - /// A pointer to an NMHDR structure that contains additional information about this notification. - /// - /// + /// available. This notification code is sent in the form of a WM_NOTIFY message. + /// + /// + /// NM_OUTOFMEMORY lpnmh = (LPNMHDR) lParam; + /// /// + /// Parameters + /// lParam + /// A pointer to an NMHDR structure that contains additional information about this notification. + /// Returns + /// The return value is ignored by the control. + // https://docs.microsoft.com/en-us/windows/win32/controls/nm-outofmemory NM_OUTOFMEMORY = NM_FIRST - 1, /// - /// Sent by a control when the user clicks with the left mouse button. This notification code is sent in the form of a WM_NOTIFY message. + /// + /// Sent by a list-view control when the user clicks an item with the left mouse button. This notification code is sent in the + /// form of a WM_NOTIFY message. + /// + /// + /// NM_CLICK lpnmitem = (LPNMITEMACTIVATE) lParam; + /// /// + /// Parameters + /// lParam + /// + /// Version 4.71. Pointer to an NMITEMACTIVATE structure that contains additional information about this notification. The + /// iItem, iSubItem, and ptAction members of this structure contain information about the item. + /// + /// Returns + /// The return value for this notification is not used. + /// + /// The iItem member of lParam is only valid if the icon or first-column label has been clicked. To determine which item + /// is selected when a click takes place elsewhere in a row, send an LVM_SUBITEMHITTEST message. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/nm-click-list-view NM_CLICK = NM_FIRST - 2, /// - /// Sent by a control when the user double-clicks with the left mouse button. This notification code is sent in the form of a - /// WM_NOTIFY message. + /// + /// Sent by a list-view control when the user double-clicks an item with the left mouse button. This notification code is sent in + /// the form of a WM_NOTIFY message. + /// + /// + /// NM_DBLCLK lpnmitem = (LPNMITEMACTIVATE) lParam; + /// /// + /// Parameters + /// lParam + /// + /// Version 4.71. Pointer to an NMITEMACTIVATE structure that contains additional information about this notification. The + /// iItem, iSubItem, and ptAction members of this structure contain information about the item. + /// + /// Returns + /// The return value for this notification is not used. + /// + /// The iItem member of lParam is only valid if the icon or first-column label has been clicked. To determine which item + /// is selected when a click takes place elsewhere in a row, send an LVM_SUBITEMHITTEST message. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/nm-dblclk-list-view NM_DBLCLK = NM_FIRST - 3, /// + /// /// Notifies a control's parent window that the control has the input focus and that the user has pressed the ENTER key. This - /// notification code is sent in the form of a WM_NOTIFY message. - /// - /// - /// lParam - /// A pointer to an NMHDR structure that contains additional information about this notification. - /// - /// + /// notification code is sent in the form of a WM_NOTIFY message. + /// + /// + /// NM_RETURN lpnmh = (LPNMHDR) lParam; + /// /// + /// Parameters + /// lParam + /// A pointer to an NMHDR structure that contains additional information about this notification. + /// Returns + /// The return value is ignored by the control. + // https://docs.microsoft.com/en-us/windows/win32/controls/nm-return NM_RETURN = NM_FIRST - 4, /// - /// Sent by a control when the user clicks with the right mouse button. This notification code is sent in the form of a WM_NOTIFY message. + /// + /// Notifies the parent window of a tree-view control that the user has clicked the right mouse button within the control. This + /// notification code is sent in the form of a WM_NOTIFY message. + /// + /// + /// NM_RCLICK lpnmh = (LPNMHDR) lParam; + /// /// + /// Parameters + /// lParam + /// Pointer to an NMHDR structure that contains additional information about this notification. + /// Returns + /// Return nonzero to prevent the default processing, or zero to allow the default processing. + // https://docs.microsoft.com/en-us/windows/win32/controls/nm-rclick-tree-view NM_RCLICK = NM_FIRST - 5, /// - /// Sent by a control when the user double-clicks with the right mouse button. This notification code is sent in the form of a - /// WM_NOTIFY message. + /// + /// Notifies the parent of a tree-view control that the user has double-clicked the right mouse button within the control. This + /// notification is sent in the form of a WM_NOTIFY message. + /// + /// + /// NM_RDBLCLK lpnmh = (LPNMHDR) lParam; + /// /// + /// Parameters + /// lParam + /// Pointer to an NMHDR structure that contains additional information about this notification. + /// Returns + /// Return nonzero to prevent the default processing, or zero to allow the default processing. + // https://docs.microsoft.com/en-us/windows/win32/controls/nm-rdblclk-tree-view NM_RDBLCLK = NM_FIRST - 6, /// + /// /// Notifies a control's parent window that the control has received the input focus. This notification code is sent in the form - /// of a WM_NOTIFY message. - /// - /// - /// lParam - /// A pointer to an NMHDR structure that contains additional information about this notification. - /// - /// + /// of a WM_NOTIFY message. + /// + /// + /// NM_SETFOCUS lpnmh = (LPNMHDR) lParam; + /// /// + /// Parameters + /// lParam + /// A pointer to an NMHDR structure that contains additional information about this notification. + /// Returns + /// The return value is ignored by the control. + // https://docs.microsoft.com/en-us/windows/win32/controls/nm-setfocus NM_SETFOCUS = NM_FIRST - 7, /// + /// /// Notifies a control's parent window that the control has lost the input focus. This notification code is sent in the form of a - /// WM_NOTIFY message. - /// - /// - /// lParam - /// A pointer to an NMHDR structure that contains additional information about this notification. - /// - /// + /// WM_NOTIFY message. + /// + /// + /// NM_KILLFOCUS lpnmh = (LPNMHDR) lParam; + /// /// + /// Parameters + /// lParam + /// A pointer to an NMHDR structure that contains additional information about this notification. + /// Returns + /// The return value is ignored by the control. + // https://docs.microsoft.com/en-us/windows/win32/controls/nm-killfocus NM_KILLFOCUS = NM_FIRST - 8, /// - /// Notifies a control's parent window about custom drawing operations. This notification code is sent in the form of a WM_NOTIFY message. - /// - /// - /// lParam - /// + /// + /// Notifies a control's parent window about custom drawing operations. This notification code is sent in the form of a + /// WM_NOTIFY message. + /// + /// + /// NM_CUSTOMDRAW #ifdef LIST_VIEW_CUSTOM_DRAW lpNMCustomDraw = (LPNMLVCUSTOMDRAW) lParam; #elif TOOL_TIPS_CUSTOM_DRAW lpNMCustomDraw = (LPNMTTCUSTOMDRAW) lParam; #elif TREE_VIEW_CUSTOM_DRAW lpNMCustomDraw = (LPNMTVCUSTOMDRAW) lParam; #elif TOOL_BAR_CUSTOM_DRAW lpNMCustomDraw = (LPNMTBCUSTOMDRAW) lParam; #else lpNMCustomDraw = (LPNMCUSTOMDRAW) lParam; #endif + /// + /// + /// Parameters + /// lParam + /// /// A pointer to a custom draw-related structure that contains information about the drawing operation. The following list /// specifies the controls and their associated structures. + /// /// /// /// Control @@ -219,210 +306,321 @@ namespace Vanara.PInvoke /// /// /// Rebar, trackbar, and header - /// NMCUSTOMDRAW + /// NMCUSTOMDRAW /// /// /// List view - /// NMLVCUSTOMDRAW + /// NMLVCUSTOMDRAW /// /// /// Tooltip - /// NMTTCUSTOMDRAW + /// NMTTCUSTOMDRAW /// /// /// Tree view - /// NMTVCUSTOMDRAW + /// NMTVCUSTOMDRAW /// /// /// Toolbar - /// NMTBCUSTOMDRAW - /// - /// - /// + /// NMTBCUSTOMDRAW /// /// + /// Returns + /// + /// The value your application can return depends on the current drawing stage. The dwDrawStage member of the associated + /// NMCUSTOMDRAW structure holds a value that specifies the drawing stage. You must return one of the following values. + /// + /// + /// + /// Return code + /// Description + /// /// - /// Return value - /// - /// The value your application can return depends on the current drawing stage. The dwDrawStage member of the associated - /// NMCUSTOMDRAW structure holds a value that specifies the drawing stage. - /// + /// CDRF_DODEFAULT + /// + /// The control will draw itself. It will not send additional NM_CUSTOMDRAW notification codes for this paint cycle. This flag + /// cannot be used with any other flag. + /// /// - /// + /// + /// CDRF_DOERASE + /// The control will only draw the background. + /// + /// + /// CDRF_NEWFONT + /// + /// Your application specified a new font for the item; the control will use the new font. For more information on changing + /// fonts, see Changing fonts and colors. This occurs when dwDrawStage equals CDDS_ITEMPREPAINT. + /// + /// + /// + /// CDRF_NOTIFYITEMDRAW + /// + /// The control will notify the parent of any item-related drawing operations. It will send NM_CUSTOMDRAW notification codes + /// before and after drawing items. This occurs when dwDrawStage equals CDDS_PREPAINT. + /// + /// + /// + /// CDRF_NOTIFYPOSTERASE + /// The control will notify the parent after erasing an item. This occurs when dwDrawStage equals CDDS_PREPAINT. + /// + /// + /// CDRF_NOTIFYPOSTPAINT + /// + /// The control will send an NM_CUSTOMDRAW notification code when the painting cycle for the entire control is complete. This + /// occurs when dwDrawStage equals CDDS_PREPAINT. + /// + /// + /// + /// CDRF_NOTIFYSUBITEMDRAW + /// + /// Your application will receive an NM_CUSTOMDRAW notification code with dwDrawStage set to CDDS_ITEMPREPAINT | + /// CDDS_SUBITEM before each list-view subitem is drawn. You can then specify font and color for each subitem separately or + /// return CDRF_DODEFAULT for default processing. This occurs when dwDrawStage equals CDDS_ITEMPREPAINT. + /// + /// + /// + /// CDRF_SKIPDEFAULT + /// + /// Your application drew the item manually. The control will not draw the item. This occurs when dwDrawStage equals CDDS_ITEMPREPAINT. + /// + /// + /// + /// CDRF_SKIPPOSTPAINT + /// The control will not draw the focus rectangle around an item. + /// + /// + /// + /// + /// Currently, the following controls support custom draw functionality: header, list view, rebar, toolbar, tooltip, trackbar, + /// and tree view. Custom draw is also supported for button controls if you have an application manifest to ensure that + /// Comctl32.dll version 6 is available. + /// + /// + /// If this message is handled in a dialog procedure, you must set the return value as part of the window data before returning + /// TRUE. For more information, see DialogProc. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/nm-customdraw NM_CUSTOMDRAW = NM_FIRST - 12, /// - /// Sent by a control when the mouse hovers over an item. This notification code is sent in the form of a WM_NOTIFY message. - /// - /// - /// lParam - /// A pointer to an NMHDR structure that contains additional information about this notification. - /// - /// - /// Return value - /// + /// + /// Sent by a control when the mouse hovers over an item. This notification code is sent in the form of a WM_NOTIFY message. + /// + /// + /// NM_HOVER lpnmh = (LPNMHDR) lParam; + /// + /// + /// Parameters + /// lParam + /// A pointer to an NMHDR structure that contains additional information about this notification. + /// Returns + /// /// Unless otherwise specified, return zero to allow the control to process the hover normally, or nonzero to prevent the hover /// from being processed. - /// - /// - /// - /// + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/nm-hover NM_HOVER = NM_FIRST - 13, /// - /// Sent by a rebar control when the control receives a WM_NCHITTEST message. This notification code is sent in the form of a - /// WM_NOTIFY message. - /// - /// - /// lParam - /// - /// A pointer to a NMMOUSE structure that contains information about the notification code. The pt member contains the mouse - /// coordinates of the hit test message. - /// - /// - /// - /// Return value - /// - /// Unless otherwise specified, return zero to allow the control to perform default processing of the hit test message, or return - /// one of the HT* values documented under WM_NCHITTEST to override the default hit test processing. - /// - /// - /// + /// + /// Sent by a rebar control when the control receives a WM_NCHITTEST message. This notification code is sent in the form + /// of a WM_NOTIFY message. + /// + /// + /// NM_NCHITTEST lpnmmouse = (LPNMMOUSE) lParam; + /// /// + /// Parameters + /// lParam + /// + /// A pointer to a NMMOUSE structure that contains information about the notification code. The pt member contains the + /// mouse coordinates of the hit test message. + /// + /// Returns + /// + /// Unless otherwise specified, return zero to allow the control to perform default processing of the hit test message, or return + /// one of the HT* values documented under WM_NCHITTEST to override the default hit test processing. + /// + // https://docs.microsoft.com/en-us/windows/win32/controls/nm-nchittest NM_NCHITTEST = NM_FIRST - 14, /// + /// /// Sent by a control when the control has the keyboard focus and the user presses a key. This notification code is sent in the - /// form of a WM_NOTIFY message. - /// - /// - /// lParam - /// - /// A pointer to an NMKEY structure that contains additional information about the key that caused the notification code. - /// - /// - /// - /// Return value - /// Return nonzero to prevent the control from processing the key, or zero otherwise. - /// - /// + /// form of a WM_NOTIFY message. + /// + /// + /// NM_KEYDOWN lpnmk = (LPNMKEY) lParam; + /// /// + /// Parameters + /// lParam + /// + /// A pointer to an NMKEY structure that contains additional information about the key that caused the notification code. + /// + /// Returns + /// Return nonzero to prevent the control from processing the key, or zero otherwise. + // https://docs.microsoft.com/en-us/windows/win32/controls/nm-keydown NM_KEYDOWN = NM_FIRST - 15, /// + /// /// Notifies a control's parent window that the control is releasing mouse capture. This notification code is sent in the form of - /// a WM_NOTIFY message. - /// - /// - /// lParam - /// A pointer to an NMHDR structure that contains additional information about this notification. - /// - /// + /// a WM_NOTIFY message. + /// + /// + /// NM_RELEASEDCAPTURE lpnmh = (LPNMHDR) lParam; + /// /// + /// Parameters + /// lParam + /// A pointer to an NMHDR structure that contains additional information about this notification. + /// Returns + /// Unless otherwise specified, the control ignores the return value from this notification code. + // https://docs.microsoft.com/en-us/windows/win32/controls/nm-releasedcapture NM_RELEASEDCAPTURE = NM_FIRST - 16, /// - /// Notifies a control's parent window that the control is setting the cursor in response to a WM_SETCURSOR message. This - /// notification code is sent in the form of a WM_NOTIFY message. - /// - /// - /// lParam - /// A pointer to an NMMOUSE structure that contains additional information about this notification. - /// - /// - /// Return value - /// - /// Return zero to enable the control to set the cursor or nonzero to prevent the control from setting the cursor. - /// - /// - /// + /// + /// Notifies a control's parent window that the control is setting the cursor in response to a WM_SETCURSOR message. This + /// notification code is sent in the form of a WM_NOTIFY message. + /// + /// + /// NM_SETCURSOR lpnmm = (LPNMMOUSE) lParam; + /// /// + /// Parameters + /// lParam + /// A pointer to an NMMOUSE structure that contains additional information about this notification. + /// Returns + /// Return zero to enable the control to set the cursor or nonzero to prevent the control from setting the cursor. + // https://docs.microsoft.com/en-us/windows/win32/controls/nm-setcursor NM_SETCURSOR = NM_FIRST - 17, /// + /// /// The NM_CHAR notification code is sent by a control when a character key is processed. This notification code is sent in the - /// form of a WM_NOTIFY message. - /// - /// - /// lParam - /// - /// A pointer to an NMCHAR structure that contains additional information about the character that caused the notification code. - /// - /// - /// + /// form of a WM_NOTIFY message. + /// + /// + /// NM_CHAR lpnmc = (LPNMCHAR) lParam; + /// /// + /// Parameters + /// lParam + /// + /// A pointer to an NMCHAR structure that contains additional information about the character that caused the notification code. + /// + /// Returns + /// The return value is ignored by most controls. For more information, see the documentation for the individual controls. + // https://docs.microsoft.com/en-us/windows/win32/controls/nm-char NM_CHAR = NM_FIRST - 18, /// + /// /// Notifies a control's parent window that the control has created a tooltip control. This notification code is sent in the form - /// of a WM_NOTIFY message. - /// - /// - /// lParam - /// A pointer to an NMTOOLTIPSCREATED structure that contains additional information about this notification. - /// - /// + /// of a WM_NOTIFY message. + /// + /// + /// NM_TOOLTIPSCREATED lpnmttc = (LPNMHDR) lParam; + /// /// + /// Parameters + /// lParam + /// A pointer to an NMTOOLTIPSCREATED structure that contains additional information about this notification. + /// Returns + /// Unless otherwise specified, the control ignores the return value from this notification code. + // https://docs.microsoft.com/en-us/windows/win32/controls/nm-tooltipscreated NM_TOOLTIPSCREATED = NM_FIRST - 19, /// + /// /// Notifies a control's parent window that the left mouse button has been pressed. This notification code is sent in the form of - /// a WM_NOTIFY message. - /// - /// - /// lParam - /// A pointer to an NMHDR structure that contains additional information about this notification. - /// - /// + /// a WM_NOTIFY message. + /// + /// + /// NM_LDOWN lpnmhdr = (LPNMHDR) lParam; + /// /// + /// Parameters + /// lParam + /// A pointer to an NMHDR structure that contains additional information about this notification. + /// Returns + /// The return value is ignored by the control. + // https://docs.microsoft.com/en-us/windows/win32/controls/nm-ldown NM_LDOWN = NM_FIRST - 20, /// This notification code is not supported. NM_RDOWN = NM_FIRST - 21, /// - /// Notifies a control's parent window that the theme has changed. This notification code is sent in the form of a WM_NOTIFY message. - /// - /// - /// lParam - /// A pointer to an NMHDR structure that contains additional information about this notification. - /// - /// + /// + /// Notifies a control's parent window that the theme has changed. This notification code is sent in the form of a + /// WM_NOTIFY message. + /// + /// + /// NM_THEMECHANGED lpnmhdr = (LPNMHDR) lParam; + /// /// + /// Parameters + /// lParam + /// A pointer to an NMHDR structure that contains additional information about this notification. + /// Returns + /// The return value is ignored by the control. + // https://docs.microsoft.com/en-us/windows/win32/controls/nm-themechanged NM_THEMECHANGED = NM_FIRST - 22, /// - /// Sent by a list-view control when the control has changed a font. This notification code is sent in the form of a WM_NOTIFY message. - /// - /// - /// lParam - /// A pointer to an NMHDR structure that contains additional information about this notification. - /// - /// + /// + /// Sent by a list-view control when the control has changed a font. This notification code is sent in the form of a + /// WM_NOTIFY message. + /// + /// + /// NM_FONTCHANGED lpnmh = (LPNMHDR) lParam; + /// /// + /// Parameters + /// lParam + /// A pointer to an NMHDR structure that contains additional information about this notification. + /// Returns + /// The return value is ignored by the control. + // https://docs.microsoft.com/en-us/windows/win32/controls/nm-fontchanged NM_FONTCHANGED = NM_FIRST - 23, /// - /// Notifies a control's parent window about custom text operations. This notification code is sent in the form of a WM_NOTIFY message. - /// - /// - /// lParam - /// A pointer to an NMCUSTOMTEXT structure that contains additional information about this notification. - /// - /// + /// + /// Notifies a control's parent window about custom text operations. This notification code is sent in the form of a + /// WM_NOTIFY message. + /// + /// + /// NM_CUSTOMTEXT lpnmct = (NMCUSTOMTEXT) lParam; + /// /// + /// Parameters + /// lParam + /// A pointer to an NMCUSTOMTEXT structure that contains additional information about this notification. + /// Returns + /// The return value is ignored by the control. + // https://docs.microsoft.com/en-us/windows/win32/controls/nm-customtext NM_CUSTOMTEXT = NM_FIRST - 24, /// + /// /// Sent by a tree-view control to its parent window that the state image is changing. This notification code is sent in the form - /// of a WM_NOTIFY message. - /// - /// - /// lParam - /// A pointer to an NMTVSTATEIMAGECHANGING structure that contains additional information about this notification. - /// - /// + /// of a WM_NOTIFY message. + /// + /// + /// NM_TVSTATEIMAGECHANGING lpnmtsic = (LPNMTVSTATEIMAGECHANGING) lParam; + /// /// + /// Parameters + /// lParam + /// A pointer to an NMTVSTATEIMAGECHANGING structure that contains additional information about this notification. + /// Returns + /// The return value is ignored by the control. + // https://docs.microsoft.com/en-us/windows/win32/controls/nm-tvstateimagechanging NM_TVSTATEIMAGECHANGING = NM_FIRST - 24, } diff --git a/PInvoke/User32/User32_NMHDR.cs b/PInvoke/User32/User32_NMHDR.cs index 9ffaa5f0..30e22ad7 100644 --- a/PInvoke/User32/User32_NMHDR.cs +++ b/PInvoke/User32/User32_NMHDR.cs @@ -1,5 +1,6 @@ using System; using System.Runtime.InteropServices; +using Vanara.Extensions; namespace Vanara.PInvoke { @@ -20,6 +21,22 @@ namespace Vanara.PInvoke /// Reference), or it can be a control-specific notification code. /// public int code; + + /// Creates a structure from an LPARAM value. + /// The LPARAM value. + /// A structure. + public static NMHDR FromLParam(IntPtr lParam) => (NMHDR)Marshal.PtrToStructure(lParam, typeof(NMHDR)); + +#if ALLOWSPAN + /// Creates a reference to an structure from an LPARAM value. + /// The LPARAM value. + /// A structure reference. + public static ref NMHDR LParamAsRef(IntPtr lParam) => ref lParam.AsRef() +#endif + + /// Updates the value pointed to by an LPARAM value from this instance. + /// The LPARAM value to update. + public void UpdateLParam(IntPtr lParam) => Marshal.StructureToPtr(this, lParam, false); } } } \ No newline at end of file