Updated docs for all window messsages and notifications

pull/285/head
dahall 2022-03-07 06:16:36 -07:00
parent 57b6ed1f41
commit 1a4c56c12c
14 changed files with 9995 additions and 1480 deletions

File diff suppressed because it is too large Load Diff

View File

@ -20,61 +20,93 @@ namespace Vanara.PInvoke
public enum IPAddressMessage
{
/// <summary>Clears the contents of the IP address control.</summary>
/// <param name="wParam">Must be zero.</param>
/// <param name="lParam">Must be zero.</param>
/// <returns>The return value is not used.</returns>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>The return value is not used.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/ipm-clearaddress
IPM_CLEARADDRESS = WindowMessage.WM_USER + 100,
/// <summary>Sets the address values for all four fields in the IP address control.</summary>
/// <param name="wParam">Must be zero.</param>
/// <param name="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
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>
/// A <c>DWORD</c> 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.
/// </param>
/// <returns>The return value is not used.</returns>
/// 24 through 31. The <c>MAKEIPADDRESS</c> macro can also be used to create the address information.
/// </para>
/// <para><strong>Returns</strong></para>
/// <para>The return value is not used.</para>
/// <remarks>This message does not generate an <c>IPN_FIELDCHANGED</c> notification.</remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/ipm-setaddress
IPM_SETADDRESS = WindowMessage.WM_USER + 101,
/// <summary>Gets the address values for all four fields in the IP address control.</summary>
/// <param name="wParam">Must be zero.</param>
/// <param name="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.
/// </param>
/// <returns>Returns the number of nonblank fields.</returns>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>
/// A pointer to a <c>DWORD</c> 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 <c>FIRST_IPADDRESS</c>, <c>SECOND_IPADDRESS</c>, <c>THIRD_IPADDRESS</c>,
/// and <c>FOURTH_IPADDRESS</c> macros can also be used to extract the address information. Zero will be returned as the address
/// for any blank fields.
/// </para>
/// <para><strong>Returns</strong></para>
/// <para>Returns the number of nonblank fields.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/ipm-getaddress
IPM_GETADDRESS = WindowMessage.WM_USER + 102,
/// <summary>ets the valid range for the specified field in the IP address control.</summary>
/// <summary>Sets the valid range for the specified field in the IP address control.</summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>A zero-based field index to which the range will be applied.</para>
/// <para><em>lParam</em></para>
/// <para>
/// A <c>WORD</c> 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 <c>MAKEIPRANGE</c> macro can also be used to create the range.
/// </para>
/// <para><strong>Returns</strong></para>
/// <para>Returns nonzero if successful, or zero otherwise.</para>
/// <remarks>
/// 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.
/// </remarks>
/// <param name="wParam">A zero-based field index to which the range will be applied.</param>
/// <param name="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.
/// </param>
/// <returns>Returns nonzero if successful, or zero otherwise.</returns>
// https://docs.microsoft.com/en-us/windows/win32/controls/ipm-setrange
IPM_SETRANGE = WindowMessage.WM_USER + 103,
/// <summary>
/// Sets the keyboard focus to the specified field in the IP address control. All of the text in that field will be selected.
/// </summary>
/// <param name="wParam">
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>
/// 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.
/// </param>
/// <param name="lParam">Must be zero.</param>
/// <returns>The return value is not used.</returns>
/// </para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>The return value is not used.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/ipm-setfocus
IPM_SETFOCUS = WindowMessage.WM_USER + 104,
/// <summary>Determines if all fields in the IP address control are blank.</summary>
/// <param name="wParam">Must be zero.</param>
/// <param name="lParam">Must be zero.</param>
/// <returns>Returns nonzero if all fields are blank, or zero otherwise.</returns>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>Returns nonzero if all fields are blank, or zero otherwise.</para>
// 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
{
/// <summary>An NMHDR structure that contains additional information about the notification.</summary>
/// <summary>An <see cref="NMHDR"/> structure that contains additional information about the notification.</summary>
public NMHDR hdr;
/// <summary>The zero-based number of the field that was changed.</summary>

File diff suppressed because it is too large Load Diff

View File

@ -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
/// <summary/>
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.
/// </summary>
/// <param name="wParam">
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>
/// A value that determines the character set that is used by the control. If this value is <c>TRUE</c>, the control will use
/// Unicode characters. If this value is <c>FALSE</c>, the control will use ANSI characters.
/// </param>
/// <param name="lParam">Must be zero.</param>
/// <returns>Returns the previous Unicode format flag for the control.</returns>
/// </para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>Returns the previous Unicode format flag for the control.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/ccm-setunicodeformat
CCM_SETUNICODEFORMAT = CCM_FIRST + 5,
/// <summary>Gets the Unicode character format flag for the control.</summary>
/// <param name="wParam">Must be zero.</param>
/// <param name="lParam">Must be zero.</param>
/// <returns>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>
/// 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.
/// </returns>
/// </para>
// https://docs.microsoft.com/en-us/windows/win32/controls/ccm-getunicodeformat
CCM_GETUNICODEFORMAT = CCM_FIRST + 6,
/// <summary>This message is used to inform the control that you are expecting a behavior associated with a particular version.</summary>
/// <param name="wParam">The version number.</param>
/// <param name="lParam">Must be zero.</param>
/// <returns>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>The version number.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>
/// Returns the version specified in the previous <c>CCM_SETVERSION</c> message. If wParam is set to a value greater than the
/// current DLL version, it returns -1.
/// </returns>
/// </para>
/// <remarks>
/// <para>
/// 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 <c>CCM_SETVERSION</c> 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 <c>CCM_SETVERSION</c> message enables you to inform the control which behavior is expected. You can
/// determine which version you have specified by sending a <c>CCM_GETVERSION</c> message. For an example of how to use this
/// message, see Custom Draw With List-View and Tree-View Controls.
/// </para>
@ -61,44 +74,82 @@
/// If you have ComCtl32.dll version 6 installed, regardless of what value you set in wParam, the <c>CCM_SETVERSION</c> message
/// returns version 6.
/// </para>
/// <para>
/// <para>Note</para>
/// <para>This message only sets the version number for the control to which it is sent.</para>
/// </para>
/// </remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/ccm-setversion
CCM_SETVERSION = CCM_FIRST + 0x7,
/// <summary>Gets the version number for a control set by the most recent <c>CCM_SETVERSION</c> message.</summary>
/// <param name="wParam">Must be zero.</param>
/// <param name="lParam">Must be zero.</param>
/// <returns>
/// Returns the version number set by the most recent <c>CCM_SETVERSION</c> message. If no such message has been sent, it
/// returns zero.
/// </returns>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>
/// Returns the version number set by the most recent <c>CCM_SETVERSION</c> message. If no such message has been sent, it returns zero.
/// </para>
/// <remarks>
/// <para>
/// This message does not return the DLL version. See Shell Versions for a discussion of how to use <c>DllGetVersion</c> to
/// retrieve the current DLL version.
/// </para>
/// <para>
/// <para>Note</para>
/// <para>The version number is set on a control by control basis, and may not be the same for all controls.</para>
/// </para>
/// </remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/ccm-getversion
CCM_GETVERSION = CCM_FIRST + 0x8,
/// <summary/>
CCM_SETNOTIFYWINDOW = CCM_FIRST + 0x9, // wParam == hwndParent.
/// <summary>Sets the visual style of a control.</summary>
/// <param name="wParam">Must be zero.</param>
/// <param name="lParam">A pointer to a Unicode string that contains the control visual style to set.</param>
/// <returns>The return value is not used.</returns>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>A pointer to a Unicode string that contains the control visual style to set.</para>
/// <para><strong>Returns</strong></para>
/// <para>The return value is not used.</para>
/// <remarks>
/// <para>Note</para>
/// <para>
/// To use this message, you must provide a manifest specifying Comclt32.dll version 6.0. For more information on manifests, see
/// Enabling Visual Styles.
/// </para>
/// </remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/ccm-setwindowtheme
CCM_SETWINDOWTHEME = CCM_FIRST + 0xb,
/// <summary>
/// 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.
/// </summary>
/// <param name="wParam">Set to <c>TRUE</c>.</param>
/// <param name="lParam">Must be zero.</param>
/// <returns>The return value is not used.</returns>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Set to <c>TRUE</c>.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>The return value is not used.</para>
/// <remarks>
/// <para>Quick Launch and Taskbar should not specify a dpi scaling, because the images are already scaled.</para>
/// <para>Any control that uses an image list created with the SmallIcon metric should not scale its icons.</para>
/// <para>
/// <para>Note</para>
/// <para>
/// 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.
/// </para>
/// </para>
/// </remarks>
// 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
}
}
}

View File

@ -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
/// <summary>Progress Bar Messages</summary>
// https://docs.microsoft.com/en-us/windows/win32/controls/bumper-progress-bar-control-reference-messages
[PInvokeData("Commctrl.h")]
public enum ProgressMessage
{
/// <summary>Sets the minimum and maximum values for a progress bar and redraws the bar to reflect the new range.</summary>
/// <param name="wParam">Must be zero.</param>
/// <param name="lParam">
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>
/// The <c>LOWORD</c> specifies the minimum range value, and the <c>HIWORD</c> 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.
/// </param>
/// <returns>
/// </para>
/// <para><strong>Returns</strong></para>
/// <para>
/// Returns the previous range values if successful, or zero otherwise. The <c>LOWORD</c> specifies the previous minimum value,
/// and the <c>HIWORD</c> specifies the previous maximum value.
/// </returns>
/// </para>
/// <remarks>
/// <para>
/// 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.
/// </para>
/// <para>To set a larger range, call <c>PBM_SETRANGE32</c>.</para>
/// </remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/pbm-setrange
PBM_SETRANGE = WindowMessage.WM_USER + 1,
/// <summary>Sets the current position for a progress bar and redraws the bar to reflect the new position.</summary>
/// <param name="wParam">Signed integer that becomes the new position.</param>
/// <param name="lParam">Must be zero.</param>
/// <returns>Returns the previous position.</returns>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Signed integer that becomes the new position.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>Returns the previous position.</para>
/// <remarks>
/// <para>If wParam is outside the range of the control, the position is set to the closest boundary.</para>
/// <para>Do not send this message to a control that has the <c>PBS_MARQUEE</c> style.</para>
/// </remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/pbm-setpos
PBM_SETPOS = WindowMessage.WM_USER + 2,
/// <summary>
/// Advances the current position of a progress bar by a specified increment and redraws the bar to reflect the new position.
/// </summary>
/// <param name="wParam">Amount to advance the position.</param>
/// <param name="lParam">Must be zero.</param>
/// <returns>Returns the previous position.</returns>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Amount to advance the position.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>Returns the previous position.</para>
/// <remarks>
/// <para>If the increment results in a value outside the range of the control, the position is set to the nearest boundary.</para>
/// <para>The behavior of this message is undefined if it is sent to a control that has the <c>PBS_MARQUEE</c> style.</para>
/// </remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/pbm-deltapos
PBM_DELTAPOS = WindowMessage.WM_USER + 3,
/// <summary>
/// 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 <c>PBM_STEPIT</c> message. By default, the step increment is set to 10.
/// </summary>
/// <param name="wParam">New step increment.</param>
/// <param name="lParam">Must be zero.</param>
/// <returns>Returns the previous step increment.</returns>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>New step increment.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>Returns the previous step increment.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/pbm-setstep
PBM_SETSTEP = WindowMessage.WM_USER + 4,
/// <summary>
/// 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 <c>PBM_SETSTEP</c> message.
/// </summary>
/// <param name="wParam">Must be zero.</param>
/// <param name="lParam">Must be zero.</param>
/// <returns>Returns the previous position.</returns>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>Returns the previous position.</para>
/// <remarks>
/// 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.
/// </remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/pbm-stepit
PBM_STEPIT = WindowMessage.WM_USER + 5,
/// <summary>
/// Sets the minimum and maximum values for a progress bar to 32-bit values, and redraws the bar to reflect the new range.
/// </summary>
/// <param name="wParam">Minimum range value. By default, the minimum value is zero.</param>
/// <param name="lParam">Maximum range value. This value must be greater than wParam. By default, the maximum value is 100.</param>
/// <returns>
/// Returns a <c>DWORD</c> value that holds the previous 16-bit low limit in its <c>LOWORD</c> and the previous 16-bit high
/// limit in its <c>HIWORD</c>. If the previous ranges were 32-bit values, the return value consists of the <c>LOWORD</c> s of
/// both 32-bit limits.
/// </returns>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Minimum range value. By default, the minimum value is zero.</para>
/// <para><em>lParam</em></para>
/// <para>Maximum range value. This value must be greater than wParam. By default, the maximum value is 100.</para>
/// <para><strong>Returns</strong></para>
/// <para>
/// Returns a <c>DWORD</c> value that holds the previous 16-bit low limit in its <c>LOWORD</c> and the previous 16-bit high limit
/// in its <c>HIWORD</c>. If the previous ranges were 32-bit values, the return value consists of the <c>LOWORD</c> s of both
/// 32-bit limits.
/// </para>
/// <remarks>To retrieve the entire high and low 32-bit values, use the <c>PBM_GETRANGE</c> message.</remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/pbm-setrange32
PBM_SETRANGE32 = WindowMessage.WM_USER + 6, // lParam = high, wParam = low
/// <summary>Retrieves information about the current high and low limits of a given progress bar control.</summary>
/// <param name="wParam">
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>
/// 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
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>TRUE</term>
/// <term><c><c>TRUE</c></c></term>
/// <term>Return the low limit.</term>
/// </item>
/// <item>
/// <term>FALSE</term>
/// <term><c><c>FALSE</c></c></term>
/// <term>Return the high limit.</term>
/// </item>
/// </list>
/// </param>
/// <param name="lParam">
/// <para><em>lParam</em></para>
/// <para>
/// Pointer to a <c>PBRANGE</c> structure that is to be filled with the high and low limits of the progress bar control. If this
/// parameter is set to <c>NULL</c>, the control will return only the limit specified by wParam.
/// </param>
/// <returns>
/// </para>
/// <para><strong>Returns</strong></para>
/// <para>
/// Returns an INT that represents the limit value specified by wParam. If lParam is not <c>NULL</c>, lParam must point to a
/// <c>PBRANGE</c> structure that is to be filled with both limit values.
/// </returns>
/// </para>
// 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
/// <summary>Retrieves the current position of the progress bar.</summary>
/// <param name="wParam">Must be zero.</param>
/// <param name="lParam">Must be zero.</param>
/// <returns>Returns a <c>UINT</c> value that represents the current position of the progress bar.</returns>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>Returns a <c>UINT</c> value that represents the current position of the progress bar.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/pbm-getpos
PBM_GETPOS = WindowMessage.WM_USER + 8,
/// <summary>Sets the color of the progress indicator bar in the progress bar control.</summary>
/// <param name="wParam">Must be zero.</param>
/// <param name="lParam">
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>
/// The <c>COLORREF</c> 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.
/// </param>
/// <returns>
/// </para>
/// <para><strong>Returns</strong></para>
/// <para>
/// Returns the previous progress indicator bar color, or CLR_DEFAULT if the progress indicator bar color is the default color.
/// </returns>
/// </para>
/// <remarks>When visual styles are enabled, this message has no effect.</remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/pbm-setbarcolor
PBM_SETBARCOLOR = WindowMessage.WM_USER + 9, // lParam = bar color
/// <summary>Sets the background color in the progress bar.</summary>
/// <param name="wParam">Must be zero.</param>
/// <param name="lParam">
/// <c>COLORREF</c> value that specifies the new background color. Specify the CLR_DEFAULT value to cause the progress bar to
/// use its default background color.
/// </param>
/// <returns>Returns the previous background color, or CLR_DEFAULT if the background color is the default color.</returns>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>
/// <c>COLORREF</c> value that specifies the new background color. Specify the CLR_DEFAULT value to cause the progress bar to use
/// its default background color.
/// </para>
/// <para><strong>Returns</strong></para>
/// <para>Returns the previous background color, or CLR_DEFAULT if the background color is the default color.</para>
/// <remarks>When visual styles are enabled, this message has no effect.</remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/pbm-setbkcolor
PBM_SETBKCOLOR = CommonControlMessage.CCM_SETBKCOLOR, // lParam = bkColor
/// <summary>Sets the progress bar to marquee mode. This causes the progress bar to move like a marquee.</summary>
/// <param name="wParam">Indicates whether to turn the marquee mode on or off.</param>
/// <param name="lParam">
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Indicates whether to turn the marquee mode on or off.</para>
/// <para><em>lParam</em></para>
/// <para>
/// Time, in milliseconds, between marquee animation updates. If this parameter is zero, the marquee animation is updated every
/// 30 milliseconds.
/// </param>
/// <returns>Always returns <c>TRUE</c>.</returns>
/// </para>
/// <para><strong>Returns</strong></para>
/// <para>Always returns <c>TRUE</c>.</para>
/// <remarks>
/// <para>
/// Use this message when you do not know the amount of progress toward completion but wish to indicate that progress is being made.
/// </para>
/// <para>Send the <c>PBM_SETMARQUEE</c> message to start or stop the animation.</para>
/// <para>
/// <para>Note</para>
/// <para>You must set the control style to <c>PBS_MARQUEE</c> before attempting to start the animation.</para>
/// </para>
/// <para>
/// <para>Note</para>
/// <para>This message requires ComCtl32.dll version 6.00 or later.</para>
/// </para>
/// </remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/pbm-setmarquee
PBM_SETMARQUEE = WindowMessage.WM_USER + 10,
/// <summary>
/// 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 <c>PBM_STEPIT</c> message. By default, the step increment is set to 10.
/// </summary>
/// <param name="wParam">Must be zero.</param>
/// <param name="lParam">Must be zero.</param>
/// <returns>Returns the current step increment.</returns>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>Returns the current step increment.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/pbm-getstep
PBM_GETSTEP = WindowMessage.WM_USER + 13,
/// <summary>Gets the background color of the progress bar.</summary>
/// <param name="wParam">Must be zero.</param>
/// <param name="lParam">Must be zero.</param>
/// <returns>Returns the background color of the progress bar.</returns>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>Returns the background color of the progress bar.</para>
/// <remarks>
/// <para>
/// This is the color set by the <c>PBM_SETBKCOLOR</c> message. The default value is CLR_DEFAULT, which is defined in commctrl.h.
/// </para>
/// <para>This is the color set by the <c>PBM_SETBKCOLOR</c> message. The default value is CLR_DEFAULT, which is defined in commctrl.h.</para>
/// <para>This function only affects the classic mode, not any visual style.</para>
/// </remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/pbm-getbkcolor
PBM_GETBKCOLOR = WindowMessage.WM_USER + 14,
/// <summary>Gets the color of the progress bar.</summary>
/// <param name="wParam">Must be zero.</param>
/// <param name="lParam">Must be zero.</param>
/// <returns>Returns the color of the progress bar.</returns>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>Returns the color of the progress bar.</para>
/// <remarks>
/// <para>
/// This is the color set by the <c>PBM_SETBARCOLOR</c> message. The default value is CLR_DEFAULT, which is defined in commctrl.h.
/// </para>
/// <para>This function only affects the classic mode, not any visual style.</para>
/// </remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/pbm-getbarcolor
PBM_GETBARCOLOR = WindowMessage.WM_USER + 15,
/// <summary>Sets the state of the progress bar.</summary>
/// <param name="wParam">
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>State of the progress bar that is being set. One of the following values.</para>
/// <list type="table">
/// <listheader>
@ -207,27 +280,32 @@ namespace Vanara.PInvoke
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>PBST_NORMAL</term>
/// <term><c>PBST_NORMAL</c></term>
/// <term>In progress.</term>
/// </item>
/// <item>
/// <term>PBST_ERROR</term>
/// <term><c>PBST_ERROR</c></term>
/// <term>Error.</term>
/// </item>
/// <item>
/// <term>PBST_PAUSED</term>
/// <term><c>PBST_PAUSED</c></term>
/// <term>Paused.</term>
/// </item>
/// </list>
/// </param>
/// <param name="lParam">Must be zero.</param>
/// <returns>Returns the previous state.</returns>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>Returns the previous state.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/pbm-setstate
PBM_SETSTATE = WindowMessage.WM_USER + 16, // wParam = PBST_[State] (NORMAL, ERROR, PAUSED)
/// <summary>Gets the state of the progress bar.</summary>
/// <param name="wParam">Must be zero.</param>
/// <param name="lParam">Must be zero.</param>
/// <returns>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>Returns the current state of the progress bar. One of the following values.</para>
/// <list type="table">
/// <listheader>
@ -235,24 +313,22 @@ namespace Vanara.PInvoke
/// <term>Description</term>
/// </listheader>
/// <item>
/// <term>PBST_NORMAL</term>
/// <term><c>PBST_NORMAL</c></term>
/// <term>In progress.</term>
/// </item>
/// <item>
/// <term>PBST_ERROR</term>
/// <term><c>PBST_ERROR</c></term>
/// <term>Error.</term>
/// </item>
/// <item>
/// <term>PBST_PAUSED</term>
/// <term><c>PBST_PAUSED</c></term>
/// <term>Paused.</term>
/// </item>
/// </list>
/// </returns>
// 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
/// <summary>State of the progress bar used in PBM_SETSTATE and PBM_GETSTATE messages.</summary>
[PInvokeData("Commctrl.h", MSDNShortId = "bb760850")]
public enum ProgressState

View File

@ -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
/// <summary>Tab Control Messages</summary>
// 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
/// <c>TabCtrl_GetImageList</c> macro.
/// </summary>
/// <param name="wParam">Must be zero.</param>
/// <param name="lParam">Must be zero.</param>
/// <returns>Returns the handle to the image list if successful, or <c>NULL</c> otherwise.</returns>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>Returns the handle to the image list if successful, or <c>NULL</c> otherwise.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/tcm-getimagelist
TCM_GETIMAGELIST = TCM_FIRST + 2,
/// <summary>
/// Assigns an image list to a tab control. You can send this message explicitly or by using the <c>TabCtrl_SetImageList</c> macro.
/// </summary>
/// <param name="wParam">Must be zero.</param>
/// <param name="lParam">Handle to the image list to assign to the tab control.</param>
/// <returns>Returns the handle to the previous image list, or <c>NULL</c> if there is no previous image list.</returns>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>Handle to the image list to assign to the tab control.</para>
/// <para><strong>Returns</strong></para>
/// <para>Returns the handle to the previous image list, or <c>NULL</c> if there is no previous image list.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/tcm-setimagelist
TCM_SETIMAGELIST = TCM_FIRST + 3,
/// <summary>
/// Retrieves the number of tabs in the tab control. You can send this message explicitly or by using the
/// <c>TabCtrl_GetItemCount</c> macro.
/// </summary>
/// <param name="wParam">Must be zero.</param>
/// <param name="lParam">Must be zero.</param>
/// <returns>Returns the number of items if successful, or zero otherwise.</returns>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>Returns the number of items if successful, or zero otherwise.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/tcm-getitemcount
TCM_GETITEMCOUNT = TCM_FIRST + 4,
/// <summary>
/// Retrieves information about a tab in a tab control. You can send this message explicitly or by using the
/// <c>TabCtrl_GetItem</c> macro.
/// </summary>
/// <param name="wParam">Index of the tab.</param>
/// <param name="lParam">
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Index of the tab.</para>
/// <para><em>lParam</em></para>
/// <para>
/// Pointer to a <c>TCITEM</c> structure that specifies the information to retrieve and receives information about the tab. When
/// the message is sent, the <c>mask</c> member specifies which attributes to return. If the <c>mask</c> member specifies the
/// TCIF_TEXT value, the <c>pszText</c> member must contain the address of the buffer that receives the item text, and the
/// <c>cchTextMax</c> member must specify the size of the buffer.
/// </param>
/// <returns>Returns <c>TRUE</c> if successful, or <c>FALSE</c> otherwise.</returns>
/// </para>
/// <para><strong>Returns</strong></para>
/// <para>Returns <c>TRUE</c> if successful, or <c>FALSE</c> otherwise.</para>
/// <remarks>
/// If the TCIF_TEXT flag is set in the <c>mask</c> member of the <c>TCITEM</c> structure, the control may change the
/// <c>pszText</c> member of the structure to point to the new text instead of filling the buffer with the requested text. The
/// control may set the <c>pszText</c> member to <c>NULL</c> to indicate that no text is associated with the item.
/// </remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/tcm-getitem
TCM_GETITEM = TCM_FIRST + 60,
/// <summary>
/// Sets some or all of a tab's attributes. You can send this message explicitly or by using the <c>TabCtrl_SetItem</c> macro.
/// </summary>
/// <param name="wParam">Index of the item.</param>
/// <param name="lParam">
/// Pointer to a <c>TCITEM</c> structure that contains the new item attributes. The <c>mask</c> member specifies which
/// attributes to set. If the <c>mask</c> member specifies the TCIF_TEXT value, the <c>pszText</c> member is the address of a
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Index of the item.</para>
/// <para><em>lParam</em></para>
/// <para>
/// Pointer to a <c>TCITEM</c> structure that contains the new item attributes. The <c>mask</c> member specifies which attributes
/// to set. If the <c>mask</c> member specifies the TCIF_TEXT value, the <c>pszText</c> member is the address of a
/// null-terminated string and the <c>cchTextMax</c> member is ignored.
/// </param>
/// <returns>Returns <c>TRUE</c> if successful, or <c>FALSE</c> otherwise.</returns>
/// </para>
/// <para><strong>Returns</strong></para>
/// <para>Returns <c>TRUE</c> if successful, or <c>FALSE</c> otherwise.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/tcm-setitem
TCM_SETITEM = TCM_FIRST + 61,
/// <summary>
/// Inserts a new tab in a tab control. You can send this message explicitly or by using the <c>TabCtrl_InsertItem</c> macro.
/// </summary>
/// <param name="wParam">Index of the new tab.</param>
/// <param name="lParam">
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Index of the new tab.</para>
/// <para><em>lParam</em></para>
/// <para>
/// Pointer to a <c>TCITEM</c> structure that specifies the attributes of the tab. The <c>dwState</c> and <c>dwStateMask</c>
/// members of this structure are ignored by this message.
/// </param>
/// <returns>Returns the index of the new tab if successful, or -1 otherwise.</returns>
/// </para>
/// <para><strong>Returns</strong></para>
/// <para>Returns the index of the new tab if successful, or -1 otherwise.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/tcm-insertitem
TCM_INSERTITEM = TCM_FIRST + 62,
/// <summary>
/// Removes an item from a tab control. You can send this message explicitly or by using the <c>TabCtrl_DeleteItem</c> macro.
/// </summary>
/// <param name="wParam">Index of the item to delete.</param>
/// <param name="lParam">Must be zero.</param>
/// <returns>Returns <c>TRUE</c> if successful, or <c>FALSE</c> otherwise.</returns>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Index of the item to delete.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>Returns <c>TRUE</c> if successful, or <c>FALSE</c> otherwise.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/tcm-deleteitem
TCM_DELETEITEM = TCM_FIRST + 8,
/// <summary>
/// Removes all items from a tab control. You can send this message explicitly or by using the <c>TabCtrl_DeleteAllItems</c> macro.
/// </summary>
/// <param name="wParam">Must be zero.</param>
/// <param name="lParam">Must be zero.</param>
/// <returns>Returns <c>TRUE</c> if successful, or <c>FALSE</c> otherwise.</returns>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>Returns <c>TRUE</c> if successful, or <c>FALSE</c> otherwise.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/tcm-deleteallitems
TCM_DELETEALLITEMS = TCM_FIRST + 9,
/// <summary>
/// Retrieves the bounding rectangle for a tab in a tab control. You can send this message explicitly or by using the
/// <c>TabCtrl_GetItemRect</c> macro.
/// </summary>
/// <param name="wParam">Index of the tab.</param>
/// <param name="lParam">Pointer to a <c>RECT</c> structure that receives the bounding rectangle of the tab, in viewport coordinates.</param>
/// <returns>Returns <c>TRUE</c> if successful, or <c>FALSE</c> otherwise.</returns>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Index of the tab.</para>
/// <para><em>lParam</em></para>
/// <para>Pointer to a <c>RECT</c> structure that receives the bounding rectangle of the tab, in viewport coordinates.</para>
/// <para><strong>Returns</strong></para>
/// <para>Returns <c>TRUE</c> if successful, or <c>FALSE</c> otherwise.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/tcm-getitemrect
TCM_GETITEMRECT = TCM_FIRST + 10,
/// <summary>
/// Determines the currently selected tab in a tab control. You can send this message explicitly or by using the
/// <c>TabCtrl_GetCurSel</c> macro.
/// </summary>
/// <param name="wParam">Must be zero.</param>
/// <param name="lParam">Must be zero.</param>
/// <returns>Returns the index of the selected tab if successful, or -1 if no tab is selected.</returns>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>Returns the index of the selected tab if successful, or -1 if no tab is selected.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/tcm-getcursel
TCM_GETCURSEL = TCM_FIRST + 11,
/// <summary>
/// Selects a tab in a tab control. You can send this message explicitly or by using the <c>TabCtrl_SetCurSel</c> macro.
/// </summary>
/// <param name="wParam">Index of the tab to select.</param>
/// <param name="lParam">Must be zero.</param>
/// <returns>Returns the index of the previously selected tab if successful, or -1 otherwise.</returns>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Index of the tab to select.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>Returns the index of the previously selected tab if successful, or -1 otherwise.</para>
/// <remarks>
/// A tab control does not send a TCN_SELCHANGING or TCN_SELCHANGE notification code when a tab is selected using this message.
/// </remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/tcm-setcursel
TCM_SETCURSEL = TCM_FIRST + 12,
/// <summary>
/// Determines which tab, if any, is at a specified screen position. You can send this message explicitly or by using the
/// <c>TabCtrl_HitTest</c> macro.
/// </summary>
/// <param name="wParam">Must be zero.</param>
/// <param name="lParam">Pointer to a <c>TCHITTESTINFO</c> structure that specifies the screen position to test.</param>
/// <returns>Returns the index of the tab, or -1 if no tab is at the specified position.</returns>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>Pointer to a <c>TCHITTESTINFO</c> structure that specifies the screen position to test.</para>
/// <para><strong>Returns</strong></para>
/// <para>Returns the index of the tab, or -1 if no tab is at the specified position.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/tcm-hittest
TCM_HITTEST = TCM_FIRST + 13,
/// <summary>
/// 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 <c>TabCtrl_SetItemExtra</c> 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 <c>TabCtrl_SetItemExtra</c> macro.
/// </summary>
/// <param name="wParam">Number of extra bytes.</param>
/// <param name="lParam">Must be zero.</param>
/// <returns>Returns <c>TRUE</c> if successful, or <c>FALSE</c> otherwise.</returns>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Number of extra bytes.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>Returns <c>TRUE</c> if successful, or <c>FALSE</c> otherwise.</para>
/// <remarks>
/// <para>
/// 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
/// </para>
/// <para>An application should only change the number of extra bytes when a tab control does not contain any tabs.</para>
/// </remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/tcm-setitemextra
TCM_SETITEMEXTRA = TCM_FIRST + 14,
/// <summary>
/// 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 <c>TabCtrl_AdjustRect</c> 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 <c>TabCtrl_AdjustRect</c> macro.
/// </summary>
/// <param name="wParam">
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>
/// Operation to perform. If this parameter is <c>TRUE</c>, lParam specifies a display rectangle and receives the corresponding
/// window rectangle. If this parameter is <c>FALSE</c>, lParam specifies a window rectangle and receives the corresponding
/// display area.
/// </param>
/// <param name="lParam">
/// Pointer to a <c>RECT</c> structure that specifies the given rectangle and receives the calculated rectangle.
/// </param>
/// <returns>No return value.</returns>
/// </para>
/// <para><em>lParam</em></para>
/// <para>Pointer to a <c>RECT</c> structure that specifies the given rectangle and receives the calculated rectangle.</para>
/// <para><strong>Returns</strong></para>
/// <para>No return value.</para>
/// <remarks>
/// 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.
/// </remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/tcm-adjustrect
TCM_ADJUSTRECT = TCM_FIRST + 40,
/// <summary>
/// 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 <c>TabCtrl_SetItemSize</c> macro.
/// </summary>
/// <param name="wParam">Must be zero.</param>
/// <param name="lParam">
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>
/// The <c>LOWORD</c> is an <c>INT</c> value that specifies the new width, in pixels. The <c>HIWORD</c> is an <c>INT</c> value
/// that specifies the new height, in pixels.
/// </param>
/// <returns>
/// Returns the old width and height. The width is in the <c>LOWORD</c> of the return value, and the height is in the <c>HIWORD</c>.
/// </returns>
/// </para>
/// <para><strong>Returns</strong></para>
/// <para>Returns the old width and height. The width is in the <c>LOWORD</c> of the return value, and the height is in the <c>HIWORD</c>.</para>
/// <remarks>
/// If the width is set to a value less than the image width set by <c>ImageList_Create</c>, the width of the tab is set to the
/// lowest value that is greater than the image width.
/// </remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/tcm-setitemsize
TCM_SETITEMSIZE = TCM_FIRST + 41,
/// <summary>
/// Removes an image from a tab control's image list. You can send this message explicitly or by using the
/// <c>TabCtrl_RemoveImage</c> macro.
/// </summary>
/// <param name="wParam">Index of the image to remove.</param>
/// <param name="lParam">Must be zero.</param>
/// <returns>No return value.</returns>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Index of the image to remove.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>No return value.</para>
/// <remarks>
/// 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.
/// </remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/tcm-removeimage
TCM_REMOVEIMAGE = TCM_FIRST + 42,
/// <summary>
/// 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 <c>TabCtrl_SetPadding</c> 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 <c>TabCtrl_SetPadding</c> macro.
/// </summary>
/// <param name="lParam">
/// <para><strong>Parameters</strong></para>
/// <para><em>lParam</em></para>
/// <para>
/// The <c>LOWORD</c> is an <c>INT</c> value that specifies the amount of horizontal padding, in pixels. The <c>HIWORD</c> is an
/// <c>INT</c> value that specifies the amount of vertical padding, in pixels.
/// </param>
/// <returns>No return value.</returns>
/// </para>
/// <para><strong>Returns</strong></para>
/// <para>No return value.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/tcm-setpadding
TCM_SETPADDING = TCM_FIRST + 43,
/// <summary>
/// Retrieves the current number of rows of tabs in a tab control. You can send this message explicitly or by using the
/// <c>TabCtrl_GetRowCount</c> macro.
/// </summary>
/// <param name="wParam">Must be zero.</param>
/// <param name="lParam">Must be zero.</param>
/// <returns>Returns the number of rows of tabs.</returns>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>Returns the number of rows of tabs.</para>
/// <remarks>Only tab controls that have the <c>TCS_MULTILINE</c> style can have multiple rows of tabs.</remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/tcm-getrowcount
TCM_GETROWCOUNT = TCM_FIRST + 44,
/// <summary>
/// Retrieves the handle to the tooltip control associated with a tab control. You can send this message explicitly or by using
/// the <c>TabCtrl_GetToolTips</c> macro.
/// </summary>
/// <param name="wParam">Must be zero.</param>
/// <param name="lParam">Must be zero.</param>
/// <returns>Returns the handle to the tooltip control if successful, or <c>NULL</c> otherwise.</returns>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>Returns the handle to the tooltip control if successful, or <c>NULL</c> otherwise.</para>
/// <remarks>
/// A tab control creates a tooltip control if it has the <c>TCS_TOOLTIPS</c> style. You can also assign a tooltip control to a
/// tab control by using the <c>TCM_SETTOOLTIPS</c> message.
/// </remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/tcm-gettooltips
TCM_GETTOOLTIPS = TCM_FIRST + 45,
/// <summary>
/// Assigns a tooltip control to a tab control. You can send this message explicitly or by using the <c>TabCtrl_SetToolTips</c> macro.
/// </summary>
/// <param name="wParam">Handle to the tooltip control.</param>
/// <param name="lParam">Must be zero.</param>
/// <returns>No return value.</returns>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Handle to the tooltip control.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>No return value.</para>
/// <remarks>You can retrieve the tooltip control associated with a tab control by using the <c>TCM_GETTOOLTIPS</c> message.</remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/tcm-settooltips
TCM_SETTOOLTIPS = TCM_FIRST + 46,
/// <summary>
/// Returns the index of the item that has the focus in a tab control. You can send this message explicitly or by using the
/// <c>TabCtrl_GetCurFocus</c> macro.
/// </summary>
/// <param name="wParam">Must be zero.</param>
/// <param name="lParam">Must be zero.</param>
/// <returns>Returns the index of the tab item that has the focus.</returns>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>Returns the index of the tab item that has the focus.</para>
/// <remarks>The item that has the focus may be different than the selected item.</remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/tcm-getcurfocus
TCM_GETCURFOCUS = TCM_FIRST + 47,
/// <summary>
/// Sets the focus to a specified tab in a tab control. You can send this message explicitly or by using the
/// <c>TabCtrl_SetCurFocus</c> macro.
/// </summary>
/// <param name="wParam">Index of the tab that gets the focus.</param>
/// <param name="lParam">Must be zero.</param>
/// <returns>No return value.</returns>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Index of the tab that gets the focus.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>No return value.</para>
/// <remarks>
/// <para>
/// If the tab control has the <c>TCS_BUTTONS</c> 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.
/// </para>
/// </remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/tcm-setcurfocus
TCM_SETCURFOCUS = TCM_FIRST + 48,
/// <summary>
/// Sets the minimum width of items in a tab control. You can send this message explicitly or by using the
/// <c>TabCtrl_SetMinTabWidth</c> macro.
/// </summary>
/// <param name="wParam">Must be zero.</param>
/// <param name="lParam">
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>
/// 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.
/// </param>
/// <returns>Returns an INT value that represents the previous minimum tab width.</returns>
/// </para>
/// <para><strong>Returns</strong></para>
/// <para>Returns an INT value that represents the previous minimum tab width.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/tcm-setmintabwidth
TCM_SETMINTABWIDTH = TCM_FIRST + 49,
/// <summary>
/// Resets items in a tab control, clearing any that were set to the <c>TCIS_BUTTONPRESSED</c> state. You can send this message
/// explicitly or by using the <c>TabCtrl_DeselectAll</c> macro.
/// </summary>
/// <param name="wParam">
/// Flag that specifies the scope of the item deselection. If this parameter is set to <c>FALSE</c>, all tab items will be
/// reset. If it is set to <c>TRUE</c>, then all tab items except for the one currently selected will be reset.
/// </param>
/// <param name="lParam">Must be zero.</param>
/// <returns>The return value for this message is not used.</returns>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>
/// Flag that specifies the scope of the item deselection. If this parameter is set to <c>FALSE</c>, all tab items will be reset.
/// If it is set to <c>TRUE</c>, then all tab items except for the one currently selected will be reset.
/// </para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>The return value for this message is not used.</para>
/// <remarks>This message is only meaningful if the <c>TCS_BUTTONS</c> style flag has been set.</remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/tcm-deselectall
TCM_DESELECTALL = TCM_FIRST + 50,
/// <summary>
/// Sets the highlight state of a tab item. You can send this message explicitly or by using the <c>TabCtrl_HighlightItem</c> macro.
/// </summary>
/// <param name="wParam">An <c>INT</c> value that specifies the zero-based index of a tab control item.</param>
/// <param name="lParam">
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>An <c>INT</c> value that specifies the zero-based index of a tab control item.</para>
/// <para><em>lParam</em></para>
/// <para>
/// The <c>LOWORD</c> is a <c>BOOL</c> specifying the highlight state to be set. If this value is <c>TRUE</c>, the tab is
/// highlighted; if <c>FALSE</c>, the tab is set to its default state. The <c>HIWORD</c> must be zero.
/// </param>
/// <returns>Returns nonzero if successful, or zero otherwise.</returns>
/// </para>
/// <para><strong>Returns</strong></para>
/// <para>Returns nonzero if successful, or zero otherwise.</para>
/// <remarks>In Comctl32.dll version 6.0, this message has no visible effect when a theme is active.</remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/tcm-highlightitem
TCM_HIGHLIGHTITEM = TCM_FIRST + 51,
/// <summary>
/// Sets the extended styles that the tab control will use. You can send this message explicitly or by using the
/// <c>TabCtrl_SetExtendedStyle</c> macro.
/// </summary>
/// <param name="wParam">
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>
/// A <c>DWORD</c> 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.
/// </param>
/// <param name="lParam">
/// Value specifying the extended tab control styles. This value is a combination of tab control extended styles.
/// </param>
/// <returns>Returns a <c>DWORD</c> value that contains the previous tab control extended styles.</returns>
/// 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.
/// </para>
/// <para><em>lParam</em></para>
/// <para>Value specifying the extended tab control styles. This value is a combination of tab control extended styles.</para>
/// <para><strong>Returns</strong></para>
/// <para>Returns a <c>DWORD</c> value that contains the previous tab control extended styles.</para>
/// <remarks>
/// <para>
/// 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
/// </para>
/// <para>For backward compatibility reasons, the <c>TabCtrl_SetExtendedStyle</c> macro has not been updated to use dwExMask.</para>
/// </remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/tcm-setextendedstyle
TCM_SETEXTENDEDSTYLE = TCM_FIRST + 52, // optional wParam == mask
/// <summary>
/// Retrieves the extended styles that are currently in use for the tab control. You can send this message explicitly or by
/// using the <c>TabCtrl_GetExtendedStyle</c> macro.
/// Retrieves the extended styles that are currently in use for the tab control. You can send this message explicitly or by using
/// the <c>TabCtrl_GetExtendedStyle</c> macro.
/// </summary>
/// <param name="wParam">Must be zero.</param>
/// <param name="lParam">Must be zero.</param>
/// <returns>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>
/// Returns a <c>DWORD</c> value that represents the extended styles currently in use for the tab control. This value is a
/// combination of tab control extended styles.
/// </returns>
/// </para>
// https://docs.microsoft.com/en-us/windows/win32/controls/tcm-getextendedstyle
TCM_GETEXTENDEDSTYLE = TCM_FIRST + 53,
/// <summary>
@ -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
/// <c>TabCtrl_SetUnicodeFormat</c> macro.
/// </summary>
/// <param name="wParam">
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>
/// 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.
/// </param>
/// <param name="lParam">Must be zero.</param>
/// <returns>Returns the previous Unicode format flag for the control.</returns>
/// </para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>Returns the previous Unicode format flag for the control.</para>
/// <remarks>See the remarks for <c>CCM_SETUNICODEFORMAT</c> for a discussion of this message.</remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/tcm-setunicodeformat
TCM_SETUNICODEFORMAT = CommonControlMessage.CCM_SETUNICODEFORMAT,
/// <summary>
/// Retrieves the Unicode character format flag for the control. You can send this message explicitly or use the
/// <c>TabCtrl_GetUnicodeFormat</c> macro.
/// </summary>
/// <param name="wParam">Must be zero.</param>
/// <param name="lParam">Must be zero.</param>
/// <returns>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>
/// 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.
/// </returns>
/// </para>
/// <remarks>See the remarks for <c>CCM_GETUNICODEFORMAT</c> for a discussion of this message.</remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/tcm-getunicodeformat
TCM_GETUNICODEFORMAT = CommonControlMessage.CCM_GETUNICODEFORMAT
}
@ -461,8 +596,12 @@ namespace Vanara.PInvoke
/// <code>TCN_KEYDOWN pnm = (NMTCKEYDOWN*) lParam;</code>
/// </para>
/// </summary>
/// <param name="lParam">Pointer to an <c>NMTCKEYDOWN</c> structure.</param>
/// <returns>No return value.</returns>
/// <para><strong>Parameters</strong></para>
/// <para><em>lParam</em></para>
/// <para>Pointer to an <c>NMTCKEYDOWN</c> structure.</para>
/// <para><strong>Returns</strong></para>
/// <para>No return value.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/tcn-keydown
TCN_KEYDOWN = TCN_FIRST - 0,
/// <summary>
@ -474,9 +613,13 @@ namespace Vanara.PInvoke
/// <code>TCN_SELCHANGE lpnmhdr = (LPNMHDR) lParam;</code>
/// </para>
/// </summary>
/// <param name="lParam">Pointer to an <c>NMHDR</c> structure that contains additional information about this notification.</param>
/// <returns>No return value.</returns>
/// <para><strong>Parameters</strong></para>
/// <para><em>lParam</em></para>
/// <para>Pointer to an <c>NMHDR</c> structure that contains additional information about this notification.</para>
/// <para><strong>Returns</strong></para>
/// <para>No return value.</para>
/// <remarks>To determine the currently selected tab, use the <c>TabCtrl_GetCurSel</c> macro.</remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/tcn-selchange
TCN_SELCHANGE = TCN_FIRST - 1,
/// <summary>
@ -488,9 +631,13 @@ namespace Vanara.PInvoke
/// <code>TCN_SELCHANGING lpnmhdr = (LPNMHDR) lParam;</code>
/// </para>
/// </summary>
/// <param name="lParam">Pointer to an <c>NMHDR</c> structure that contains additional information about this notification.</param>
/// <returns>Returns <c>TRUE</c> to prevent the selection from changing, or <c>FALSE</c> to allow the selection to change.</returns>
/// <para><strong>Parameters</strong></para>
/// <para><em>lParam</em></para>
/// <para>Pointer to an <c>NMHDR</c> structure that contains additional information about this notification.</para>
/// <para><strong>Returns</strong></para>
/// <para>Returns <c>TRUE</c> to prevent the selection from changing, or <c>FALSE</c> to allow the selection to change.</para>
/// <remarks>To determine the currently selected tab, use the <c>TabCtrl_GetCurSel</c> macro.</remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/tcn-selchanging
TCN_SELCHANGING = TCN_FIRST - 2,
/// <summary>
@ -502,11 +649,15 @@ namespace Vanara.PInvoke
/// <code>TCN_GETOBJECT lpnmon = (LPNMOBJECTNOTIFY) lParam;</code>
/// </para>
/// </summary>
/// <param name="lParam">
/// <para><strong>Parameters</strong></para>
/// <para><em>lParam</em></para>
/// <para>
/// Pointer to an <c>NMOBJECTNOTIFY</c> structure that contains information about the tab item the object is dragged over and
/// receives data the application returns in response to this message.
/// </param>
/// <returns>The application processing this notification code must return zero.</returns>
/// </para>
/// <para><strong>Returns</strong></para>
/// <para>The application processing this notification code must return zero.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/tcn-getobject
TCN_GETOBJECT = TCN_FIRST - 3,
/// <summary>
@ -518,13 +669,15 @@ namespace Vanara.PInvoke
/// <code>TCN_FOCUSCHANGE lpnmh = (LPNMHDR) lParam;</code>
/// </para>
/// </summary>
/// <param name="lParam">Pointer to an <c>NMHDR</c> structure that contains additional information about this notification.</param>
/// <returns>No return value.</returns>
/// <para><strong>Parameters</strong></para>
/// <para><em>lParam</em></para>
/// <para>Pointer to an <c>NMHDR</c> structure that contains additional information about this notification.</para>
/// <para><strong>Returns</strong></para>
/// <para>No return value.</para>
// 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
/// <summary>This section lists supported tab control styles.</summary>
[PInvokeData("Commctrl.h", MSDNShortId = "bb760549")]
[Flags]
@ -701,7 +854,10 @@ namespace Vanara.PInvoke
/// <summary>Initializes a new instance of the <see cref="TCITEM"/> class.</summary>
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);
}
}
/// <summary>Initializes a new instance of the <see cref="TCITEM"/> class.</summary>
@ -770,7 +926,10 @@ namespace Vanara.PInvoke
/// <summary>Initializes a new instance of the <see cref="TCITEM"/> class.</summary>
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);
}
}
/// <summary>Initializes a new instance of the <see cref="TCITEM"/> class.</summary>
@ -781,7 +940,7 @@ namespace Vanara.PInvoke
/// <value>The text.</value>
public string Text
{
get =>pszText.ToString();
get => pszText.ToString();
set
{
pszText.Assign(value, out cchTextMax);

View File

@ -218,51 +218,369 @@ namespace Vanara.PInvoke
[PInvokeData("Commctrl.h", MSDNShortId = "bb787473")]
public enum TaskDialogMessage : uint
{
/// <summary>Navigate page.</summary>
/// <summary>Recreates a task dialog with new contents, simulating the functionality of a multi-page wizard.</summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Not used. Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>
/// A pointer to a <c>TASKDIALOGCONFIG</c> 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.
/// </para>
/// <para><strong>Returns</strong></para>
/// <para>The return value is ignored.</para>
/// <remarks>
/// <para>
/// To launch a wizard task dialog, use the <c>TaskDialogIndirect</c> 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.
/// </para>
/// <para>
/// 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 <c>HRESULT</c> code is returned at the registered callback
/// function. For more information on the callback function syntax, see TaskDialogCallbackProc.
/// </para>
/// </remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/tdm-navigate-page
TDM_NAVIGATE_PAGE = WindowMessage.WM_USER + 101,
/// <summary>Click button.</summary>
/// <summary>Simulates the action of a button click in a task dialog.</summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>An <c>int</c> that specifies the ID of the button to be clicked.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>The return value is ignored.</para>
/// <remarks>
/// The button ID specified by wParam is sent to the <c>TaskDialogCallbackProc</c> 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.
/// </remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/tdm-click-button
TDM_CLICK_BUTTON = WindowMessage.WM_USER + 102, // wParam = Button ID
/// <summary>Set Progress bar to be marquee mode.</summary>
/// <summary>Indicates whether the hosted progress bar of a task dialog should be displayed in marquee mode.</summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>
/// A <c>BOOL</c> that indicates whether the progress bar should be shown in marquee mode. A value of <c>TRUE</c> turns on
/// marquee mode, and a value of <c>FALSE</c> turns off marquee mode.
/// </para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>The return value is ignored.</para>
/// <remarks>For information on marquee mode, see Progress Bar Control.</remarks>
// 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)
/// <summary>Set Progress bar state.</summary>
/// <summary>Sets the state of the progress bar in a task dialog.</summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>An <c>int</c> that specifies the state of the progress bar. This parameter can be one of the following values.</para>
/// <list type="table">
/// <listheader>
/// <term>Value</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term><c>PBST_NORMAL</c></term>
/// <term>Sets the progress bar to the normal state.</term>
/// </item>
/// <item>
/// <term><c>PBST_PAUSED</c></term>
/// <term>Sets the progress bar to the paused state.</term>
/// </item>
/// <item>
/// <term><c>PBST_ERROR</c></term>
/// <term>Set the progress bar to the error state.</term>
/// </item>
/// </list>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>If the function succeeds, the return value is non zero.</para>
/// <para>If the function fails, the return value is zero. To get extended error information call GetLastError.</para>
// 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
/// <summary>Set progress bar range.</summary>
/// <summary>Sets the minimum and maximum values for the progress bar in a task dialog.</summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>
/// The <c>LOWORD</c> specifies the minimum value. By default, the minimum value is zero. The <c>HIWORD</c> specifies the maximum
/// value. By default, the maximum value is 100.
/// </para>
/// <para><strong>Returns</strong></para>
/// <para>
/// Returns the previous minimum and maximum values, if successful, or zero otherwise. The <c>LOWORD</c> contains the minimum
/// value, and the <c>HIWORD</c> contains the maximum value.
/// </para>
// 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)
/// <summary>Set progress bar position.</summary>
/// <summary>Sets the position of the progress bar in a task dialog.</summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>An <c>int</c> that specifies the new position.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>Returns the previous position.</para>
// 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
/// <summary>Set progress bar marquee (animation).</summary>
/// <summary>Starts and stops the marquee display of the progress bar in a task dialog, and sets the speed of the marquee.</summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>
/// A <c>BOOL</c> that indicates whether to turn the marquee display on or off. Use <c>TRUE</c> to turn on the marquee display,
/// or <c>FALSE</c> to turn it off.
/// </para>
/// <para><em>lParam</em></para>
/// <para>
/// A <c>UINT</c> that specifies the time, in milliseconds, between marquee animation updates. If this parameter is zero, the
/// marquee animation is updated every 30 milliseconds.
/// </para>
/// <para><strong>Returns</strong></para>
/// <para>The return value is ignored.</para>
/// <remarks>For information on marquee mode, see Progress Bar Control.</remarks>
// 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)
/// <summary>Set a text element of the Task Dialog.</summary>
/// <summary>Updates a text element in a task dialog.</summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>
/// Indicates the element to update. (For an illustration, see About Task Dialogs.) This parameter must be one of the following values.
/// </para>
/// <list type="table">
/// <listheader>
/// <term>Value</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term><c>TDE_CONTENT</c></term>
/// <term>Content.</term>
/// </item>
/// <item>
/// <term><c>TDE_EXPANDED_INFORMATION</c></term>
/// <term>Expanded information.</term>
/// </item>
/// <item>
/// <term><c>TDE_FOOTER</c></term>
/// <term>Footer text.</term>
/// </item>
/// <item>
/// <term><c>TDE_MAIN_INSTRUCTION</c></term>
/// <term>Main instruction.</term>
/// </item>
/// </list>
/// <para><em>lParam</em></para>
/// <para>The new text to use.</para>
/// <para><strong>Returns</strong></para>
/// <para>The return value is ignored.</para>
/// <remarks>The size or layout of the task dialog may change to accommodate the new text.</remarks>
// 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)
/// <summary>Click a radio button.</summary>
/// <summary>Simulates the action of a radio button click in a task dialog.</summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>An <c>int</c> value that specifies the ID of the radio button to be clicked.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>The return value is ignored.</para>
/// <remarks>
/// The specified radio button ID is sent to the <c>TaskDialogCallbackProc</c> callback function as part of a
/// TDN_RADIO_BUTTON_CLICKED notification code. After the callback function returns, the radio button will be selected.
/// </remarks>
// 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
/// <summary>Enable or disable a button.</summary>
/// <summary>Enables or disables a push button in a task dialog.</summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>An <c>int</c> value that specifies the ID of the push button to be enabled or disabled.</para>
/// <para><em>lParam</em></para>
/// <para>Specifies button state. Set to 0 to disable the button; set to nonzero to enable the button.</para>
/// <para><strong>Returns</strong></para>
/// <para>The return value is ignored.</para>
// 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
/// <summary>Enable or disable a radio button.</summary>
/// <summary>Enables or disables a radio button in a task dialog.</summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>An <c>int</c> value that specifies the ID of the radio button to be enabled or disabled.</para>
/// <para><em>lParam</em></para>
/// <para>Specifies button state. Set to 0 to disable the button; set to nonzero to enable the button.</para>
/// <para><strong>Returns</strong></para>
/// <para>The return value is ignored.</para>
// 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
/// <summary>Check or uncheck the verification checkbox.</summary>
/// <summary>Simulates a click of the verification checkbox of a task dialog, if it exists.</summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para><c>TRUE</c> to set the state of the checkbox to be checked; <c>FALSE</c> to set it to be unchecked.</para>
/// <para><em>lParam</em></para>
/// <para><c>TRUE</c> to set the keyboard focus to the checkbox; <c>FALSE</c> otherwise.</para>
/// <para><strong>Returns</strong></para>
/// <para>The return value is ignored.</para>
// 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)
/// <summary>Update the text of an element (no effect if originally set as null).</summary>
/// <summary>Updates a text element in a task dialog.</summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>
/// Indicates the element to update. (For an illustration of the elements, see About Task Dialogs.) This parameter must be one of
/// the following values:
/// </para>
/// <list type="table">
/// <listheader>
/// <term>Value</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term><c>TDE_CONTENT</c></term>
/// <term>Content.</term>
/// </item>
/// <item>
/// <term><c>TDE_EXPANDED_INFORMATION</c></term>
/// <term>Expanded information.</term>
/// </item>
/// <item>
/// <term><c>TDE_FOOTER</c></term>
/// <term>Footer text.</term>
/// </item>
/// <item>
/// <term><c>TDE_MAIN_INSTRUCTION</c></term>
/// <term>Main instruction.</term>
/// </item>
/// </list>
/// <para><em>lParam</em></para>
/// <para>Pointer to a Unicode string that contains the new text.</para>
/// <para><strong>Returns</strong></para>
/// <para>The return value is ignored.</para>
/// <remarks>
/// <para>
/// 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.
/// </para>
/// <para>
/// If the <c>pszExpandedInformation</c> member of the <c>TASKDIALOGCONFIG</c> structure used to create the task dialog was
/// <c>NULL</c>, and you send a <c>TDM_UPDATE_ELEMENT_TEXT</c> message with TDE_EXPANDED_INFORMATION, nothing will happen.
/// </para>
/// <para>The above also applies to the footer and TDE_FOOTER.</para>
/// </remarks>
// 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)
/// <summary>
/// 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.
/// </summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>The ID of the push button or command link to be updated.</para>
/// <para><em>lParam</em></para>
/// <para>
/// 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.
/// </para>
/// <para><strong>Returns</strong></para>
/// <para>The return value is ignored.</para>
// 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)
/// <summary>Refreshes the icon of the task dialog.</summary>
/// <summary>Refreshes the icon of a task dialog.</summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Indicates which icon element to update. This parameter must be one of the following values:</para>
/// <list type="table">
/// <listheader>
/// <term>Value</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term><c>TDIE_ICON_MAIN</c></term>
/// <term>Main icon.</term>
/// </item>
/// <item>
/// <term><c>TDIE_ICON_FOOTER</c></term>
/// <term>Footer icon.</term>
/// </item>
/// </list>
/// <para><em>lParam</em></para>
/// <para>
/// A pointer to a string (PCWSTR) or handle to an icon (HICON) to display. If lParam is <c>NULL</c>, no icon is displayed,
/// regardless of the value of wParam.
/// </para>
/// <para>
/// If the value of wParam is TDIE_ICON_MAIN and the TDF_USE_HICON_MAIN flag is set on the <c>dwFlags</c> member of the
/// <c>TASKDIALOGCONFIG</c> structure used to create the task dialog, lParam must contain a handle to an icon (HICON) to display.
/// </para>
/// <para>
/// If the value of wParam is TDIE_ICON_FOOTER and the TDF_USE_HICON_FOOTER flag is set on the <c>dwFlags</c> member of the
/// <c>TASKDIALOGCONFIG</c> structure used to create the task dialog, lParam must contain a handle to an icon (HICON) to display.
/// </para>
/// <para>
/// If the TDF_USE_HICON_MAIN or TDF_USE_HICON_FOOTER flags are <c>not</c> set on the <c>dwFlags</c> member, lParam must point to
/// a null-terminated, Unicode string (PCWSTR) that contains a valid resource identifier passed through the
/// <c>MAKEINTRESOURCE</c> 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 <c>hInstance</c> member of the <c>TASKDIALOGCONFIG</c> structure),
/// or if <c>hInstance</c> is <c>NULL</c>, from the system's resource module (imageres.dll). To identify a system resource, use a
/// valid system identifier passed through the <c>MAKEINTRESOURCE</c> macro or one of the following predefined values from commctrl.h:
/// </para>
/// <list type="table">
/// <listheader>
/// <term>Value</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term><c>TD_ERROR_ICON</c></term>
/// <term>A stop sign icon.</term>
/// </item>
/// <item>
/// <term><c>TD_WARNING_ICON</c></term>
/// <term>An exclamation point icon.</term>
/// </item>
/// <item>
/// <term><c>TD_INFORMATION_ICON</c></term>
/// <term>A lowercase letter "i" in a circle icon.</term>
/// </item>
/// <item>
/// <term><c>TD_SHIELD_ICON</c></term>
/// <term>A security shield icon.</term>
/// </item>
/// </list>
/// <para><strong>Returns</strong></para>
/// <para>The return value is ignored.</para>
/// <remarks>
/// <para>
/// 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 <c>HRESULT</c> code is returned at the registered callback function. For more information
/// on the callback function syntax, see TaskDialogCallbackProc.
/// </para>
/// <para>
/// If the task dialog is created without a footer (that is, the appropriate footer members of the <c>TASKDIALOGCONFIG</c>
/// structure used to create the task dialog are <c>NULL</c>) 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 <c>TDM_NAVIGATE_PAGE</c> functionality.
/// </para>
/// </remarks>
// 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
{
/// <summary>
/// <para>
/// 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 <c>TaskDialogIndirect</c> method.
/// </para>
/// <para>
/// <code>TDN_CREATED WPARAM wParam; LPARAM lParam;</code>
/// </para>
/// </summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>The return value is ignored.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/tdn-created
TDN_CREATED = 0,
/// <summary>
/// <para>
/// 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 <c>TaskDialogIndirect</c> method.
/// </para>
/// <para>
/// <code>TDN_NAVIGATED WPARAM wParam; LPARAM lParam;</code>
/// </para>
/// </summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>The return value is ignored.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/tdn-navigated
TDN_NAVIGATED = 1,
/// <summary>
/// <para>
/// 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 <c>TaskDialogIndirect</c> method.
/// </para>
/// <para>
/// <code>TDN_BUTTON_CLICKED WPARAM wParam; LPARAM lParam;</code>
/// </para>
/// </summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>An <c>int</c> that specifies the ID of the button or comand link that was selected.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>
/// To prevent the task dialog from closing, the application must return <c>S_FALSE</c>, otherwise the task dialog is closed and
/// the button ID is returned via the original application call.
/// </para>
// https://docs.microsoft.com/en-us/windows/win32/controls/tdn-button-clicked
TDN_BUTTON_CLICKED = 2,
/// <summary>
/// <para>
/// 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 <c>TaskDialogIndirect</c> method.
/// </para>
/// <para>
/// <code>TDN_HYPERLINK_CLICKED WPARAM wParam; LPARAM lParam;</code>
/// </para>
/// </summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>Pointer to a wide-character string containing the URL of the hyperlink.</para>
/// <para><strong>Returns</strong></para>
/// <para>The return value is ignored.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/tdn-hyperlink-clicked
TDN_HYPERLINK_CLICKED = 3,
/// <summary>
/// <para>
/// 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 <c>dwFlags</c> member of the <c>TASKDIALOGCONFIG</c> structure that was passed to the
/// <c>TaskDialogIndirect</c> function. This notification code is received only through the task dialog callback function, which
/// can be registered using the <c>TaskDialogIndirect</c> method.
/// </para>
/// <para>
/// <code>TDN_TIMER WPARAM wParam; LPARAM lParam;</code>
/// </para>
/// </summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>
/// A <c>DWORD</c> that specifies the number of milliseconds since the dialog was created or this notification code returned <c>S_FALSE</c>.
/// </para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>To reset the tickcount, the application must return <c>S_FALSE</c>, otherwise the tickcount will continue to increment.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/tdn-timer
TDN_TIMER = 4,
/// <summary>
/// <para>
/// 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 <c>TaskDialogIndirect</c> method.
/// </para>
/// <para>
/// <code>TDN_DESTROYED WPARAM wParam; LPARAM lParam;</code>
/// </para>
/// </summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>The return value is ignored.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/tdn-destroyed
TDN_DESTROYED = 5,
/// <summary>
/// <para>
/// 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 <c>TaskDialogIndirect</c> method.
/// </para>
/// <para>
/// <code>TDN_RADIO_BUTTON_CLICKED WPARAM wParam; LPARAM lParam;</code>
/// </para>
/// </summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>An <c>int</c> that specifies the ID corresponding to the radio button that was clicked.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>The return value is ignored.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/tdn-radio-button-clicked
TDN_RADIO_BUTTON_CLICKED = 6,
/// <summary>
/// <para>
/// 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 <c>TaskDialogIndirect</c> method.
/// </para>
/// <para>
/// <code>TDN_DIALOG_CONSTRUCTED WPARAM wParam; LPARAM lParam;</code>
/// </para>
/// </summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>The return value is ignored.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/tdn-dialog-constructed
TDN_DIALOG_CONSTRUCTED = 7,
/// <summary>
/// <para>
/// 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 <c>TaskDialogIndirect</c> method.
/// </para>
/// <para>
/// <code>TDN_VERIFICATION_CLICKED WPARAM wParam; LPARAM lParam;</code>
/// </para>
/// </summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>
/// A <c>BOOL</c> that specifies the status of the verification checkbox. It is <c>TRUE</c> if the verification checkbox is
/// checked, or <c>FALSE</c> if it is unchecked.
/// </para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>The return value is ignored.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/tdn-verification-clicked
TDN_VERIFICATION_CLICKED = 8,
/// <summary>
/// <para>
/// 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 <c>TaskDialogIndirect</c> method.
/// </para>
/// <para>
/// <code>TDN_HELP WPARAM wParam; LPARAM lParam;</code>
/// </para>
/// </summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>The return value is ignored.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/tdn-help
TDN_HELP = 9,
/// <summary>
/// <para>
/// 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 <c>TaskDialogIndirect</c> method.
/// </para>
/// <para>
/// <code>TDN_EXPANDO_BUTTON_CLICKED WPARAM wParam; LPARAM lParam;</code>
/// </para>
/// </summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>A <c>BOOL</c> that is <c>TRUE</c> if the dialog is expanded, or <c>FALSE</c> if not.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>The return value is ignored.</para>
/// <remarks>
/// The example in the Syntax section shows the cast to wParam before sending the notification. <c>LPARAM</c> is not used and
/// must be zero.
/// </remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/tdn-expando-button-clicked
TDN_EXPANDO_BUTTON_CLICKED = 10
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -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.
/// </summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>Returns a 32-bit value that specifies the current logical position of the trackbar's slider.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/tbm-getpos
TBM_GETPOS = WindowMessage.WM_USER,
/// <summary>Retrieves the minimum position for the slider in a trackbar.</summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>Returns a 32-bit value that specifies the minimum position in the trackbar's range of minimum to maximum slider positions.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/tbm-getrangemin
TBM_GETRANGEMIN = WindowMessage.WM_USER + 1,
/// <summary>Retrieves the maximum position for the slider in a trackbar.</summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>Returns a 32-bit value that specifies the maximum position in the trackbar's range of minimum to maximum slider positions.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/tbm-getrangemax
TBM_GETRANGEMAX = WindowMessage.WM_USER + 2,
/// <summary>
/// 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.
/// </summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>
/// 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 <c>TBM_GETNUMTICS</c> message.
/// </para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>Returns the logical position of the specified tick mark, or -1 if wParam does not specify a valid index.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/tbm-gettic
TBM_GETTIC = WindowMessage.WM_USER + 3,
/// <summary>Sets a tick mark in a trackbar at the specified logical position.</summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>
/// 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.
/// </para>
/// <para><strong>Returns</strong></para>
/// <para>Returns <c>TRUE</c> if the tick mark is set, or <c>FALSE</c> otherwise.</para>
/// <remarks>
/// A trackbar creates its own first and last tick marks. Do not use this message to set the first and last tick marks.
/// </remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/tbm-settic
TBM_SETTIC = WindowMessage.WM_USER + 4,
/// <summary>Sets the current logical position of the slider in a trackbar.</summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>
/// Redraw flag. If this parameter is <c>TRUE</c>, the message redraws the control with the slider at the position given by
/// lParam. If this parameter is <c>FALSE</c>, 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 <c>TBM_GETPOS</c> message) regardless of the wParam parameter.
/// </para>
/// <para><em>lParam</em></para>
/// <para>
/// 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.
/// </para>
/// <para><strong>Returns</strong></para>
/// <para>No return value.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/tbm-setpos
TBM_SETPOS = WindowMessage.WM_USER + 5,
/// <summary>Sets the range of minimum and maximum logical positions for the slider in a trackbar.</summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>
/// Redraw flag. If this parameter is <c>TRUE</c>, the trackbar is redrawn after the range is set. If this parameter is
/// <c>FALSE</c>, the message sets the range but does not redraw the trackbar.
/// </para>
/// <para><em>lParam</em></para>
/// <para>The <c>LOWORD</c> specifies the minimum position for the slider, and the <c>HIWORD</c> specifies the maximum position.</para>
/// <para><strong>Returns</strong></para>
/// <para>No return value.</para>
/// <remarks>
/// <para>
/// If the current slider position is outside the new range, the <c>TBM_SETRANGE</c> message sets the slider position to the new
/// maximum or minimum value.
/// </para>
/// <para>
/// 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 <c>TBM_SETRANGEMIN</c> and <c>TBM_SETRANGEMAX</c> messages.
/// </para>
/// </remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/tbm-setrange
TBM_SETRANGE = WindowMessage.WM_USER + 6,
/// <summary>Sets the minimum logical position for the slider in a trackbar.</summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>
/// Redraw flag. If this parameter is <c>TRUE</c>, the message redraws the trackbar after the range is set. If this parameter is
/// <c>FALSE</c>, the message sets the range but does not redraw the trackbar.
/// </para>
/// <para><em>lParam</em></para>
/// <para>Minimum position for the slider.</para>
/// <para><strong>Returns</strong></para>
/// <para>No return value.</para>
/// <remarks>
/// If the current slider position is less than the new minimum, the <c>TBM_SETRANGEMIN</c> message sets the slider position to
/// the new minimum value.
/// </remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/tbm-setrangemin
TBM_SETRANGEMIN = WindowMessage.WM_USER + 7,
/// <summary>Sets the maximum logical position for the slider in a trackbar.</summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>
/// Redraw flag. If this parameter is <c>TRUE</c>, the trackbar is redrawn after the range is set. If this parameter is
/// <c>FALSE</c>, the message sets the range but does not redraw the trackbar.
/// </para>
/// <para><em>lParam</em></para>
/// <para>Maximum position for the slider.</para>
/// <para><strong>Returns</strong></para>
/// <para>No return value.</para>
/// <remarks>
/// If the current slider position is greater than the new maximum, the <c>TBM_SETRANGEMAX</c> message sets the slider position
/// to the new maximum value.
/// </remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/tbm-setrangemax
TBM_SETRANGEMAX = WindowMessage.WM_USER + 8,
/// <summary>
/// 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.
/// </summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>
/// Redraw flag. If this parameter is <c>TRUE</c>, the trackbar is redrawn after the tick marks are cleared. If this parameter is
/// <c>FALSE</c>, the message clears the tick marks but does not redraw the trackbar.
/// </para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>No return value.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/tbm-cleartics
TBM_CLEARTICS = WindowMessage.WM_USER + 9,
/// <summary>Sets the starting and ending positions for the available selection range in a trackbar.</summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>
/// Redraw flag. If this parameter is <c>TRUE</c>, the message redraws the trackbar after the selection range is set. If this
/// parameter is <c>FALSE</c>, the message sets the selection range but does not redraw the trackbar.
/// </para>
/// <para><em>lParam</em></para>
/// <para>
/// The <c>LOWORD</c> specifies the starting logical position for the selection range, and the <c>HIWORD</c> specifies the ending
/// logical position.
/// </para>
/// <para><strong>Returns</strong></para>
/// <para>No return value.</para>
/// <remarks>
/// <para>This message is ignored if the trackbar does not have the <c>TBS_ENABLESELRANGE</c> style.</para>
/// <para><c>TBM_SETSEL</c> allows you to restrict the pointer to only a portion of the range available to the progress bar.</para>
/// </remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/tbm-setsel
TBM_SETSEL = WindowMessage.WM_USER + 10,
/// <summary>
/// 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 <c>TBS_ENABLESELRANGE</c> style.
/// </summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>
/// Redraw flag. If this parameter is <c>TRUE</c>, the message redraws the trackbar after the selection range is set. If this
/// parameter is <c>FALSE</c>, the message sets the selection range but does not redraw the trackbar.
/// </para>
/// <para><em>lParam</em></para>
/// <para>Starting position of the selection range.</para>
/// <para><strong>Returns</strong></para>
/// <para>No return value.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/tbm-setselstart
TBM_SETSELSTART = WindowMessage.WM_USER + 11,
/// <summary>
/// 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 <c>TBS_ENABLESELRANGE</c> style.
/// </summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>
/// Redraw flag. If this parameter is <c>TRUE</c>, the message redraws the trackbar after the selection range is set. If this
/// parameter is <c>FALSE</c>, the message sets the selection range but does not redraw the trackbar.
/// </para>
/// <para><em>lParam</em></para>
/// <para>Ending logical position of the selection range.</para>
/// <para><strong>Returns</strong></para>
/// <para>No return value.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/tbm-setselend
TBM_SETSELEND = WindowMessage.WM_USER + 12,
/// <summary>Retrieves the address of an array that contains the positions of the tick marks for a trackbar.</summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>
/// Returns the address of an array of <c>DWORD</c> 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.
/// </para>
/// <remarks>
/// The number of elements in the array is two less than the tick count returned by the <c>TBM_GETNUMTICS</c> 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.
/// </remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/tbm-getptics
TBM_GETPTICS = WindowMessage.WM_USER + 14,
/// <summary>Retrieves the current physical position of a tick mark in a trackbar.</summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>
/// Zero-based index identifying a tick mark. The positions of the first and last tick marks are not directly available via this message.
/// </para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>
/// 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.
/// </para>
/// <remarks>
/// <para>
/// 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 <c>TBM_GETRANGEMIN</c> and <c>TBM_GETRANGEMAX</c> is less than two, then
/// there is no valid index and this message will fail.
/// </para>
/// <para>
/// The following illustrates the relation between the ticks on a trackbar, the ticks available through this message, and their
/// zero-based indexes.
/// </para>
/// <para>
/// <code>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.</code>
/// </para>
/// </remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/tbm-getticpos
TBM_GETTICPOS = WindowMessage.WM_USER + 15,
/// <summary>Retrieves the number of tick marks in a trackbar.</summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>
/// If no tick flag is set, it returns 2 for the beginning and ending ticks. If <c>TBS_NOTICKS</c> is set, it returns zero.
/// Otherwise, it takes the difference between the range minimum and maximum, divides by the tick frequency, and adds 2.
/// </para>
/// <remarks>
/// The <c>TBM_GETNUMTICS</c> message counts all of the tick marks, including the first and last tick marks created by the trackbar.
/// </remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/tbm-getnumtics
TBM_GETNUMTICS = WindowMessage.WM_USER + 16,
/// <summary>Retrieves the starting position of the current selection range in a trackbar.</summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>Returns a 32-bit value that specifies the starting position of the current selection range.</para>
/// <remarks>
/// A trackbar can have a selection range only if you specified the <c>TBS_ENABLESELRANGE</c> style when you created it.
/// </remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/tbm-getselstart
TBM_GETSELSTART = WindowMessage.WM_USER + 17,
/// <summary>Retrieves the ending position of the current selection range in a trackbar.</summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>Returns a 32-bit value that specifies the ending position of the current selection range.</para>
/// <remarks>
/// A trackbar can have a selection range only if you specified the <c>TBS_ENABLESELRANGE</c> style when you created it.
/// </remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/tbm-getselend
TBM_GETSELEND = WindowMessage.WM_USER + 18,
/// <summary>Clears the current selection range in a trackbar.</summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Redraw flag. If this parameter is <c>TRUE</c>, the trackbar is redrawn after the selection is cleared.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>No return value.</para>
/// <remarks>
/// A trackbar can have a selection range only if you specified the <c>TBS_ENABLESELRANGE</c> style when you created it.
/// </remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/tbm-clearsel
TBM_CLEARSEL = WindowMessage.WM_USER + 19,
/// <summary>
@ -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.
/// </summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Frequency of the tick marks.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>No return value.</para>
/// <remarks>The trackbar must have the <c>TBS_AUTOTICKS</c> style to use this message.</remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/tbm-setticfreq
TBM_SETTICFREQ = WindowMessage.WM_USER + 20,
/// <summary>
@ -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.
/// </summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>New page size.</para>
/// <para><strong>Returns</strong></para>
/// <para>Returns a 32-bit value that specifies the previous page size.</para>
/// <remarks>
/// The trackbar also sends a <c>WM_HSCROLL</c> or <c>WM_VSCROLL</c> 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.
/// </remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/tbm-setpagesize
TBM_SETPAGESIZE = WindowMessage.WM_USER + 21,
/// <summary>
@ -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.
/// </summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>Returns a 32-bit value that specifies the page size for the trackbar.</para>
/// <remarks>
/// The trackbar also sends a <c>WM_HSCROLL</c> or <c>WM_VSCROLL</c> 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.
/// </remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/tbm-getpagesize
TBM_GETPAGESIZE = WindowMessage.WM_USER + 22,
/// <summary>
/// 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.
/// </summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>New line size.</para>
/// <para><strong>Returns</strong></para>
/// <para>Returns a 32-bit value that specifies the previous line size.</para>
/// <remarks>
/// <para>The default setting for the line size is 1.</para>
/// <para>
/// The trackbar also sends a <c>WM_HSCROLL</c> or <c>WM_VSCROLL</c> message with the TB_LINEUP and TB_LINEDOWN notification
/// codes to its parent window when the user presses the arrow keys.
/// </para>
/// </remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/tbm-setlinesize
TBM_SETLINESIZE = WindowMessage.WM_USER + 23,
/// <summary>
/// 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.
/// </summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>Returns a 32-bit value that specifies the line size for the trackbar.</para>
/// <remarks>
/// <para>The default setting for the line size is 1.</para>
/// <para>
/// The trackbar also sends a <c>WM_HSCROLL</c> or <c>WM_VSCROLL</c> message with the TB_LINEUP and TB_LINEDOWN notification
/// codes to its parent window when the user presses the arrow keys.
/// </para>
/// </remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/tbm-getlinesize
TBM_GETLINESIZE = WindowMessage.WM_USER + 24,
/// <summary>Retrieves the size and position of the bounding rectangle for the slider in a trackbar.</summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>
/// Pointer to a <c>RECT</c> structure. The message fills this structure with the bounding rectangle of the trackbar's slider in
/// client coordinates of the trackbar's window.
/// </para>
/// <para><strong>Returns</strong></para>
/// <para>No return value.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/tbm-getthumbrect
TBM_GETTHUMBRECT = WindowMessage.WM_USER + 25,
/// <summary>
/// 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.)
/// </summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>
/// Pointer to a <c>RECT</c> structure. The message fills this structure with the channel's bounding rectangle, in client
/// coordinates of the trackbar's window.
/// </para>
/// <para><strong>Returns</strong></para>
/// <para>No return value.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/tbm-getchannelrect
TBM_GETCHANNELRECT = WindowMessage.WM_USER + 26,
/// <summary>
/// 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 <c>TBS_FIXEDLENGTH</c> style.
/// </summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Length, in pixels, of the slider.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>No return value.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/tbm-setthumblength
TBM_SETTHUMBLENGTH = WindowMessage.WM_USER + 27,
/// <summary>Retrieves the length of the slider in a trackbar.</summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>Returns the length, in pixels, of the slider.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/tbm-getthumblength
TBM_GETTHUMBLENGTH = WindowMessage.WM_USER + 28,
/// <summary>Assigns a tooltip control to a trackbar control.</summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Handle to an existing tooltip control.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>The return value for this message is not used.</para>
/// <remarks>
/// When a trackbar control is created with the <c>TBS_TOOLTIPS</c> style, it creates a default tooltip control that appears next
/// to the slider, displaying the slider's current position.
/// </remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/tbm-settooltips
TBM_SETTOOLTIPS = WindowMessage.WM_USER + 29,
/// <summary>Retrieves the handle to the tooltip control assigned to the trackbar, if any.</summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>
/// Returns the handle to the tooltip control assigned to the trackbar, or <c>NULL</c> if tooltips are not in use. If the
/// trackbar control does not use the <c>TBS_TOOLTIPS</c> style, the return value is <c>NULL</c>.
/// </para>
// https://docs.microsoft.com/en-us/windows/win32/controls/tbm-gettooltips
TBM_GETTOOLTIPS = WindowMessage.WM_USER + 30,
/// <summary>
/// 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 <c>TBS_TOOLTIPS</c> style display tooltips.
/// </summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Value representing the location at which to display the tooltip control. This value can be one of the following:</para>
/// <list type="table">
/// <listheader>
/// <term>Value</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term><c>TBTS_TOP</c></term>
/// <term>The tooltip control will be positioned above the trackbar. This flag is for use with horizontal trackbars.</term>
/// </item>
/// <item>
/// <term><c>TBTS_LEFT</c></term>
/// <term>The tooltip control will be positioned to the left of the trackbar. This flag is for use with vertical trackbars.</term>
/// </item>
/// <item>
/// <term><c>TBTS_BOTTOM</c></term>
/// <term>The tooltip control will be positioned below the trackbar. This flag is for use with horizontal trackbars.</term>
/// </item>
/// <item>
/// <term><c>TBTS_RIGHT</c></term>
/// <term>The tooltip control will be positioned to the right of the trackbar. This flag is for use with vertical trackbars.</term>
/// </item>
/// </list>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>
/// Returns a value that represents the tooltip control's previous location. The return value equals one of the possible values
/// for wParam.
/// </para>
// https://docs.microsoft.com/en-us/windows/win32/controls/tbm-settipside
TBM_SETTIPSIDE = WindowMessage.WM_USER + 31,
/// <summary>
/// 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).
/// </summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Value specifying the location at which to display the buddy window. This value can be one of the following:</para>
/// <list type="table">
/// <listheader>
/// <term>Value</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term><c>TRUE</c></term>
/// <term>
/// The buddy will appear to the left of the trackbar if the trackbar control uses the <c>TBS_HORZ</c> style. If the trackbar
/// uses the <c>TBS_VERT</c> style, the buddy appears above the trackbar control.
/// </term>
/// </item>
/// <item>
/// <term><c>FALSE</c></term>
/// <term>
/// The buddy will appear to the right of the trackbar if the trackbar control uses the <c>TBS_HORZ</c> style. If the trackbar
/// uses the <c>TBS_VERT</c> style, the buddy appears below the trackbar control.
/// </term>
/// </item>
/// </list>
/// <para><em>lParam</em></para>
/// <para>Handle to the window that will be set as the trackbar control's buddy.</para>
/// <para><strong>Returns</strong></para>
/// <para>Returns the handle to the window that was previously assigned to the control at that location.</para>
/// <remarks>
/// <para>Note</para>
/// <para>
/// 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.
/// </para>
/// </remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/tbm-setbuddy
TBM_SETBUDDY = WindowMessage.WM_USER + 32,
/// <summary>
/// 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).
/// </summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Value indicating which buddy window handle will be retrieved, by relative location. This value can be one of the following:</para>
/// <list type="table">
/// <listheader>
/// <term>Value</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term><c><c>TRUE</c></c></term>
/// <term>
/// Retrieves the handle to the buddy to the left of the trackbar. If the trackbar control uses the <c>TBS_VERT</c> style, the
/// message will retrieve the buddy above the trackbar.
/// </term>
/// </item>
/// <item>
/// <term><c><c>FALSE</c></c></term>
/// <term>
/// Retrieves the handle to the buddy to the right of the trackbar. If the trackbar control uses the <c>TBS_VERT</c> style, the
/// message will retrieve the buddy below the trackbar.
/// </term>
/// </item>
/// </list>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>
/// Returns the handle to the buddy window at the location specified by wParam, or <c>NULL</c> if no buddy window exists at that location.
/// </para>
// https://docs.microsoft.com/en-us/windows/win32/controls/tbm-getbuddy
TBM_GETBUDDY = WindowMessage.WM_USER + 33,
/// <summary>Sets the current logical position of the slider in a trackbar.</summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>wParam is unused.</para>
/// <para><em>lParam</em></para>
/// <para>
/// 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.
/// </para>
/// <para><strong>Returns</strong></para>
/// <para>No return value.</para>
/// <remarks>
/// Calling <c>TBM_SETPOSNOTIFY</c> will set the trackbar slider location like <c>TBM_SETPOS</c> would, but it will also cause
/// the trackbar to notify its parent of a move via a <c>WM_HSCROLL</c> or <c>WM_VSCROLL</c> message.
/// </remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/tbm-setposnotify
TBM_SETPOSNOTIFY = WindowMessage.WM_USER + 34,
/// <summary>
/// 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.
/// </summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>
/// 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.
/// </para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>Returns the previous Unicode format flag for the control.</para>
/// <remarks>See the remarks for <c>CCM_SETUNICODEFORMAT</c> for a discussion of this message.</remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/tbm-setunicodeformat
TBM_SETUNICODEFORMAT = CommonControlMessage.CCM_SETUNICODEFORMAT,
/// <summary>Retrieves the Unicode character format flag for the control.</summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para><strong>Returns</strong></para>
/// <para>
/// 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.
/// </para>
/// <remarks>See the remarks for <c>CCM_GETUNICODEFORMAT</c> for a discussion of this message.</remarks>
// 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
{
/// <summary>
/// Notifies that the thumb position on a trackbar is changing. This notification code is sent in the form of a WM_NOTIFY message.
/// </summary>
/// <remarks>
/// Send this notification to clients that do not listen for WM_HSCROLL or WM_VSCROLL messages.
/// <para>lPara value</para>
/// <para>
/// 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 <c>WM_NOTIFY</c> message.
/// </para>
/// <para>Return value</para>
/// <para>The return value is ignored.</para>
/// </remarks>
/// <para>
/// <code>TRBN_THUMBPOSCHANGING lpNMTrbThumbPosChanging = (NMTRBTHUMBPOSCHANGING*) lParam;</code>
/// </para>
/// </summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>lParam</em></para>
/// <para>
/// Pointer to a <c>NMTRBTHUMBPOSCHANGING</c> structure. The caller is responsible for allocating this structure and setting its
/// members, including the members of the contained <c>NMHDR</c> structure.
/// </para>
/// <para><strong>Returns</strong></para>
/// <para>Return <c>TRUE</c> to prevent the thumb from moving to the specified position.</para>
/// <remarks>Send this notification to clients that do not listen for <c>WM_HSCROLL</c> or <c>WM_VSCROLL</c> messages.</remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/trbn-thumbposchanging
TRBN_THUMBPOSCHANGING = TRBN_FIRST
}

File diff suppressed because it is too large Load Diff

View File

@ -21,57 +21,251 @@ namespace Vanara.PInvoke
public enum UpDownMessage : uint
{
/// <summary>Retrieves acceleration information for an up-down control.</summary>
/// <para>
/// <strong>Parameters</strong>
/// </para>
/// <para><em>wParam</em></para>
/// <para>Number of elements in the array specified by lParam.</para>
/// <para><em>lParam</em></para>
/// <para>Pointer to an array of <c>UDACCEL</c> structures that receive acceleration information.</para>
/// <para>
/// <strong>Returns</strong>
/// </para>
/// <para>The return value is the number of accelerators currently set for the control.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/udm-getaccel
UDM_GETACCEL = WindowMessage.WM_USER + 108,
/// <summary>Retrieves the current radix base (that is, either base 10 or 16) for an up-down control.</summary>
/// <para>
/// <strong>Parameters</strong>
/// </para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para>
/// <strong>Returns</strong>
/// </para>
/// <para>The return value is the current base value.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/udm-getbase
UDM_GETBASE = WindowMessage.WM_USER + 110,
/// <summary>Retrieves the handle to the current buddy window.</summary>
/// <para>
/// <strong>Parameters</strong>
/// </para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para>
/// <strong>Returns</strong>
/// </para>
/// <para>The return value is the handle to the current buddy window.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/udm-getbuddy
UDM_GETBUDDY = WindowMessage.WM_USER + 106,
/// <summary>Retrieves the current position of an up-down control with 16-bit precision.</summary>
/// <summary>Returns the 32-bit position of an up-down control.</summary>
/// <para>
/// <strong>Parameters</strong>
/// </para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>Pointer to a <c>BOOL</c> value that is set to zero if the value is successfully retrieved or nonzero if an error occurs. If this parameter is set to <c>NULL</c>, errors are not reported.</para>
/// <para>If <c>UDM_GETPOS32</c> is used in a cross-process situation, this parameter must be <c>NULL</c>.</para>
/// <para>
/// <strong>Returns</strong>
/// </para>
/// <para>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.</para>
/// <remarks>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.</remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/udm-getpos32
UDM_GETPOS = WindowMessage.WM_USER + 104,
/// <summary>Returns the 32-bit position of an up-down control.</summary>
/// <para>
/// <strong>Parameters</strong>
/// </para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>Pointer to a <c>BOOL</c> value that is set to zero if the value is successfully retrieved or nonzero if an error occurs. If this parameter is set to <c>NULL</c>, errors are not reported.</para>
/// <para>If <c>UDM_GETPOS32</c> is used in a cross-process situation, this parameter must be <c>NULL</c>.</para>
/// <para>
/// <strong>Returns</strong>
/// </para>
/// <para>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.</para>
/// <remarks>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.</remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/udm-getpos32
UDM_GETPOS32 = WindowMessage.WM_USER + 114,
/// <summary>Retrieves the minimum and maximum positions (range) for an up-down control.</summary>
/// <para>
/// <strong>Parameters</strong>
/// </para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para>
/// <strong>Returns</strong>
/// </para>
/// <para>The return value is a 32-bit value that contains the minimum and maximum positions. The <c>LOWORD</c> is the maximum position for the control, and the <c>HIWORD</c> is the minimum position.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/udm-getrange
UDM_GETRANGE = WindowMessage.WM_USER + 102,
/// <summary>Retrieves the 32-bit range of an up-down control.</summary>
/// <para>
/// <strong>Parameters</strong>
/// </para>
/// <para><em>wParam</em></para>
/// <para>Pointer to a signed integer that receives the lower limit of the up-down control range. This parameter may be <c>NULL</c>.</para>
/// <para><em>lParam</em></para>
/// <para>Pointer to a signed integer that receives the upper limit of the up-down control range. This parameter may be <c>NULL</c>.</para>
/// <para>
/// <strong>Returns</strong>
/// </para>
/// <para>The return value for this message is not used.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/udm-getrange32
UDM_GETRANGE32 = WindowMessage.WM_USER + 112,
/// <summary>Retrieves the Unicode character format flag for the control.</summary>
/// <para>
/// <strong>Parameters</strong>
/// </para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para>
/// <strong>Returns</strong>
/// </para>
/// <para>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.</para>
/// <remarks>See the remarks for <c>CCM_GETUNICODEFORMAT</c> for a discussion of this message.</remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/udm-getunicodeformat
UDM_GETUNICODEFORMAT = CommonControlMessage.CCM_GETUNICODEFORMAT,
/// <summary>Sets the acceleration for an up-down control.</summary>
/// <para>
/// <strong>Parameters</strong>
/// </para>
/// <para><em>wParam</em></para>
/// <para>Number of <c>UDACCEL</c> structures specified by aAccels.</para>
/// <para><em>lParam</em></para>
/// <para>Pointer to an array of <c>UDACCEL</c> structures that contain acceleration information. Elements should be sorted in ascending order based on the <c>nSec</c> member.</para>
/// <para>
/// <strong>Returns</strong>
/// </para>
/// <para>Returns <c>TRUE</c> if successful, or <c>FALSE</c> otherwise.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/udm-setaccel
UDM_SETACCEL = WindowMessage.WM_USER + 107,
/// <summary>
/// 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.
/// </summary>
/// <summary>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.</summary>
/// <para>
/// <strong>Parameters</strong>
/// </para>
/// <para><em>wParam</em></para>
/// <para>New base value for the control. This parameter can be 10 for decimal or 16 for hexadecimal.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para>
/// <strong>Returns</strong>
/// </para>
/// <para>The return value is the previous base value. If an invalid base is given, the return value is zero.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/udm-setbase
UDM_SETBASE = WindowMessage.WM_USER + 109,
/// <summary>Sets the buddy window for an up-down control.</summary>
/// <para>
/// <strong>Parameters</strong>
/// </para>
/// <para><em>wParam</em></para>
/// <para>Handle to the new buddy window.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para>
/// <strong>Returns</strong>
/// </para>
/// <para>The return value is the handle to the previous buddy window.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/udm-setbuddy
UDM_SETBUDDY = WindowMessage.WM_USER + 105,
/// <summary>Sets the current position for an up-down control with 16-bit precision.</summary>
/// <para>
/// <strong>Parameters</strong>
/// </para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>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.</para>
/// <para>
/// <strong>Returns</strong>
/// </para>
/// <para>The return value is the previous position.</para>
/// <remarks>This message only supports 16-bit positions. If 32-bit values have been enabled for an up-down control with <c>UDM_SETRANGE32</c>, use <c>UDM_SETPOS32</c>.</remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/udm-setpos
UDM_SETPOS = WindowMessage.WM_USER + 103,
/// <summary>Sets the position of an up-down control with 32-bit precision.</summary>
/// <para>
/// <strong>Parameters</strong>
/// </para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>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.</para>
/// <para>
/// <strong>Returns</strong>
/// </para>
/// <para>Returns the previous position.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/udm-setpos32
UDM_SETPOS32 = WindowMessage.WM_USER + 113,
/// <summary>Sets the minimum and maximum positions (range) for an up-down control.</summary>
/// <para>
/// <strong>Parameters</strong>
/// </para>
/// <para><em>wParam</em></para>
/// <para>Must be zero.</para>
/// <para><em>lParam</em></para>
/// <para>The <c>LOWORD</c> is a <c>short</c> that specifies the maximum position for the up-down control, and the <c>HIWORD</c> is a <c>short</c> 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.</para>
/// <para>
/// <strong>Returns</strong>
/// </para>
/// <para>No return value.</para>
/// <remarks>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.</remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/udm-setrange
UDM_SETRANGE = WindowMessage.WM_USER + 101,
/// <summary>Sets the 32-bit range of an up-down control.</summary>
/// <para>
/// <strong>Parameters</strong>
/// </para>
/// <para><em>wParam</em></para>
/// <para>Signed integer value that represents the new lower limit of the up-down control range.</para>
/// <para><em>lParam</em></para>
/// <para>Signed integer value that represents the new upper limit of the up-down control range.</para>
/// <para>
/// <strong>Returns</strong>
/// </para>
/// <para>The return value for this message is not used.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/udm-setrange32
UDM_SETRANGE32 = WindowMessage.WM_USER + 111,
/// <summary>
/// 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.
/// </summary>
/// <summary>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.</summary>
/// <para>
/// <strong>Parameters</strong>
/// </para>
/// <para><em>wParam</em></para>
/// <para>Determines the character set that is used by the control. If this value is <c>TRUE</c>, the control will use Unicode characters. If this value is <c>FALSE</c>, the control will use ANSI characters.</para>
/// <para><em>lParam</em></para>
/// <para>Must be zero.</para>
/// <para>
/// <strong>Returns</strong>
/// </para>
/// <para>Returns the previous Unicode format flag for the control.</para>
/// <remarks>See the remarks for <c>CCM_SETUNICODEFORMAT</c> for a discussion of this message.</remarks>
// 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
{
/// <summary>
/// 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.
/// <para>Notifies a control's parent window that the control is releasing mouse capture. This notification code is sent in the form of a <c>WM_NOTIFY</c> message.</para>
/// <para><code>NM_RELEASEDCAPTURE lpnmh = (LPNMHDR) lParam; </code></para>
/// </summary>
/// <para>
/// <strong>Parameters</strong>
/// </para>
/// <para><em>lParam</em></para>
/// <para>A pointer to an <c>NMHDR</c> structure that contains additional information about this notification.</para>
/// <para>
/// <strong>Returns</strong>
/// </para>
/// <para>Unless otherwise specified, the control ignores the return value from this notification code.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/nm-releasedcapture
NM_RELEASEDCAPTURE = UDN_FIRST - 1,
/// <summary>
/// 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.
/// <para>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 <c>WM_NOTIFY</c> message.</para>
/// <para><code>UDN_DELTAPOS lpnmud = (LPNMUPDOWN) lParam; </code></para>
/// </summary>
/// <para>
/// <strong>Parameters</strong>
/// </para>
/// <para><em>lParam</em></para>
/// <para>Pointer to an <c>NMUPDOWN</c> structure that contains information about the position change. The <c>iPos</c> member of this structure contains the current position of the control. The <c>iDelta</c> 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.</para>
/// <para>
/// <strong>Returns</strong>
/// </para>
/// <para>Return nonzero to prevent the change in the control's position, or zero to allow the change.</para>
/// <remarks>The UDN_DELTAPOS notification code is sent before the <c>WM_VSCROLL</c> or <c>WM_HSCROLL</c> message, which actually changes the control's position. This lets you examine, allow, modify, or disallow the change.</remarks>
// 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);
/// <summary>
/// Contains information specific to up-down control notification messages. It is identical to and replaces the <c>NM_UPDOWN</c> structure.

View File

@ -135,83 +135,170 @@ namespace Vanara.PInvoke
public enum CommonControlNotification
{
/// <summary>
/// <para>
/// 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.
/// <list>
/// <item>
/// <term>lParam</term>
/// <description>A pointer to an NMHDR structure that contains additional information about this notification.</description>
/// </item>
/// </list>
/// available. This notification code is sent in the form of a <c>WM_NOTIFY</c> message.
/// </para>
/// <para>
/// <code>NM_OUTOFMEMORY lpnmh = (LPNMHDR) lParam;</code>
/// </para>
/// </summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>lParam</em></para>
/// <para>A pointer to an <c>NMHDR</c> structure that contains additional information about this notification.</para>
/// <para><strong>Returns</strong></para>
/// <para>The return value is ignored by the control.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/nm-outofmemory
NM_OUTOFMEMORY = NM_FIRST - 1,
/// <summary>
/// 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.
/// <para>
/// 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 <c>WM_NOTIFY</c> message.
/// </para>
/// <para>
/// <code>NM_CLICK lpnmitem = (LPNMITEMACTIVATE) lParam;</code>
/// </para>
/// </summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>lParam</em></para>
/// <para>
/// Version 4.71. Pointer to an <c>NMITEMACTIVATE</c> structure that contains additional information about this notification. The
/// <c>iItem</c>, <c>iSubItem</c>, and <c>ptAction</c> members of this structure contain information about the item.
/// </para>
/// <para><strong>Returns</strong></para>
/// <para>The return value for this notification is not used.</para>
/// <remarks>
/// The <c>iItem</c> 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 <c>LVM_SUBITEMHITTEST</c> message.
/// </remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/nm-click-list-view
NM_CLICK = NM_FIRST - 2,
/// <summary>
/// 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.
/// <para>
/// 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 <c>WM_NOTIFY</c> message.
/// </para>
/// <para>
/// <code>NM_DBLCLK lpnmitem = (LPNMITEMACTIVATE) lParam;</code>
/// </para>
/// </summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>lParam</em></para>
/// <para>
/// Version 4.71. Pointer to an <c>NMITEMACTIVATE</c> structure that contains additional information about this notification. The
/// <c>iItem</c>, <c>iSubItem</c>, and <c>ptAction</c> members of this structure contain information about the item.
/// </para>
/// <para><strong>Returns</strong></para>
/// <para>The return value for this notification is not used.</para>
/// <remarks>
/// The <c>iItem</c> 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 <c>LVM_SUBITEMHITTEST</c> message.
/// </remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/nm-dblclk-list-view
NM_DBLCLK = NM_FIRST - 3,
/// <summary>
/// <para>
/// 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.
/// <list>
/// <item>
/// <term>lParam</term>
/// <description>A pointer to an NMHDR structure that contains additional information about this notification.</description>
/// </item>
/// </list>
/// notification code is sent in the form of a <c>WM_NOTIFY</c> message.
/// </para>
/// <para>
/// <code>NM_RETURN lpnmh = (LPNMHDR) lParam;</code>
/// </para>
/// </summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>lParam</em></para>
/// <para>A pointer to an <c>NMHDR</c> structure that contains additional information about this notification.</para>
/// <para><strong>Returns</strong></para>
/// <para>The return value is ignored by the control.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/nm-return
NM_RETURN = NM_FIRST - 4,
/// <summary>
/// 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.
/// <para>
/// 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 <c>WM_NOTIFY</c> message.
/// </para>
/// <para>
/// <code>NM_RCLICK lpnmh = (LPNMHDR) lParam;</code>
/// </para>
/// </summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>lParam</em></para>
/// <para>Pointer to an <c>NMHDR</c> structure that contains additional information about this notification.</para>
/// <para><strong>Returns</strong></para>
/// <para>Return nonzero to prevent the default processing, or zero to allow the default processing.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/nm-rclick-tree-view
NM_RCLICK = NM_FIRST - 5,
/// <summary>
/// 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.
/// <para>
/// 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 <c>WM_NOTIFY</c> message.
/// </para>
/// <para>
/// <code>NM_RDBLCLK lpnmh = (LPNMHDR) lParam;</code>
/// </para>
/// </summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>lParam</em></para>
/// <para>Pointer to an <c>NMHDR</c> structure that contains additional information about this notification.</para>
/// <para><strong>Returns</strong></para>
/// <para>Return nonzero to prevent the default processing, or zero to allow the default processing.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/nm-rdblclk-tree-view
NM_RDBLCLK = NM_FIRST - 6,
/// <summary>
/// <para>
/// 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.
/// <list>
/// <item>
/// <term>lParam</term>
/// <description>A pointer to an NMHDR structure that contains additional information about this notification.</description>
/// </item>
/// </list>
/// of a <c>WM_NOTIFY</c> message.
/// </para>
/// <para>
/// <code>NM_SETFOCUS lpnmh = (LPNMHDR) lParam;</code>
/// </para>
/// </summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>lParam</em></para>
/// <para>A pointer to an <c>NMHDR</c> structure that contains additional information about this notification.</para>
/// <para><strong>Returns</strong></para>
/// <para>The return value is ignored by the control.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/nm-setfocus
NM_SETFOCUS = NM_FIRST - 7,
/// <summary>
/// <para>
/// 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.
/// <list>
/// <item>
/// <term>lParam</term>
/// <description>A pointer to an NMHDR structure that contains additional information about this notification.</description>
/// </item>
/// </list>
/// <c>WM_NOTIFY</c> message.
/// </para>
/// <para>
/// <code>NM_KILLFOCUS lpnmh = (LPNMHDR) lParam;</code>
/// </para>
/// </summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>lParam</em></para>
/// <para>A pointer to an <c>NMHDR</c> structure that contains additional information about this notification.</para>
/// <para><strong>Returns</strong></para>
/// <para>The return value is ignored by the control.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/nm-killfocus
NM_KILLFOCUS = NM_FIRST - 8,
/// <summary>
/// Notifies a control's parent window about custom drawing operations. This notification code is sent in the form of a WM_NOTIFY message.
/// <list>
/// <item>
/// <term>lParam</term>
/// <description>
/// <para>
/// Notifies a control's parent window about custom drawing operations. This notification code is sent in the form of a
/// <c>WM_NOTIFY</c> message.
/// </para>
/// <para>
/// <code>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</code>
/// </para>
/// </summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>lParam</em></para>
/// <para>
/// 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.
/// </para>
/// <list type="table">
/// <listheader>
/// <term>Control</term>
@ -219,210 +306,321 @@ namespace Vanara.PInvoke
/// </listheader>
/// <item>
/// <term>Rebar, trackbar, and header</term>
/// <term>NMCUSTOMDRAW</term>
/// <term><c>NMCUSTOMDRAW</c></term>
/// </item>
/// <item>
/// <term>List view</term>
/// <term>NMLVCUSTOMDRAW</term>
/// <term><c>NMLVCUSTOMDRAW</c></term>
/// </item>
/// <item>
/// <term>Tooltip</term>
/// <term>NMTTCUSTOMDRAW</term>
/// <term><c>NMTTCUSTOMDRAW</c></term>
/// </item>
/// <item>
/// <term>Tree view</term>
/// <term>NMTVCUSTOMDRAW</term>
/// <term><c>NMTVCUSTOMDRAW</c></term>
/// </item>
/// <item>
/// <term>Toolbar</term>
/// <term>NMTBCUSTOMDRAW</term>
/// </item>
/// </list>
/// </description>
/// <term><c>NMTBCUSTOMDRAW</c></term>
/// </item>
/// </list>
/// <para><strong>Returns</strong></para>
/// <para>
/// The value your application can return depends on the current drawing stage. The <c>dwDrawStage</c> member of the associated
/// <c>NMCUSTOMDRAW</c> structure holds a value that specifies the drawing stage. You must return one of the following values.
/// </para>
/// <list type="table">
/// <listheader>
/// <term>Return code</term>
/// <term>Description</term>
/// </listheader>
/// <item>
/// <term>Return value</term>
/// <description>
/// 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.
/// </description>
/// <term><c>CDRF_DODEFAULT</c></term>
/// <term>
/// 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.
/// </term>
/// </item>
/// </summary>
/// <item>
/// <term><c>CDRF_DOERASE</c></term>
/// <term>The control will only draw the background.</term>
/// </item>
/// <item>
/// <term><c>CDRF_NEWFONT</c></term>
/// <term>
/// 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 <c>dwDrawStage</c> equals CDDS_ITEMPREPAINT.
/// </term>
/// </item>
/// <item>
/// <term><c>CDRF_NOTIFYITEMDRAW</c></term>
/// <term>
/// 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 <c>dwDrawStage</c> equals CDDS_PREPAINT.
/// </term>
/// </item>
/// <item>
/// <term><c>CDRF_NOTIFYPOSTERASE</c></term>
/// <term>The control will notify the parent after erasing an item. This occurs when <c>dwDrawStage</c> equals CDDS_PREPAINT.</term>
/// </item>
/// <item>
/// <term><c>CDRF_NOTIFYPOSTPAINT</c></term>
/// <term>
/// The control will send an NM_CUSTOMDRAW notification code when the painting cycle for the entire control is complete. This
/// occurs when <c>dwDrawStage</c> equals CDDS_PREPAINT.
/// </term>
/// </item>
/// <item>
/// <term><c>CDRF_NOTIFYSUBITEMDRAW</c></term>
/// <term>
/// Your application will receive an NM_CUSTOMDRAW notification code with <c>dwDrawStage</c> 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 <c>CDRF_DODEFAULT</c> for default processing. This occurs when <c>dwDrawStage</c> equals CDDS_ITEMPREPAINT.
/// </term>
/// </item>
/// <item>
/// <term><c>CDRF_SKIPDEFAULT</c></term>
/// <term>
/// Your application drew the item manually. The control will not draw the item. This occurs when <c>dwDrawStage</c> equals CDDS_ITEMPREPAINT.
/// </term>
/// </item>
/// <item>
/// <term><c>CDRF_SKIPPOSTPAINT</c></term>
/// <term>The control will not draw the focus rectangle around an item.</term>
/// </item>
/// </list>
/// <remarks>
/// <para>
/// 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.
/// </para>
/// <para>
/// If this message is handled in a dialog procedure, you must set the return value as part of the window data before returning
/// <c>TRUE</c>. For more information, see <c>DialogProc</c>.
/// </para>
/// </remarks>
// https://docs.microsoft.com/en-us/windows/win32/controls/nm-customdraw
NM_CUSTOMDRAW = NM_FIRST - 12,
/// <summary>
/// Sent by a control when the mouse hovers over an item. This notification code is sent in the form of a WM_NOTIFY message.
/// <list>
/// <item>
/// <term>lParam</term>
/// <description>A pointer to an NMHDR structure that contains additional information about this notification.</description>
/// </item>
/// <item>
/// <term>Return value</term>
/// <description>
/// <para>
/// Sent by a control when the mouse hovers over an item. This notification code is sent in the form of a <c>WM_NOTIFY</c> message.
/// </para>
/// <para>
/// <code>NM_HOVER lpnmh = (LPNMHDR) lParam;</code>
/// </para>
/// </summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>lParam</em></para>
/// <para>A pointer to an <c>NMHDR</c> structure that contains additional information about this notification.</para>
/// <para><strong>Returns</strong></para>
/// <para>
/// Unless otherwise specified, return zero to allow the control to process the hover normally, or nonzero to prevent the hover
/// from being processed.
/// </description>
/// </item>
/// </list>
/// </summary>
/// </para>
// https://docs.microsoft.com/en-us/windows/win32/controls/nm-hover
NM_HOVER = NM_FIRST - 13,
/// <summary>
/// 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.
/// <list>
/// <item>
/// <term>lParam</term>
/// <description>
/// 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.
/// </description>
/// </item>
/// <item>
/// <term>Return value</term>
/// <description>
/// 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.
/// </description>
/// </item>
/// </list>
/// <para>
/// Sent by a rebar control when the control receives a <c>WM_NCHITTEST</c> message. This notification code is sent in the form
/// of a <c>WM_NOTIFY</c> message.
/// </para>
/// <para>
/// <code>NM_NCHITTEST lpnmmouse = (LPNMMOUSE) lParam;</code>
/// </para>
/// </summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>lParam</em></para>
/// <para>
/// A pointer to a <c>NMMOUSE</c> structure that contains information about the notification code. The pt member contains the
/// mouse coordinates of the hit test message.
/// </para>
/// <para><strong>Returns</strong></para>
/// <para>
/// 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 <c>WM_NCHITTEST</c> to override the default hit test processing.
/// </para>
// https://docs.microsoft.com/en-us/windows/win32/controls/nm-nchittest
NM_NCHITTEST = NM_FIRST - 14,
/// <summary>
/// <para>
/// 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.
/// <list>
/// <item>
/// <term>lParam</term>
/// <description>
/// A pointer to an NMKEY structure that contains additional information about the key that caused the notification code.
/// </description>
/// </item>
/// <item>
/// <term>Return value</term>
/// <description>Return nonzero to prevent the control from processing the key, or zero otherwise.</description>
/// </item>
/// </list>
/// form of a <c>WM_NOTIFY</c> message.
/// </para>
/// <para>
/// <code>NM_KEYDOWN lpnmk = (LPNMKEY) lParam;</code>
/// </para>
/// </summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>lParam</em></para>
/// <para>
/// A pointer to an <c>NMKEY</c> structure that contains additional information about the key that caused the notification code.
/// </para>
/// <para><strong>Returns</strong></para>
/// <para>Return nonzero to prevent the control from processing the key, or zero otherwise.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/nm-keydown
NM_KEYDOWN = NM_FIRST - 15,
/// <summary>
/// <para>
/// 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.
/// <list>
/// <item>
/// <term>lParam</term>
/// <description>A pointer to an NMHDR structure that contains additional information about this notification.</description>
/// </item>
/// </list>
/// a <c>WM_NOTIFY</c> message.
/// </para>
/// <para>
/// <code>NM_RELEASEDCAPTURE lpnmh = (LPNMHDR) lParam;</code>
/// </para>
/// </summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>lParam</em></para>
/// <para>A pointer to an <c>NMHDR</c> structure that contains additional information about this notification.</para>
/// <para><strong>Returns</strong></para>
/// <para>Unless otherwise specified, the control ignores the return value from this notification code.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/nm-releasedcapture
NM_RELEASEDCAPTURE = NM_FIRST - 16,
/// <summary>
/// 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.
/// <list>
/// <item>
/// <term>lParam</term>
/// <description>A pointer to an NMMOUSE structure that contains additional information about this notification.</description>
/// </item>
/// <item>
/// <term>Return value</term>
/// <description>
/// Return zero to enable the control to set the cursor or nonzero to prevent the control from setting the cursor.
/// </description>
/// </item>
/// </list>
/// <para>
/// Notifies a control's parent window that the control is setting the cursor in response to a <c>WM_SETCURSOR</c> message. This
/// notification code is sent in the form of a <c>WM_NOTIFY</c> message.
/// </para>
/// <para>
/// <code>NM_SETCURSOR lpnmm = (LPNMMOUSE) lParam;</code>
/// </para>
/// </summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>lParam</em></para>
/// <para>A pointer to an <c>NMMOUSE</c> structure that contains additional information about this notification.</para>
/// <para><strong>Returns</strong></para>
/// <para>Return zero to enable the control to set the cursor or nonzero to prevent the control from setting the cursor.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/nm-setcursor
NM_SETCURSOR = NM_FIRST - 17,
/// <summary>
/// <para>
/// 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.
/// <list>
/// <item>
/// <term>lParam</term>
/// <description>
/// A pointer to an NMCHAR structure that contains additional information about the character that caused the notification code.
/// </description>
/// </item>
/// </list>
/// form of a <c>WM_NOTIFY</c> message.
/// </para>
/// <para>
/// <code>NM_CHAR lpnmc = (LPNMCHAR) lParam;</code>
/// </para>
/// </summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>lParam</em></para>
/// <para>
/// A pointer to an <c>NMCHAR</c> structure that contains additional information about the character that caused the notification code.
/// </para>
/// <para><strong>Returns</strong></para>
/// <para>The return value is ignored by most controls. For more information, see the documentation for the individual controls.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/nm-char
NM_CHAR = NM_FIRST - 18,
/// <summary>
/// <para>
/// 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.
/// <list>
/// <item>
/// <term>lParam</term>
/// <description>A pointer to an NMTOOLTIPSCREATED structure that contains additional information about this notification.</description>
/// </item>
/// </list>
/// of a <c>WM_NOTIFY</c> message.
/// </para>
/// <para>
/// <code>NM_TOOLTIPSCREATED lpnmttc = (LPNMHDR) lParam;</code>
/// </para>
/// </summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>lParam</em></para>
/// <para>A pointer to an <c>NMTOOLTIPSCREATED</c> structure that contains additional information about this notification.</para>
/// <para><strong>Returns</strong></para>
/// <para>Unless otherwise specified, the control ignores the return value from this notification code.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/nm-tooltipscreated
NM_TOOLTIPSCREATED = NM_FIRST - 19,
/// <summary>
/// <para>
/// 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.
/// <list>
/// <item>
/// <term>lParam</term>
/// <description>A pointer to an NMHDR structure that contains additional information about this notification.</description>
/// </item>
/// </list>
/// a <c>WM_NOTIFY</c> message.
/// </para>
/// <para>
/// <code>NM_LDOWN lpnmhdr = (LPNMHDR) lParam;</code>
/// </para>
/// </summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>lParam</em></para>
/// <para>A pointer to an <c>NMHDR</c> structure that contains additional information about this notification.</para>
/// <para><strong>Returns</strong></para>
/// <para>The return value is ignored by the control.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/nm-ldown
NM_LDOWN = NM_FIRST - 20,
/// <summary>This notification code is not supported.</summary>
NM_RDOWN = NM_FIRST - 21,
/// <summary>
/// Notifies a control's parent window that the theme has changed. This notification code is sent in the form of a WM_NOTIFY message.
/// <list>
/// <item>
/// <term>lParam</term>
/// <description>A pointer to an NMHDR structure that contains additional information about this notification.</description>
/// </item>
/// </list>
/// <para>
/// Notifies a control's parent window that the theme has changed. This notification code is sent in the form of a
/// <c>WM_NOTIFY</c> message.
/// </para>
/// <para>
/// <code>NM_THEMECHANGED lpnmhdr = (LPNMHDR) lParam;</code>
/// </para>
/// </summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>lParam</em></para>
/// <para>A pointer to an <c>NMHDR</c> structure that contains additional information about this notification.</para>
/// <para><strong>Returns</strong></para>
/// <para>The return value is ignored by the control.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/nm-themechanged
NM_THEMECHANGED = NM_FIRST - 22,
/// <summary>
/// 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.
/// <list>
/// <item>
/// <term>lParam</term>
/// <description>A pointer to an NMHDR structure that contains additional information about this notification.</description>
/// </item>
/// </list>
/// <para>
/// Sent by a list-view control when the control has changed a font. This notification code is sent in the form of a
/// <c>WM_NOTIFY</c> message.
/// </para>
/// <para>
/// <code>NM_FONTCHANGED lpnmh = (LPNMHDR) lParam;</code>
/// </para>
/// </summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>lParam</em></para>
/// <para>A pointer to an <c>NMHDR</c> structure that contains additional information about this notification.</para>
/// <para><strong>Returns</strong></para>
/// <para>The return value is ignored by the control.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/nm-fontchanged
NM_FONTCHANGED = NM_FIRST - 23,
/// <summary>
/// Notifies a control's parent window about custom text operations. This notification code is sent in the form of a WM_NOTIFY message.
/// <list>
/// <item>
/// <term>lParam</term>
/// <description>A pointer to an NMCUSTOMTEXT structure that contains additional information about this notification.</description>
/// </item>
/// </list>
/// <para>
/// Notifies a control's parent window about custom text operations. This notification code is sent in the form of a
/// <c>WM_NOTIFY</c> message.
/// </para>
/// <para>
/// <code>NM_CUSTOMTEXT lpnmct = (NMCUSTOMTEXT) lParam;</code>
/// </para>
/// </summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>lParam</em></para>
/// <para>A pointer to an <c>NMCUSTOMTEXT</c> structure that contains additional information about this notification.</para>
/// <para><strong>Returns</strong></para>
/// <para>The return value is ignored by the control.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/nm-customtext
NM_CUSTOMTEXT = NM_FIRST - 24,
/// <summary>
/// <para>
/// 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.
/// <list>
/// <item>
/// <term>lParam</term>
/// <description>A pointer to an NMTVSTATEIMAGECHANGING structure that contains additional information about this notification.</description>
/// </item>
/// </list>
/// of a <c>WM_NOTIFY</c> message.
/// </para>
/// <para>
/// <code>NM_TVSTATEIMAGECHANGING lpnmtsic = (LPNMTVSTATEIMAGECHANGING) lParam;</code>
/// </para>
/// </summary>
/// <para><strong>Parameters</strong></para>
/// <para><em>lParam</em></para>
/// <para>A pointer to an <c>NMTVSTATEIMAGECHANGING</c> structure that contains additional information about this notification.</para>
/// <para><strong>Returns</strong></para>
/// <para>The return value is ignored by the control.</para>
// https://docs.microsoft.com/en-us/windows/win32/controls/nm-tvstateimagechanging
NM_TVSTATEIMAGECHANGING = NM_FIRST - 24,
}

View File

@ -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.
/// </summary>
public int code;
/// <summary>Creates a <see cref="NMHDR"/> structure from an LPARAM value.</summary>
/// <param name="lParam">The LPARAM value.</param>
/// <returns>A <see cref="NMHDR"/> structure.</returns>
public static NMHDR FromLParam(IntPtr lParam) => (NMHDR)Marshal.PtrToStructure(lParam, typeof(NMHDR));
#if ALLOWSPAN
/// <summary>Creates a reference to an <see cref="NMHDR"/> structure from an LPARAM value.</summary>
/// <param name="lParam">The LPARAM value.</param>
/// <returns>A <see cref="NMHDR"/> structure reference.</returns>
public static ref NMHDR LParamAsRef(IntPtr lParam) => ref lParam.AsRef<NMHDR>()
#endif
/// <summary>Updates the <see cref="NMHDR"/> value pointed to by an LPARAM value from this instance.</summary>
/// <param name="lParam">The LPARAM value to update.</param>
public void UpdateLParam(IntPtr lParam) => Marshal.StructureToPtr(this, lParam, false);
}
}
}