using System;
namespace Vanara.PInvoke
{
public static partial class User32
{
/// Windows Messages
public enum WindowMessage
{
///
///
/// Performs no operation. An application sends the WM_NULL message if it wants to post a message that the recipient
/// window will ignore.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_NULL 0x0000
///
///
/// Parameters
/// wParam
/// This parameter is not used.
/// lParam
/// This parameter is not used.
/// Returns
/// Type: LRESULT
/// An application returns zero if it processes this message.
///
///
/// For example, if an application has installed a WH_GETMESSAGE hook and wants to prevent a message from being processed,
/// the GetMsgProc callback function can change the message number to WM_NULL so the recipient will ignore it.
///
///
/// As another example, an application can check if a window is responding to messages by sending the WM_NULL message with
/// the SendMessageTimeout function.
///
///
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-null
WM_NULL = 0x0000,
///
///
/// Sent when an application requests that a window be created by calling the CreateWindowEx or CreateWindow
/// function. (The message is sent before the function returns.) The window procedure of the new window receives this message
/// after the window is created, but before the window becomes visible.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_CREATE 0x0001
///
///
/// Parameters
/// wParam
/// This parameter is not used.
/// lParam
/// A pointer to a CREATESTRUCT structure that contains information about the window being created.
/// Returns
/// Type: LRESULT
///
/// If an application processes this message, it should return zero to continue creation of the window. If the application
/// returns –1, the window is destroyed and the CreateWindowEx or CreateWindow function returns a NULL handle.
///
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-create
WM_CREATE = 0x0001,
///
///
/// Sent when a window is being destroyed. It is sent to the window procedure of the window being destroyed after the window is
/// removed from the screen.
///
///
/// This message is sent first to the window being destroyed and then to the child windows (if any) as they are destroyed. During
/// the processing of the message, it can be assumed that all child windows still exist.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_DESTROY 0x0002
///
///
/// Parameters
/// wParam
/// This parameter is not used.
/// lParam
/// This parameter is not used.
/// Returns
/// Type: LRESULT
/// If an application processes this message, it should return zero.
///
/// If the window being destroyed is part of the clipboard viewer chain (set by calling the SetClipboardViewer function),
/// the window must remove itself from the chain by processing the ChangeClipboardChain function before returning from the
/// WM_DESTROY message.
///
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-destroy
WM_DESTROY = 0x0002,
///
/// Sent after a window has been moved.
/// A window receives this message through its WindowProc function.
///
/// #define WM_MOVE 0x0003
///
///
/// Parameters
/// wParam
/// This parameter is not used.
/// lParam
///
/// The x and y coordinates of the upper-left corner of the client area of the window. The low-order word contains the
/// x-coordinate while the high-order word contains the y coordinate.
///
/// Returns
/// Type: LRESULT
/// If an application processes this message, it should return zero.
///
///
/// The parameters are given in screen coordinates for overlapped and pop-up windows and in parent-client coordinates for child windows.
///
/// The following example demonstrates how to obtain the position from the lParam parameter.
///
/// xPos = (int)(short) LOWORD(lParam); // horizontal position yPos = (int)(short) HIWORD(lParam); // vertical position
///
/// You can also use the MAKEPOINTS macro to convert the lParam parameter to a POINTS structure.
///
/// The DefWindowProc function sends the WM_SIZE and WM_MOVE messages when it processes the
/// WM_WINDOWPOSCHANGED message. The WM_SIZE and WM_MOVE messages are not sent if an application handles the
/// WM_WINDOWPOSCHANGED message without calling DefWindowProc.
///
///
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-move
WM_MOVE = 0x0003,
///
/// Sent to a window after its size has changed.
/// A window receives this message through its WindowProc function.
///
/// #define WM_SIZE 0x0005
///
///
/// Parameters
/// wParam
/// The type of resizing requested. This parameter can be one of the following values.
///
///
/// Value
/// Meaning
///
/// -
/// SIZE_MAXHIDE 4
/// Message is sent to all pop-up windows when some other window is maximized.
///
/// -
/// SIZE_MAXIMIZED 2
/// The window has been maximized.
///
/// -
/// SIZE_MAXSHOW 3
/// Message is sent to all pop-up windows when some other window has been restored to its former size.
///
/// -
/// SIZE_MINIMIZED 1
/// The window has been minimized.
///
/// -
/// SIZE_RESTORED 0
/// The window has been resized, but neither the SIZE_MINIMIZED nor SIZE_MAXIMIZED value applies.
///
///
/// lParam
/// The low-order word of lParam specifies the new width of the client area.
/// The high-order word of lParam specifies the new height of the client area.
/// Returns
/// Type: LRESULT
/// If an application processes this message, it should return zero.
///
///
/// If the SetScrollPos or MoveWindow function is called for a child window as a result of the WM_SIZE
/// message, the bRedraw or bRepaint parameter should be nonzero to cause the window to be repainted.
///
///
/// Although the width and height of a window are 32-bit values, the lParam parameter contains only the low-order 16 bits of each.
///
///
/// The DefWindowProc function sends the WM_SIZE and WM_MOVE messages when it processes the
/// WM_WINDOWPOSCHANGED message. The WM_SIZE and WM_MOVE messages are not sent if an application handles the
/// WM_WINDOWPOSCHANGED message without calling DefWindowProc.
///
///
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-size
WM_SIZE = 0x0005,
///
///
/// Sent to both the window being activated and the window being deactivated. If the windows use the same input queue, the
/// message is sent synchronously, first to the window procedure of the top-level window being deactivated, then to the window
/// procedure of the top-level window being activated. If the windows use different input queues, the message is sent
/// asynchronously, so the window is activated immediately.
///
///
/// #define WM_ACTIVATE 0x0006
///
///
/// Parameters
/// wParam
///
/// The low-order word specifies whether the window is being activated or deactivated. This parameter can be one of the following
/// values. The high-order word specifies the minimized state of the window being activated or deactivated. A nonzero value
/// indicates the window is minimized.
///
///
///
/// Value
/// Meaning
///
/// -
/// WA_ACTIVE 1
///
/// Activated by some method other than a mouse click (for example, by a call to the SetActiveWindow function or by use of
/// the keyboard interface to select the window).
///
///
/// -
/// WA_CLICKACTIVE 2
/// Activated by a mouse click.
///
/// -
/// WA_INACTIVE 0
/// Deactivated.
///
///
/// lParam
///
/// A handle to the window being activated or deactivated, depending on the value of the wParam parameter. If the low-order word
/// of wParam is WA_INACTIVE, lParam is the handle to the window being activated. If the low-order word of wParam is
/// WA_ACTIVE or WA_CLICKACTIVE, lParam is the handle to the window being deactivated. This handle can be NULL.
///
/// Returns
/// If an application processes this message, it should return zero.
///
/// If the window is being activated and is not minimized, the DefWindowProc function sets the keyboard focus to the
/// window. If the window is activated by a mouse click, it also receives a WM_MOUSEACTIVATE message.
///
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-activate
WM_ACTIVATE = 0x0006,
///
/// Sent to a window after it has gained the keyboard focus.
///
/// #define WM_SETFOCUS 0x0007
///
///
/// Parameters
/// wParam
/// A handle to the window that has lost the keyboard focus. This parameter can be NULL.
/// lParam
/// This parameter is not used.
/// Returns
/// An application should return zero if it processes this message.
///
/// To display a caret, an application should call the appropriate caret functions when it receives the WM_SETFOCUS message.
///
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-setfocus
WM_SETFOCUS = 0x0007,
///
/// Sent to a window immediately before it loses the keyboard focus.
///
/// #define WM_KILLFOCUS 0x0008
///
///
/// Parameters
/// wParam
/// A handle to the window that receives the keyboard focus. This parameter can be NULL.
/// lParam
/// This parameter is not used.
/// Returns
/// An application should return zero if it processes this message.
///
/// If an application is displaying a caret, the caret should be destroyed at this point.
///
/// While processing this message, do not make any function calls that display or activate a window. This causes the thread to
/// yield control and can cause the application to stop responding to messages. For more information, see Message Deadlocks.
///
///
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-killfocus
WM_KILLFOCUS = 0x0008,
///
///
/// Sent when an application changes the enabled state of a window. It is sent to the window whose enabled state is changing.
/// This message is sent before the EnableWindow function returns, but after the enabled state ( WS_DISABLED style
/// bit) of the window has changed.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_ENABLE 0x000A
///
///
/// Parameters
/// wParam
///
/// Indicates whether the window has been enabled or disabled. This parameter is TRUE if the window has been enabled or
/// FALSE if the window has been disabled.
///
/// lParam
/// This parameter is not used.
/// Returns
/// Type: LRESULT
/// If an application processes this message, it should return zero.
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-enable
WM_ENABLE = 0x000A,
///
///
/// You send the WM_SETREDRAW message to a window to allow changes in that window to be redrawn, or to prevent changes in
/// that window from being redrawn.
///
/// To send this message, call the SendMessage function with the following parameters.
///
/// SendMessage( (HWND) hWnd, WM_SETREDRAW, (WPARAM) wParam, (LPARAM) lParam );
///
/// wParam
///
/// The redraw state. If this parameter is TRUE, then the content can be redrawn after a change. If this parameter is
/// FALSE, then the content can't be redrawn after a change.
///
/// lParam
/// This parameter isn't used.
/// Returns
/// Your application should return 0 if it processes this message.
///
///
///
/// This message can be useful if your application must add several items to a list box. Your application can call this message
/// with wParam set to FALSE, add the items, and then call the message again with wParam set to TRUE. Finally, your
/// application can call RedrawWindow(hWnd, NULL, NULL, RDW_ERASE | RDW_FRAME | RDW_INVALIDATE |
/// RDW_ALLCHILDREN) to cause the list box to be repainted.
///
///
/// Note
///
/// You should use RedrawWindow with the specified flags, instead of InvalidateRect, because the former is
/// necessary for some controls that have nonclient area of their own, or have window styles that cause them to be given a
/// nonclient area (such as WS_THICKFRAME, WS_BORDER, or WS_EX_CLIENTEDGE). If the control does not have a
/// nonclient area, then RedrawWindow with these flags will do only as much invalidation as InvalidateRect would.
///
///
///
/// Passing a WM_SETREDRAW message to the DefWindowProc function removes the WS_VISIBLE style from the
/// window when wParam is set to FALSE. Although the window content remains visible on screen, the IsWindowVisible
/// function returns FALSE when called on a window in this state.
///
///
/// Passing a WM_SETREDRAW message to the DefWindowProc function adds the WS_VISIBLE style to the window, if
/// not set, when wParam is set to TRUE. If your application sends the WM_SETREDRAW message with wParam set to
/// TRUE to a hidden window, then the window becomes visible.
///
///
/// Windows 10 and later; Windows Server 2016 and later. The system sets a property named SysSetRedraw on a window whose
/// window procedure passes WM_SETREDRAW messages to DefWindowProc. You can use the GetProp function to get
/// the property value when it's available. GetProp returns a non-zero value when redraw is disabled. GetProp will
/// return zero when redraw is enabled, or when the window property doesn't exist.
///
///
// https://docs.microsoft.com/en-us/windows/win32/gdi/wm-setredraw
WM_SETREDRAW = 0x000B,
///
/// Sets the text of a window.
///
/// #define WM_SETTEXT 0x000C
///
///
/// Parameters
/// wParam
/// This parameter is not used.
/// lParam
/// A pointer to a null-terminated string that is the window text.
/// Returns
/// Type: LRESULT
///
/// The return value is TRUE if the text is set. It is FALSE (for an edit control), LB_ERRSPACE (for a list
/// box), or CB_ERRSPACE (for a combo box) if insufficient space is available to set the text in the edit control. It is
/// CB_ERR if this message is sent to a combo box without an edit control.
///
///
///
/// The DefWindowProc function sets and displays the window text. For an edit control, the text is the contents of the
/// edit control. For a combo box, the text is the contents of the edit-control portion of the combo box. For a button, the text
/// is the button name. For other windows, the text is the window title.
///
///
/// This message does not change the current selection in the list box of a combo box. An application should use the
/// CB_SELECTSTRING message to select the item in a list box that matches the text in the edit control.
///
///
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-settext
WM_SETTEXT = 0x000C,
///
/// Copies the text that corresponds to a window into a buffer provided by the caller.
///
/// #define WM_GETTEXT 0x000D
///
///
/// Parameters
/// wParam
/// The maximum number of characters to be copied, including the terminating null character.
///
/// ANSI applications may have the string in the buffer reduced in size (to a minimum of half that of the wParam value) due to
/// conversion from ANSI to Unicode.
///
/// lParam
/// A pointer to the buffer that is to receive the text.
/// Returns
/// Type: LRESULT
/// The return value is the number of characters copied, not including the terminating null character.
///
///
/// The DefWindowProc function copies the text associated with the window into the specified buffer and returns the number
/// of characters copied. Note, for non-text static controls this gives you the text with which the control was originally
/// created, that is, the ID number. However, it gives you the ID of the non-text static control as originally created. That is,
/// if you subsequently used a STM_SETIMAGE to change it the original ID would still be returned.
///
///
/// For an edit control, the text to be copied is the content of the edit control. For a combo box, the text is the content of
/// the edit control (or static-text) portion of the combo box. For a button, the text is the button name. For other windows, the
/// text is the window title. To copy the text of an item in a list box, an application can use the LB_GETTEXT message.
///
///
/// When the WM_GETTEXT message is sent to a static control with the SS_ICON style, a handle to the icon will be
/// returned in the first four bytes of the buffer pointed to by lParam. This is true only if the WM_SETTEXT message has
/// been used to set the icon.
///
///
/// Rich Edit: If the text to be copied exceeds 64K, use either the EM_STREAMOUT or EM_GETSELTEXT message.
///
///
/// Sending a WM_GETTEXT message to a non-text static control, such as a static bitmap or static icon control, does not
/// return a string value. Instead, it returns zero. In addition, in early versions of Windows, applications could send a
/// WM_GETTEXT message to a non-text static control to retrieve the control's ID. To retrieve a control's ID, applications
/// can use GetWindowLong passing GWL_ID as the index value or GetWindowLongPtr using GWLP_ID.
///
///
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-gettext
WM_GETTEXT = 0x000D,
///
/// Determines the length, in characters, of the text associated with a window.
///
/// #define WM_GETTEXTLENGTH 0x000E
///
///
/// Parameters
/// wParam
/// This parameter is not used and must be zero.
/// lParam
/// This parameter is not used and must be zero.
/// Returns
/// Type: LRESULT
/// The return value is the length of the text in characters, not including the terminating null character.
///
///
/// For an edit control, the text to be copied is the content of the edit control. For a combo box, the text is the content of
/// the edit control (or static-text) portion of the combo box. For a button, the text is the button name. For other windows, the
/// text is the window title. To determine the length of an item in a list box, an application can use the LB_GETTEXTLEN message.
///
///
/// When the WM_GETTEXTLENGTH message is sent, the DefWindowProc function returns the length, in characters, of the
/// text. Under certain conditions, the DefWindowProc function returns a value that is larger than the actual length of
/// the text. This occurs with certain mixtures of ANSI and Unicode, and is due to the system allowing for the possible existence
/// of double-byte character set (DBCS) characters within the text. The return value, however, will always be at least as large
/// as the actual length of the text; you can thus always use it to guide buffer allocation. This behavior can occur when an
/// application uses both ANSI functions and common dialogs, which use Unicode.
///
///
/// To obtain the exact length of the text, use the WM_GETTEXT, LB_GETTEXT, or CB_GETLBTEXT messages, or the
/// GetWindowText function.
///
///
/// Sending a WM_GETTEXTLENGTH message to a non-text static control, such as a static bitmap or static icon controlc, does
/// not return a string value. Instead, it returns zero.
///
///
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-gettextlength
WM_GETTEXTLENGTH = 0x000E,
///
///
/// The WM_PAINT message is sent when the system or another application makes a request to paint a portion of an
/// application's window. The message is sent when the UpdateWindow or RedrawWindow function is called, or by the
/// DispatchMessage function when the application obtains a WM_PAINT message by using the GetMessage or
/// PeekMessage function.
///
/// A window receives this message through its WindowProc function.
///
/// LRESULT CALLBACK WindowProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
///
///
/// Parameters
/// wParam
/// This parameter is not used.
/// lParam
/// This parameter is not used.
/// Returns
/// An application returns zero if it processes this message.
///
///
/// The WM_PAINT message is generated by the system and should not be sent by an application. To force a window to draw
/// into a specific device context, use the WM_PRINT or WM_PRINTCLIENT message. Note that this requires the target
/// window to support the WM_PRINTCLIENT message. Most common controls support the WM_PRINTCLIENT message.
///
///
/// The DefWindowProc function validates the update region. The function may also send the WM_NCPAINT message to
/// the window procedure if the window frame must be painted and send the WM_ERASEBKGND message if the window background
/// must be erased.
///
///
/// The system sends this message when there are no other messages in the application's message queue. DispatchMessage
/// determines where to send the message; GetMessage determines which message to dispatch. GetMessage returns the
/// WM_PAINT message when there are no other messages in the application's message queue, and DispatchMessage sends
/// the message to the appropriate window procedure.
///
///
/// A window may receive internal paint messages as a result of calling RedrawWindow with the RDW_INTERNALPAINT flag set.
/// In this case, the window may not have an update region. An application may call the GetUpdateRect function to
/// determine whether the window has an update region. If GetUpdateRect returns zero, the application need not call the
/// BeginPaint and EndPaint functions.
///
///
/// An application must check for any necessary internal painting by looking at its internal data structures for each
/// WM_PAINT message, because a WM_PAINT message may have been caused by both a non-NULL update region and a call
/// to RedrawWindow with the RDW_INTERNALPAINT flag set.
///
///
/// The system sends an internal WM_PAINT message only once. After an internal WM_PAINT message is returned from
/// GetMessage or PeekMessage or is sent to a window by UpdateWindow, the system does not post or send
/// further WM_PAINT messages until the window is invalidated or until RedrawWindow is called again with the
/// RDW_INTERNALPAINT flag set.
///
///
/// For some common controls, the default WM_PAINT message processing checks the wParam parameter. If wParam is non-NULL,
/// the control assumes that the value is an HDC and paints using that device context.
///
///
// https://docs.microsoft.com/en-us/windows/win32/gdi/wm-paint
WM_PAINT = 0x000F,
///
/// Sent as a signal that a window or an application should terminate.
/// A window receives this message through its WindowProc function.
///
/// #define WM_CLOSE 0x0010
///
///
/// Parameters
/// wParam
/// This parameter is not used.
/// lParam
/// This parameter is not used.
/// Returns
/// Type: LRESULT
/// If an application processes this message, it should return zero.
///
///
/// An application can prompt the user for confirmation, prior to destroying a window, by processing the WM_CLOSE message
/// and calling the DestroyWindow function only if the user confirms the choice.
///
/// By default, the DefWindowProc function calls the DestroyWindow function to destroy the window.
///
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-close
WM_CLOSE = 0x0010,
///
///
/// The WM_QUERYENDSESSION message is sent when the user chooses to end the session or when an application calls one of
/// the system shutdown functions. If any application returns zero, the session is not ended. The system stops sending
/// WM_QUERYENDSESSION messages as soon as one application returns zero.
///
///
/// After processing this message, the system sends the WM_ENDSESSION message with the wParam parameter set to the results
/// of the WM_QUERYENDSESSION message.
///
/// A window receives this message through its WindowProc function.
///
/// LRESULT CALLBACK WindowProc( HWND hwnd, // handle to window UINT uMsg, // message identifier WPARAM wParam, // not used LPARAM lParam // logoff option );
///
///
/// Parameters
/// hwnd
/// A handle to the window.
/// uMsg
/// The WM_QUERYENDSESSION identifier.
/// wParam
/// This parameter is reserved for future use.
/// lParam
///
/// This parameter can be one or more of the following values. If this parameter is 0, the system is shutting down or restarting
/// (it is not possible to determine which event is occurring).
///
///
///
/// Value
/// Meaning
///
/// -
/// ENDSESSION_CLOSEAPP 0x00000001
///
/// The application is using a file that must be replaced, the system is being serviced, or system resources are exhausted. For
/// more information, see Guidelines for Applications.
///
///
/// -
/// ENDSESSION_CRITICAL 0x40000000
/// The application is forced to shut down.
///
/// -
/// ENDSESSION_LOGOFF 0x80000000
/// The user is logging off. For more information, see Logging Off.
///
///
/// Note that this parameter is a bit mask. To test for this value, use a bit-wise operation; do not test for equality.
/// Returns
///
/// Applications should respect the user's intentions and return TRUE. By default, the DefWindowProc function
/// returns TRUE for this message.
///
///
/// If shutting down would corrupt the system or media that is being burned, the application can return FALSE. However, it
/// is good practice to respect the user's actions.
///
///
///
/// When an application returns TRUE for this message, it receives the WM_ENDSESSION message, regardless of how the
/// other applications respond to the WM_QUERYENDSESSION message. Each application should return TRUE or
/// FALSE immediately upon receiving this message, and defer any cleanup operations until it receives the
/// WM_ENDSESSION message.
///
///
/// Applications can display a user interface prompting the user for information at shutdown, however it is not recommended.
/// After five seconds, the system displays information about the applications that are preventing shutdown and allows the user
/// to terminate them. For example, Windows XP displays a dialog box, while Windows Vista displays a full screen with additional
/// information about the applications blocking shutdown. If your application must block or postpone system shutdown, use the
/// ShutdownBlockReasonCreate function. For more information, see Shutdown Changes for Windows Vista.
///
/// Console applications can use the SetConsoleCtrlHandler function to receive shutdown notification.
///
/// Service applications can use the RegisterServiceCtrlHandlerEx function to receive shutdown notifications in a handler routine.
///
///
// https://docs.microsoft.com/en-us/windows/win32/shutdown/wm-queryendsession
WM_QUERYENDSESSION = 0x0011,
///
/// Sent to an icon when the user requests that the window be restored to its previous size and position.
/// A window receives this message through its WindowProc function.
///
/// #define WM_QUERYOPEN 0x0013
///
///
/// Parameters
/// wParam
/// This parameter is not used.
/// lParam
/// This parameter is not used.
/// Returns
/// Type: LRESULT
///
/// If the icon can be opened, an application that processes this message should return TRUE; otherwise, it should return
/// FALSE to prevent the icon from being opened.
///
///
/// By default, the DefWindowProc function returns TRUE.
///
/// While processing this message, the application should not perform any action that would cause an activation or focus change
/// (for example, creating a dialog box).
///
///
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-queryopen
WM_QUERYOPEN = 0x0013,
///
///
/// The WM_ENDSESSION message is sent to an application after the system processes the results of the
/// WM_QUERYENDSESSION message. The WM_ENDSESSION message informs the application whether the session is ending.
///
/// A window receives this message through its WindowProc function.
///
/// LRESULT CALLBACK WindowProc( HWND hwnd, // handle to window UINT uMsg, // message identifier WPARAM wParam, // end-session option LPARAM lParam // logoff option );
///
///
/// Parameters
/// hwnd
/// A handle to the window.
/// uMsg
/// The WM_ENDSESSION identifier.
/// wParam
///
/// If the session is being ended, this parameter is TRUE; the session can end any time after all applications have
/// returned from processing this message. Otherwise, it is FALSE.
///
/// lParam
///
/// This parameter can be one or more of the following values. If this parameter is 0, the system is shutting down or restarting
/// (it is not possible to determine which event is occurring).
///
///
///
/// Value
/// Meaning
///
/// -
/// ENDSESSION_CLOSEAPP 0x1
///
/// If wParam is TRUE, the application must shut down. Any data should be saved automatically without prompting the
/// user (for more information, see Remarks). The Restart Manager sends this message when the application is using a file that
/// needs to be replaced, when it must service the system, or when system resources are exhausted. The application will be
/// restarted if it has registered for restart using the RegisterApplicationRestart function. For more information, see
/// Guidelines for Applications. If wParam is FALSE, the application should not shut down.
///
///
/// -
/// ENDSESSION_CRITICAL 0x40000000
/// The application is forced to shut down.
///
/// -
/// ENDSESSION_LOGOFF 0x80000000
/// The user is logging off. For more information, see Logging Off.
///
///
/// Note that this parameter is a bit mask. To test for this value, use a bit-wise operation; do not test for equality.
/// Returns
/// If an application processes this message, it should return zero.
///
///
/// Applications that have unsaved data could save the data to a temporary location and restore it the next time the application
/// starts. It is recommended that applications save their data and state frequently; for example, automatically save data
/// between save operations initiated by the user to reduce the amount of data to be saved at shutdown.
///
/// The application need not call the DestroyWindow or PostQuitMessage function when the session is ending.
///
// https://docs.microsoft.com/en-us/windows/win32/shutdown/wm-endsession
WM_ENDSESSION = 0x0016,
///
///
/// Indicates a request to terminate an application, and is generated when the application calls the PostQuitMessage
/// function. This message causes the GetMessage function to return zero.
///
///
/// #define WM_QUIT 0x0012
///
///
/// Parameters
/// wParam
/// The exit code given in the PostQuitMessage function.
/// lParam
/// This parameter is not used.
/// Returns
/// Type: LRESULT
///
/// This message does not have a return value because it causes the message loop to terminate before the message is sent to the
/// application's window procedure.
///
///
///
/// The WM_QUIT message is not associated with a window and therefore will never be received through a window's window
/// procedure. It is retrieved only by the GetMessage or PeekMessage functions.
///
/// Do not post the WM_QUIT message using the PostMessage function; use PostQuitMessage.
///
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-quit
WM_QUIT = 0x0012,
///
///
/// Sent when the window background must be erased (for example, when a window is resized). The message is sent to prepare an
/// invalidated portion of a window for painting.
///
///
/// #define WM_ERASEBKGND 0x0014
///
///
/// Parameters
/// wParam
/// A handle to the device context.
/// lParam
/// This parameter is not used.
/// Returns
/// Type: LRESULT
/// An application should return nonzero if it erases the background; otherwise, it should return zero.
///
///
/// The DefWindowProc function erases the background by using the class background brush specified by the
/// hbrBackground member of the WNDCLASS structure. If hbrBackground is NULL, the application should
/// process the WM_ERASEBKGND message and erase the background.
///
///
/// An application should return nonzero in response to WM_ERASEBKGND if it processes the message and erases the
/// background; this indicates that no further erasing is required. If the application returns zero, the window will remain
/// marked for erasing. (Typically, this indicates that the fErase member of the PAINTSTRUCT structure will be TRUE.)
///
///
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-erasebkgnd
WM_ERASEBKGND = 0x0014,
///
/// The WM_SYSCOLORCHANGE message is sent to all top-level windows when a change is made to a system color setting.
/// A window receives this message through its WindowProc function.
///
/// LRESULT CALLBACK WindowProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
///
///
/// Parameters
/// wParam
/// This parameter is not used.
/// lParam
/// This parameter is not used.
///
/// The system sends a WM_PAINT message to any window that is affected by a system color change.
///
/// Applications that have brushes using the existing system colors should delete those brushes and re-create them using the new
/// system colors.
///
///
/// Top level windows that use common controls must forward the WM_SYSCOLORCHANGE message to the controls; otherwise, the
/// controls will not be notified of the color change. This ensures that the colors used by your common controls are consistent
/// with those used by other user interface objects. For example, a toolbar control uses the "3D Objects" color to draw its
/// buttons. If the user changes the 3D Objects color but the WM_SYSCOLORCHANGE message is not forwarded to the toolbar,
/// the toolbar buttons will remain in their original color while the color of other buttons in the system changes.
///
///
// https://docs.microsoft.com/en-us/windows/win32/gdi/wm-syscolorchange
WM_SYSCOLORCHANGE = 0x0015,
///
/// Sent to a window when the window is about to be hidden or shown.
/// A window receives this message through its WindowProc function.
///
/// #define WM_SHOWWINDOW 0x0018
///
///
/// Parameters
/// wParam
///
/// Indicates whether a window is being shown. If wParam is TRUE, the window is being shown. If wParam is FALSE,
/// the window is being hidden.
///
/// lParam
///
/// The status of the window being shown. If lParam is zero, the message was sent because of a call to the ShowWindow
/// function; otherwise, lParam is one of the following values.
///
///
///
/// Value
/// Meaning
///
/// -
/// SW_OTHERUNZOOM 4
/// The window is being uncovered because a maximize window was restored or minimized.
///
/// -
/// SW_OTHERZOOM 2
/// The window is being covered by another window that has been maximized.
///
/// -
/// SW_PARENTCLOSING 1
/// The window's owner window is being minimized.
///
/// -
/// SW_PARENTOPENING 3
/// The window's owner window is being restored.
///
///
/// Returns
/// Type: LRESULT
/// If an application processes this message, it should return zero.
///
///
/// The DefWindowProc function hides or shows the window, as specified by the message. If a window has the
/// WS_VISIBLE style when it is created, the window receives this message after it is created, but before it is displayed.
/// A window also receives this message when its visibility state is changed by the ShowWindow or ShowOwnedPopups function.
///
/// The WM_SHOWWINDOW message is not sent under the following circumstances:
///
/// -
/// When a top-level, overlapped window is created with the WS_MAXIMIZE or WS_MINIMIZE style.
///
/// -
/// When the SW_SHOWNORMAL flag is specified in the call to the ShowWindow function.
///
///
///
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-showwindow
WM_SHOWWINDOW = 0x0018,
///
///
/// An application sends the WM_WININICHANGE message to all top-level windows after making a change to the WIN.INI file.
/// The SystemParametersInfo function sends this message after an application uses the function to change a setting in WIN.INI.
///
///
/// Note
///
/// The WM_WININICHANGE message is provided only for compatibility with earlier versions of the system. Applications
/// should use the WM_SETTINGCHANGE message.
///
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_WININICHANGE 0x001A
///
///
/// Parameters
/// wParam
/// This parameter is not used.
/// lParam
///
/// A pointer to a string containing the name of the system parameter that was changed. For example, this string can be the name
/// of a registry key or the name of a section in the Win.ini file. This parameter is not particularly useful in determining
/// which system parameter changed. For example, when the string is a registry name, it typically indicates only the leaf node in
/// the registry, not the whole path. In addition, some applications send this message with lParam set to NULL. In
/// general, when you receive this message, you should check and reload any system parameter settings that are used by your application.
///
/// Returns
/// Type: LRESULT
/// If you process this message, return zero.
///
///
/// To send the WM_WININICHANGE message to all top-level windows, use the SendMessage function with the hWnd
/// parameter set to HWND_BROADCAST.
///
///
/// Calls to functions that change WIN.INI may be mapped to the registry instead. This mapping occurs when WIN.INI and the
/// section being changed are specified in the registry under the following key:
///
/// HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\IniFileMapping
/// The change in the storage location has no effect on the behavior of this message.
///
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-wininichange
WM_WININICHANGE = 0x001A,
///
///
/// A message that is sent to all top-level windows when the SystemParametersInfo function changes a system-wide setting
/// or when policy settings have changed.
///
///
/// Applications should send WM_SETTINGCHANGE to all top-level windows when they make changes to system parameters. (This
/// message cannot be sent directly to a window.) To send the WM_SETTINGCHANGE message to all top-level windows, use the
/// SendMessageTimeout function with the hwnd parameter set to HWND_BROADCAST.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_WININICHANGE 0x001A #define WM_SETTINGCHANGE WM_WININICHANGE
///
///
/// Parameters
/// wParam
///
/// When the system sends this message as a result of a SystemParametersInfo call, the wParam parameter is the value of
/// the uiAction parameter passed to the SystemParametersInfo function. For a list of values, see SystemParametersInfo.
///
///
/// When the system sends this message as a result of a change in policy settings, this parameter indicates the type of policy
/// that was applied. This value is 1 if computer policy was applied or zero if user policy was applied.
///
/// When the system sends this message as a result of a change in locale settings, this parameter is zero.
/// When an application sends this message, this parameter must be NULL.
/// lParam
///
/// When the system sends this message as a result of a SystemParametersInfo call, lParam is a pointer to a string that
/// indicates the area containing the system parameter that was changed. This parameter does not usually indicate which specific
/// system parameter changed. (Note that some applications send this message with lParam set to NULL.) In general, when
/// you receive this message, you should check and reload any system parameter settings that are used by your application.
///
///
/// This string can be the name of a registry key or the name of a section in the Win.ini file. When the string is a registry
/// name, it typically indicates only the leaf node in the registry, not the full path.
///
///
/// When the system sends this message as a result of a change in policy settings, this parameter points to the string "Policy".
///
///
/// When the system sends this message as a result of a change in locale settings, this parameter points to the string "intl".
///
///
/// To effect a change in the environment variables for the system or the user, broadcast this message with lParam set to the
/// string "Environment".
///
/// Returns
/// Type: LRESULT
/// If you process this message, return zero.
///
/// The lParam parameter indicates which system metric has changed, for example, "ConvertibleSlateMode" if the
/// CONVERTIBLESLATEMODE indicator was toggled or "SystemDockMode" if the DOCKED indicator was toggled.
///
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-settingchange
WM_SETTINGCHANGE = WM_WININICHANGE,
///
/// The WM_DEVMODECHANGE message is sent to all top-level windows whenever the user changes device-mode settings.
/// A window receives this message through its WindowProc function.
///
/// LRESULT CALLBACK WindowProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
///
///
/// Parameters
/// hwnd
/// A handle to a window.
/// uMsg
/// WM_DEVMODECHANGE
/// wParam
/// This parameter is not used.
/// lParam
/// A pointer to a string that specifies the device name.
/// Returns
/// An application should return zero if it processes this message.
///
/// This message cannot be sent directly to a window. To send the WM_DEVMODECHANGE message to all top-level windows, use
/// the SendMessageTimeout function with the hWnd parameter set to HWND_BROADCAST.
///
// https://docs.microsoft.com/en-us/windows/win32/gdi/wm-devmodechange
WM_DEVMODECHANGE = 0x001B,
///
///
/// Sent when a window belonging to a different application than the active window is about to be activated. The message is sent
/// to the application whose window is being activated and to the application whose window is being deactivated.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_ACTIVATEAPP 0x001C
///
///
/// Parameters
/// wParam
///
/// Indicates whether the window is being activated or deactivated. This parameter is TRUE if the window is being
/// activated; it is FALSE if the window is being deactivated.
///
/// lParam
///
/// The thread identifier. If the wParam parameter is TRUE, lParam is the identifier of the thread that owns the window
/// being deactivated. If wParam is FALSE, lParam is the identifier of the thread that owns the window being activated.
///
/// Returns
/// Type: LRESULT
/// If an application processes this message, it should return zero.
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-activateapp
WM_ACTIVATEAPP = 0x001C,
///
///
/// An application sends the WM_FONTCHANGE message to all top-level windows in the system after changing the pool of font resources.
///
/// To send this message, call the SendMessage function with the following parameters.
///
/// SendMessage( (HWND) hWnd, WM_FONTCHANGE, (WPARAM) wParam, (LPARAM) lParam );
///
///
/// Parameters
/// wParam
/// This parameter is not used.
/// lParam
/// This parameter is not used.
///
///
/// An application that adds or removes fonts from the system (for example, by using the AddFontResource or
/// RemoveFontResource function) should send this message to all top-level windows.
///
///
/// To send the WM_FONTCHANGE message to all top-level windows, an application can call the SendMessage function
/// with the hwnd parameter set to HWND_BROADCAST.
///
///
// https://docs.microsoft.com/en-us/windows/win32/gdi/wm-fontchange
WM_FONTCHANGE = 0x001D,
///
/// A message that is sent whenever there is a change in the system time.
/// A window receives this message through its WindowProc function.
///
/// LRESULT CALLBACK WindowProc( HWND hwnd, // handle to window UINT uMsg, // message identifier WPARAM wParam, // not used; must be zero LPARAM lParam // not used; must be zero );
///
///
/// Parameters
/// hwnd
/// A handle to window.
/// uMsg
/// WM_TIMECHANGE identifier.
/// wParam
/// Not used; must be zero.
/// lParam
/// Not used; must be zero.
/// Returns
/// An application should return zero if it processes this message.
///
/// An application should not broadcast this message, because the system will broadcast this message when the application changes
/// the system time.
///
// https://docs.microsoft.com/en-us/windows/win32/sysinfo/wm-timechange
WM_TIMECHANGE = 0x001E,
///
///
/// Sent to cancel certain modes, such as mouse capture. For example, the system sends this message to the active window when a
/// dialog box or message box is displayed. Certain functions also send this message explicitly to the specified window
/// regardless of whether it is the active window. For example, the EnableWindow function sends this message when
/// disabling the specified window.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_CANCELMODE 0x001F
///
///
/// Parameters
/// wParam
/// This parameter is not used.
/// lParam
/// This parameter is not used.
/// Returns
/// Type: LRESULT
/// If an application processes this message, it should return zero.
///
/// When the WM_CANCELMODE message is sent, the DefWindowProc function cancels internal processing of standard
/// scroll bar input, cancels internal menu processing, and releases the mouse capture.
///
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-cancelmode
WM_CANCELMODE = 0x001F,
///
/// Sent to a window if the mouse causes the cursor to move within a window and mouse input is not captured.
///
/// #define WM_SETCURSOR 0x0020
///
///
/// Parameters
/// wParam
/// A handle to the window that contains the cursor.
/// lParam
///
/// The low-order word of lParam specifies the hit-test result for the cursor position. See the return values for WM_NCHITTEST
/// for possible values.
///
///
/// The high-order word of lParam specifies the mouse window message which triggered this event, such as WM_MOUSEMOVE. When the
/// window enters menu mode, this value is zero.
///
/// Returns
///
/// If an application processes this message, it should return TRUE to halt further processing or FALSE to continue.
///
///
/// The DefWindowProc function passes the WM_SETCURSOR message to a parent window before processing. If the parent
/// window returns TRUE, further processing is halted. Passing the message to a window's parent window gives the parent
/// window control over the cursor's setting in a child window. The DefWindowProc function also uses this message to set
/// the cursor to an arrow if it is not in the client area, or to the registered class cursor if it is in the client area. If the
/// low-order word of the lParam parameter is HTERROR and the high-order word of lParam specifies that one of the mouse
/// buttons is pressed, DefWindowProc calls the MessageBeep function.
///
// https://docs.microsoft.com/en-us/windows/win32/menurc/wm-setcursor
WM_SETCURSOR = 0x0020,
///
///
/// Sent when the cursor is in an inactive window and the user presses a mouse button. The parent window receives this message
/// only if the child window passes it to the DefWindowProc function.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_MOUSEACTIVATE 0x0021
///
///
/// Parameters
/// wParam
/// A handle to the top-level parent window of the window being activated.
/// lParam
///
/// The low-order word specifies the hit-test value returned by the DefWindowProc function as a result of processing the
/// WM_NCHITTEST message. For a list of hit-test values, see WM_NCHITTEST.
///
///
/// The high-order word specifies the identifier of the mouse message generated when the user pressed a mouse button. The mouse
/// message is either discarded or posted to the window, depending on the return value.
///
/// Returns
///
/// The return value specifies whether the window should be activated and whether the identifier of the mouse message should be
/// discarded. It must be one of the following values.
///
///
///
/// Return code/value
/// Description
///
/// -
/// MA_ACTIVATE 1
/// Activates the window, and does not discard the mouse message.
///
/// -
/// MA_ACTIVATEANDEAT 2
/// Activates the window, and discards the mouse message.
///
/// -
/// MA_NOACTIVATE 3
/// Does not activate the window, and does not discard the mouse message.
///
/// -
/// MA_NOACTIVATEANDEAT 4
/// Does not activate the window, but discards the mouse message.
///
///
///
/// The DefWindowProc function passes the message to a child window's parent window before any processing occurs. The
/// parent window determines whether to activate the child window. If it activates the child window, the parent window should
/// return MA_NOACTIVATE or MA_NOACTIVATEANDEAT to prevent the system from processing the message further.
///
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-mouseactivate
WM_MOUSEACTIVATE = 0x0021,
///
/// Sent to a child window when the user clicks the window's title bar or when the window is activated, moved, or sized.
/// A window receives this message through its WindowProc function.
///
/// #define WM_CHILDACTIVATE 0x0022
///
///
/// Parameters
/// wParam
/// This parameter is not used.
/// lParam
/// This parameter is not used.
/// Returns
/// Type: LRESULT
/// If an application processes this message, it should return zero.
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-childactivate
WM_CHILDACTIVATE = 0x0022,
///
///
/// Sent by a computer-based training (CBT) application to separate user-input messages from other messages sent through the
/// WH_JOURNALPLAYBACK procedure.
///
///
/// #define WM_QUEUESYNC 0x0023
///
///
/// Parameters
/// wParam
/// This parameter is not used.
/// lParam
/// This parameter is not used.
/// Returns
/// Type: void
/// A CBT application should return zero if it processes this message.
///
///
/// Whenever a CBT application uses the WH_JOURNALPLAYBACK procedure, the first and last messages are WM_QUEUESYNC.
/// This allows the CBT application to intercept and examine user-initiated messages without doing so for events that it sends.
///
/// If an application specifies a NULL window handle, the message is posted to the message queue of the active window.
///
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-queuesync
WM_QUEUESYNC = 0x0023,
///
///
/// Sent to a window when the size or position of the window is about to change. An application can use this message to override
/// the window's default maximized size and position, or its default minimum or maximum tracking size.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_GETMINMAXINFO 0x0024
///
///
/// Parameters
/// wParam
/// This parameter is not used.
/// lParam
///
/// A pointer to a MINMAXINFO structure that contains the default maximized position and dimensions, and the default
/// minimum and maximum tracking sizes. An application can override the defaults by setting the members of this structure.
///
/// Returns
/// Type: LRESULT
/// If an application processes this message, it should return zero.
///
/// The maximum tracking size is the largest window size that can be produced by using the borders to size the window. The
/// minimum tracking size is the smallest window size that can be produced by using the borders to size the window.
///
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-getminmaxinfo
WM_GETMINMAXINFO = 0x0024,
///
///
/// The WM_PAINTICON message is sent to a minimized window when the icon is to be painted but only if the application is written
/// for Windows 3.x. A window receives this message only if a class icon is defined for the window; otherwise, WM_PAINT is sent instead.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_PAINTICON 0x0026
///
///
/// Parameters
/// wParam
/// This parameter is not used.
/// lParam
/// This parameter is not used.
/// Returns
/// Type: LRESULT
/// If an application processes this message, it should return zero.
///
/// The DefWindowProc function draws the class icon. For compatibility with Windows 3.x, wParam is TRUE. However, this value has
/// no significance.
///
WM_PAINTICON = 0x0026,
///
///
/// The WM_ICONERASEBKGND message is sent to a minimized window when the background of the icon must be filled before painting
/// the icon. A window receives this message only if a class icon is defined for the window; otherwise, WM_ERASEBKGND is sent.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_ICONERASEBKGND 0x0027
///
///
/// Parameters
/// wParam
/// Type: HDC. Identifies the device context of the icon.
/// lParam
/// This parameter is not used.
/// Returns
/// Type: LRESULT
/// If an application processes this message, it should return zero.
/// The DefWindowProc function fills the icon background with the class background brush of the parent window.
WM_ICONERASEBKGND = 0x0027,
///
/// Sent to a dialog box procedure to set the keyboard focus to a different control in the dialog box.
///
/// #define WM_NEXTDLGCTL 0x0028
///
///
/// Parameters
/// wParam
///
/// If lParam is TRUE, this parameter identifies the control that receives the focus. If lParam is FALSE, this
/// parameter indicates whether the next or previous control with the WS_TABSTOP style receives the focus. If wParam is
/// zero, the next control receives the focus; otherwise, the previous control with the WS_TABSTOP style receives the focus.
///
/// lParam
///
/// The low-order word indicates how the system uses wParam. If the low-order word is TRUE, wParam is a handle associated
/// with the control that receives the focus; otherwise, wParam is a flag that indicates whether the next or previous control
/// with the WS_TABSTOP style receives the focus.
///
/// Returns
/// An application should return zero if it processes this message.
///
///
/// This message performs additional dialog box management operations beyond those performed by the SetFocus function
/// WM_NEXTDLGCTL updates the default pushbutton border, sets the default control identifier, and automatically selects
/// the text of an edit control (if the target window is an edit control).
///
///
/// Do not use the SendMessage function to send a WM_NEXTDLGCTL message if your application will concurrently
/// process other messages that set the focus. Use the PostMessage function instead.
///
///
// https://docs.microsoft.com/en-us/windows/win32/dlgbox/wm-nextdlgctl
WM_NEXTDLGCTL = 0x0028,
///
///
/// The WM_SPOOLERSTATUS message is sent from Print Manager whenever a job is added to or removed from the Print Manager queue.
///
/// A window receives this message through its WindowProc function.
///
/// LRESULT CALLBACK WindowProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
///
///
/// Parameters
/// wParam
/// The PR_JOBSTATUS flag.
/// lParam
/// The low-order word specifies the number of jobs remaining in the Print Manager queue.
/// Returns
/// An application should return zero if it processes this message.
///
///
/// This message is for informational purposes only. This message is advisory and does not have guaranteed delivery semantics.
/// Applications should not assume that they will receive a WM_SPOOLERSTATUS message for every change in spooler status.
///
///
/// The WM_SPOOLERSTATUS message is not supported after Windows XP. To be notified of changes to the print queue status, you can
/// use FindFirstPrinterChangeNotification and FindNextPrinterChangeNotification.
///
///
// https://docs.microsoft.com/en-us/windows/win32/printdocs/wm-spoolerstatus
WM_SPOOLERSTATUS = 0x002A,
///
///
/// Sent to the parent window of an owner-drawn button, combo box, list box, or menu when a visual aspect of the button, combo
/// box, list box, or menu has changed.
///
/// A window receives this message through its WindowProc function.
///
/// WM_DRAWITEM WPARAM wParam; LPARAM lParam;
///
///
/// Parameters
/// wParam
///
/// Specifies the identifier of the control that sent the WM_DRAWITEM message. If the message was sent by a menu, this
/// parameter is zero.
///
/// lParam
///
/// Pointer to a DRAWITEMSTRUCT structure containing information about the item to be drawn and the type of drawing required.
///
/// Returns
/// If an application processes this message, it should return TRUE.
///
/// By default, the DefWindowProc function draws the focus rectangle for an owner-drawn list box item.
///
/// The itemAction member of the DRAWITEMSTRUCT structure specifies the drawing operation that an application should perform.
///
///
/// Before returning from processing this message, an application should ensure that the device context identified by the hDC
/// member of the DRAWITEMSTRUCT structure is in the default state.
///
///
// https://docs.microsoft.com/en-us/windows/win32/controls/wm-drawitem
WM_DRAWITEM = 0x002B,
///
/// Sent to the owner window of a combo box, list box, list-view control, or menu item when the control or menu is created.
/// A window receives this message through its WindowProc function.
///
/// WM_MEASUREITEM WPARAM wParam; LPARAM lParam;
///
///
/// Parameters
/// wParam
///
/// Contains the value of the CtlID member of the MEASUREITEMSTRUCT structure pointed to by the lParam parameter.
/// This value identifies the control that sent the WM_MEASUREITEM message. If the message was sent by a menu, this
/// parameter is zero. If the value is nonzero or the value is zero and the value of the CtlType member of the
/// MEASUREITEMSTRUCT pointed to by lParam is not ODT_MENU, the message was sent by a combo box or by a list box.
/// If the value is nonzero, and the value of the itemID member of the MEASUREITEMSTRUCT pointed to by lParam is
/// (UINT) 1, the message was sent by a combo edit field.
///
/// lParam
/// Pointer to a MEASUREITEMSTRUCT structure that contains the dimensions of the owner-drawn control or menu item.
/// Returns
/// If an application processes this message, it should return TRUE.
///
///
/// When the owner window receives the WM_MEASUREITEM message, the owner fills in the MEASUREITEMSTRUCT structure
/// pointed to by the lParam parameter of the message and returns; this informs the system of the dimensions of the control. If a
/// list box or combo box is created with the LBS_OWNERDRAWVARIABLE or CBS_OWNERDRAWVARIABLE style, this message is
/// sent to the owner for each item in the control; otherwise, this message is sent once.
///
///
/// The system sends the WM_MEASUREITEM message to the owner window of combo boxes and list boxes created with the
/// OWNERDRAWFIXED style before sending the WM_INITDIALOG message. As a result, when the owner receives this message, the
/// system has not yet determined the height and width of the font used in the control; function calls and calculations requiring
/// these values should occur in the main function of the application or library.
///
///
// https://docs.microsoft.com/en-us/windows/win32/controls/wm-measureitem
WM_MEASUREITEM = 0x002C,
///
///
/// Sent to the owner of a list box or combo box when the list box or combo box is destroyed or when items are removed by the
/// LB_DELETESTRING, LB_RESETCONTENT, CB_DELETESTRING, or CB_RESETCONTENT message. The system sends a
/// WM_DELETEITEM message for each deleted item. The system sends the WM_DELETEITEM message for any deleted list
/// box or combo box item with nonzero item data.
///
///
/// WM_DELETEITEM WPARAM wParam; LPARAM lParam;
///
///
/// Parameters
/// wParam
/// Specifies the identifier of the control that sent the WM_DELETEITEM message.
/// lParam
/// Pointer to a DELETEITEMSTRUCT structure that contains information about the item deleted from a list box.
/// Returns
/// An application should return TRUE if it processes this message.
///
///
/// Microsoft Windows NT and later: Windows sends a WM_DELETEITEM message only for items deleted from an owner-drawn list
/// box (with the LBS_OWNERDRAWFIXED or LBS_OWNERDRAWVARIABLE style) or owner-drawn combo box (with the
/// CBS_OWNERDRAWFIXED or CBS_OWNERDRAWVARIABLE style).
///
///
/// Windows 95: Windows sends the WM_DELETEITEM message for any deleted list box or combo box item with nonzero item data.
///
///
// https://docs.microsoft.com/en-us/windows/win32/controls/wm-deleteitem
WM_DELETEITEM = 0x002D,
///
/// Sent by a list box with the LBS_WANTKEYBOARDINPUT style to its owner in response to a WM_KEYDOWN message.
///
/// WM_VKEYTOITEM WPARAM wParam; LPARAM lParam;
///
///
/// Parameters
/// wParam
///
/// The LOWORD specifies the virtual-key code of the key the user pressed. The HIWORD specifies the current
/// position of the caret.
///
/// lParam
/// Handle to the list box.
/// Returns
///
/// The return value specifies the action that the application performed in response to the message. A return value of -2
/// indicates that the application handled all aspects of selecting the item and requires no further action by the list box. (See
/// Remarks.) A return value of -1 indicates that the list box should perform the default action in response to the keystroke. A
/// return value of 0 or greater specifies the index of an item in the list box and indicates that the list box should perform
/// the default action for the keystroke on the specified item.
///
///
///
/// A return value of -2 is valid only for keys that are not translated into characters by the list box control. If the
/// WM_KEYDOWN message translates to a WM_CHAR message and the application processes the WM_VKEYTOITEM
/// message generated as a result of the key press, the list box ignores the return value and does the default processing for
/// that character). WM_KEYDOWN messages generated by keys such as VK_UP, VK_DOWN, VK_NEXT, and VK_PREVIOUS are not
/// translated to WM_CHAR messages. In such cases, trapping the WM_VKEYTOITEM message and returning -2 prevents the
/// list box from doing the default processing for that key.
///
///
/// To trap keys that generate a char message and do special processing, the application must subclass the list box, trap both
/// the WM_KEYDOWN and WM_CHAR messages, and process the messages appropriately in the subclass procedure.
///
///
/// The preceding remarks apply to regular list boxes that are created with the LBS_WANTKEYBOARDINPUT style. If the list
/// box is owner-drawn, the application must process the WM_CHARTOITEM message.
///
/// The DefWindowProc function returns -1.
///
/// If a dialog box procedure handles this message, it should cast the desired return value to a BOOL and return the value
/// directly. The DWL_MSGRESULT value set by the SetWindowLong function is ignored.
///
///
// https://docs.microsoft.com/en-us/windows/win32/controls/wm-vkeytoitem
WM_VKEYTOITEM = 0x002E,
///
/// Sent by a list box with the LBS_WANTKEYBOARDINPUT style to its owner in response to a WM_CHAR message.
///
/// WM_CHARTOITEM WPARAM wParam; LPARAM lParam;
///
///
/// Parameters
/// wParam
///
/// The LOWORD specifies the character code of the key the user pressed. The HIWORD specifies the current position
/// of the caret.
///
/// lParam
/// Handle to the list box.
/// Returns
///
/// The return value specifies the action that the application performed in response to the message. A return value of -1 or -2
/// indicates that the application handled all aspects of selecting the item and requires no further action by the list box. A
/// return value of 0 or greater specifies the zero-based index of an item in the list box and indicates that the list box should
/// perform the default action for the keystroke on the specified item.
///
///
/// The DefWindowProc function returns -1.
/// Only owner-drawn list boxes that do not have the LBS_HASSTRINGS style can receive this message.
///
/// If a dialog box procedure handles this message, it should cast the desired return value to a BOOL and return the value
/// directly. The DWL_MSGRESULT value set by the SetWindowLong function is ignored.
///
///
// https://docs.microsoft.com/en-us/windows/win32/controls/wm-chartoitem
WM_CHARTOITEM = 0x002F,
///
/// Sets the font that a control is to use when drawing text.
///
/// #define WM_SETFONT 0x0030
///
///
/// Parameters
/// wParam
///
/// A handle to the font ( HFONT). If this parameter is NULL, the control uses the default system font to draw text.
///
/// lParam
///
/// The low-order word of lParam specifies whether the control should be redrawn immediately upon setting the font. If this
/// parameter is TRUE, the control redraws itself.
///
/// Returns
/// Type: LRESULT
/// This message does not return a value.
///
/// The WM_SETFONT message applies to all controls, not just those in dialog boxes.
///
/// The best time for the owner of a dialog box control to set the font of the control is when it receives the
/// WM_INITDIALOG message. The application should call the DeleteObject function to delete the font when it is no
/// longer needed; for example, after it destroys the control.
///
///
/// The size of the control does not change as a result of receiving this message. To avoid clipping text that does not fit
/// within the boundaries of the control, the application should correct the size of the control window before it sets the font.
///
///
/// When a dialog box uses the DS_SETFONT style to set the text in its controls, the system sends the WM_SETFONT message
/// to the dialog box procedure before it creates the controls. An application can create a dialog box that contains the
/// DS_SETFONT style by calling any of the following functions:
///
///
/// -
/// CreateDialogIndirect
///
/// -
/// CreateDialogIndirectParam
///
/// -
/// DialogBoxIndirect
///
/// -
/// DialogBoxIndirectParam
///
///
///
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-setfont
WM_SETFONT = 0x0030,
///
/// Retrieves the font with which the control is currently drawing its text.
///
/// #define WM_GETFONT 0x0031
///
///
/// Parameters
/// wParam
/// This parameter is not used and must be zero.
/// lParam
/// This parameter is not used and must be zero.
/// Returns
/// Type: HFONT
/// The return value is a handle to the font used by the control, or NULL if the control is using the system font.
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-getfont
WM_GETFONT = 0x0031,
///
///
/// Sent to a window to associate a hot key with the window. When the user presses the hot key, the system activates the window.
///
///
/// #define WM_SETHOTKEY 0x0032
///
///
/// Parameters
/// wParam
/// The low-order word specifies the virtual-key code to associate with the window.
/// The high-order word can be one or more of the following values from CommCtrl.h.
/// Setting wParam to NULL removes the hot key associated with a window.
///
///
/// Value
/// Meaning
///
/// -
/// HOTKEYF_ALT 0x04
/// ALT key
///
/// -
/// HOTKEYF_CONTROL 0x02
/// CTRL key
///
/// -
/// HOTKEYF_EXT 0x08
/// Extended key
///
/// -
/// HOTKEYF_SHIFT 0x01
/// SHIFT key
///
///
/// lParam
/// This parameter is not used.
/// Returns
/// The return value is one of the following.
///
///
/// Return value
/// Description
///
/// -
/// -1
/// The function is unsuccessful; the hot key is invalid.
///
/// -
/// 0
/// The function is unsuccessful; the window is invalid.
///
/// -
/// 1
/// The function is successful, and no other window has the same hot key.
///
/// -
/// 2
/// The function is successful, but another window already has the same hot key.
///
///
///
/// A hot key cannot be associated with a child window.
/// VK_ESCAPE, VK_SPACE, and VK_TAB are invalid hot keys.
///
/// When the user presses the hot key, the system generates a WM_SYSCOMMAND message with wParam equal to SC_HOTKEY
/// and lParam equal to the window's handle. If this message is passed on to DefWindowProc, the system will bring the
/// window's last active popup (if it exists) or the window itself (if there is no popup window) to the foreground.
///
///
/// A window can only have one hot key. If the window already has a hot key associated with it, the new hot key replaces the old
/// one. If more than one window has the same hot key, the window that is activated by the hot key is random.
///
/// These hot keys are unrelated to the hot keys set by RegisterHotKey.
///
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-sethotkey
WM_SETHOTKEY = 0x0032,
///
/// Sent to determine the hot key associated with a window.
///
/// #define WM_GETHOTKEY 0x0033
///
///
/// Parameters
/// wParam
/// Not used; must be zero.
/// lParam
/// Not used; must be zero.
/// Returns
///
/// The return value is the virtual-key code and modifiers for the hot key, or NULL if no hot key is associated with the
/// window. The virtual-key code is in the low byte of the return value and the modifiers are in the high byte. The modifiers can
/// be a combination of the following flags from CommCtrl.h.
///
///
///
/// Return code/value
/// Description
///
/// -
/// HOTKEYF_ALT 0x04
/// ALT key
///
/// -
/// HOTKEYF_CONTROL 0x02
/// CTRL key
///
/// -
/// HOTKEYF_EXT 0x08
/// Extended key
///
/// -
/// HOTKEYF_SHIFT 0x01
/// SHIFT key
///
///
/// These hot keys are unrelated to the hot keys set by the RegisterHotKey function.
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-gethotkey
WM_GETHOTKEY = 0x0033,
///
///
/// Sent to a minimized (iconic) window. The window is about to be dragged by the user but does not have an icon defined for its
/// class. An application can return a handle to an icon or cursor. The system displays this cursor or icon while the user drags
/// the icon.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_QUERYDRAGICON 0x0037
///
///
/// Parameters
/// wParam
/// This parameter is not used.
/// lParam
/// This parameter is not used.
/// Returns
/// Type: LRESULT
///
/// An application should return a handle to a cursor or icon that the system is to display while the user drags the icon. The
/// cursor or icon must be compatible with the display driver's resolution. If the application returns NULL, the system
/// displays the default cursor.
///
///
///
/// When the user drags the icon of a window without a class icon, the system replaces the icon with a default cursor. If the
/// application requires a different cursor to be displayed during dragging, it must return a handle to the cursor or icon
/// compatible with the display driver's resolution. If an application returns a handle to a color cursor or icon, the system
/// converts the cursor or icon to black and white. The application can call the LoadCursor or LoadIcon function to
/// load a cursor or icon from the resources in its executable (.exe) file and to retrieve this handle.
///
///
/// If a dialog box procedure handles this message, it should cast the desired return value to a BOOL and return the value
/// directly. The DWL_MSGRESULT value set by the SetWindowLong function is ignored.
///
///
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-querydragicon
WM_QUERYDRAGICON = 0x0037,
///
///
/// Sent to determine the relative position of a new item in the sorted list of an owner-drawn combo box or list box. Whenever
/// the application adds a new item, the system sends this message to the owner of a combo box or list box created with the
/// CBS_SORT or LBS_SORT style.
///
///
/// WM_COMPAREITEM WPARAM wParam; LPARAM lParam;
///
///
/// Parameters
/// wParam
/// Specifies the identifier of the control that sent the WM_COMPAREITEM message.
/// lParam
///
/// Pointer to a COMPAREITEMSTRUCT structure that contains the identifiers and application-supplied data for two items in
/// the combo or list box.
///
/// Returns
///
/// The return value indicates the relative position of the two items. It may be any of the values shown in the following table.
///
///
///
/// Return code
/// Description
///
/// -
/// Value
/// Meaning
///
/// -
/// -1
/// Item 1 precedes item 2 in the sorted order.
///
/// -
/// 0
/// Items 1 and 2 are equivalent in the sorted order.
///
/// -
/// 1
/// Item 1 follows item 2 in the sorted order.
///
///
///
///
/// When the owner of an owner-drawn combo box or list box receives this message, the owner returns a value indicating which of
/// the items specified by the COMPAREITEMSTRUCT structure will appear before the other. Typically, the system sends this
/// message several times until it determines the exact position for the new item.
///
///
/// If a dialog box procedure handles this message, it should cast the desired return value to a BOOL and return the value
/// directly. The DWL_MSGRESULT value set by the SetWindowLong function is ignored.
///
///
// https://docs.microsoft.com/en-us/windows/win32/controls/wm-compareitem
WM_COMPAREITEM = 0x0039,
///
///
/// Sent by both Microsoft Active Accessibility and Microsoft UI Automation to obtain information about an accessible object
/// contained in a server application.
///
///
/// Applications never send this message directly. Microsoft Active Accessibility sends this message in response to calls to
/// AccessibleObjectFromPoint, AccessibleObjectFromEvent, or AccessibleObjectFromWindow. However, server
/// applications handle this message. UI Automation sends this message in response to calls to
/// IUIAutomation::ElementFromHandle, ElementFromPoint, and GetFocusedElement, and when handling events for
/// which a client has registered.
///
///
/// dwFlags = (WPARAM)(DWORD) wParam; dwObjId = (LPARAM)(DWORD) lParam;
///
///
/// Parameters
/// dwFlags
///
/// Provides additional information about the message and is used only by the system. Servers pass dwFlags as the wParam
/// parameter in the call to LresultFromObject when handling the message.
///
/// dwObjId
///
/// Object identifier. This value is one of the object identifier constants or a custom object identifier. A server application
/// must check this value to identify the type of information being requested. Before comparing this value against the OBJID_
/// values, the server must cast it to DWORD; otherwise, on 64-bit Windows, the sign extension of the lParam can interfere
/// with the comparison.
///
///
/// -
///
/// If dwObjId is one of the OBJID_ values such as OBJID_CLIENT, the request is for a Microsoft Active Accessibility
/// object that implements IAccessible.
///
///
/// -
///
/// If dwObjId is equal to UiaRootObjectId, the request is for a UI Automation provider. If the server is implementing UI
/// Automation, it should return a provider using the UiaReturnRawElementProvider function.
///
///
/// -
///
/// If dwObjId is OBJID_NATIVEOM, the request is for the control's underlying object model. If the control supports this
/// request, it should return an appropriate COM interface by calling the LresultFromObject function.
///
///
/// -
///
/// If dwObjId is OBJID_QUERYCLASSNAMEIDX, the request is for the control to identify itself as a standard Windows control
/// or a common control implemented by the common control library (ComCtrl.dll).
///
///
///
/// Returns
///
/// If the window or control does not need to respond to this message, it should pass the message to the DefWindowProc
/// function; otherwise, the window or control should return a value that corresponds to the request specified by dwObjId:
///
///
/// -
///
/// If the window or control implements UI Automation, the window or control should return the value obtained by a call to the
/// UiaReturnRawElementProvider function.
///
///
/// -
///
/// If dwObjId is OBJID_NATIVEOM and the window exposes a native Object Model, the windows should return the value
/// obtained by a call to the LresultFromObject function.
///
///
/// -
///
/// If dwObjId is OBJID_CLIENT and the window implements IAccessible, the window should return the value obtained
/// by a call to the LresultFromObject function.
///
///
///
///
///
/// When a client calls AccessibleObjectFromWindow or any of the other AccessibleObjectFrom X functions that
/// retrieve an interface to an object, Microsoft Active Accessibility sends the WM_GETOBJECT message to the appropriate
/// window procedure within the appropriate server application. While processing WM_GETOBJECT, server applications call
/// LresultFromObject and use the return value of this function as the return value for the message. Microsoft Active
/// Accessibility, in conjunction with the COM library, performs the appropriate marshaling and passes the interface pointer from
/// the server back to the client.
///
///
/// Servers do not respond to WM_GETOBJECT before the object is fully initialized or after it begins to close down. When
/// an application creates a new window, the system sends EVENT_OBJECT_CREATE to notify clients before it sends the
/// WM_CREATE message to the application's window procedure. Because many applications use WM_CREATE to start their
/// initialization process, servers do not respond to the WM_GETOBJECT message until finished processing the
/// WM_CREATE message.
///
/// A server uses WM_GETOBJECT to perform the following tasks:
///
/// -
/// Create New Accessible Objects
///
/// -
/// Reuse Existing Pointers to Objects
///
/// -
/// Create New Interfaces to the Same Object
///
///
///
/// For clients, this means that they might receive distinct interface pointers for the same user interface element, depending on
/// the server's action. To determine if two interface pointers point to the same user interface element, clients compare
/// IAccessible properties of the object. Comparing pointers does not work.
///
///
// https://docs.microsoft.com/en-us/windows/win32/winauto/wm-getobject
WM_GETOBJECT = 0x003D,
///
///
/// Sent to all top-level windows when the system detects more than 12.5 percent of system time over a 30- to 60-second interval
/// is being spent compacting memory. This indicates that system memory is low.
///
/// A window receives this message through its WindowProc function.
///
/// Note
/// This message is provided only for compatibility with 16-bit Windows-based applications.
///
///
/// #define WM_COMPACTING 0x0041
///
///
/// Parameters
/// wParam
///
/// The ratio of central processing unit (CPU) time currently spent by the system compacting memory to CPU time currently spent
/// by the system performing other operations. For example, 0x8000 represents 50 percent of CPU time spent compacting memory.
///
/// lParam
/// This parameter is not used.
/// Returns
/// Type: LRESULT
/// If an application processes this message, it should return zero.
///
/// When an application receives this message, it should free as much memory as possible, taking into account the current level
/// of activity of the application and the total number of applications running on the system.
///
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-compacting
WM_COMPACTING = 0x0041,
///
[Obsolete]
WM_COMMNOTIFY = 0x0044,
///
/// Sent to a window whose size, position, or place in the Z order is about to change as a result of a call to the SetWindowPos
/// function or another window-management function.
/// A window receives this message through its WindowProc function.
/// Parameters
/// wParam
/// This parameter is not used.
/// lParam
/// A pointer to a structure that contains information about the window's new size and position.
/// Return value
/// If an application processes this message, it should return zero.
///
///
/// For a window with the WS_OVERLAPPED or WS_THICKFRAME style, the DefWindowProc function sends the WM_GETMINMAXINFO message to
/// the window. This is done to validate the new size and position of the window and to enforce the CS_BYTEALIGNCLIENT and
/// CS_BYTEALIGNWINDOW client styles. By not passing the WM_WINDOWPOSCHANGING message to the DefWindowProc function, an
/// application can override these defaults.
///
/// While this message is being processed, modifying any of the values in WINDOWPOS affects the window's new size, position, or
/// place in the Z order. An application can prevent changes to the window by setting or clearing the appropriate bits in the
/// flags member of WINDOWPOS.
///
///
WM_WINDOWPOSCHANGING = 0x0046,
///
/// Sent to a window whose size, position, or place in the Z order has changed as a result of a call to the SetWindowPos function
/// or another window-management function.
/// A window receives this message through its WindowProc function.
/// Parameters
/// wParam
/// This parameter is not used.
/// lParam
/// A pointer to a structure that contains information about the window's new size and position.
/// Return value
/// If an application processes this message, it should return zero.
///
///
/// By default, the DefWindowProc function sends the WM_SIZE and WM_MOVE messages to the window. The WM_SIZE and WM_MOVE messages
/// are not sent if an application handles the WM_WINDOWPOSCHANGED message without calling DefWindowProc. It is more efficient to
/// perform any move or size change processing during the WM_WINDOWPOSCHANGED message without calling DefWindowProc.
///
WM_WINDOWPOSCHANGED = 0x0047,
///
///
/// Notifies applications that the system, typically a battery-powered personal computer, is about to enter a suspended mode.
///
///
/// Note
///
/// The WM_POWER message is obsolete. It is provided only for compatibility with 16-bit Windows-based applications.
/// Applications should use the WM_POWERBROADCAST message.
///
///
/// A window receives this message through its WindowProc function.
///
/// LRESULT CALLBACK WindowProc HWND hwnd, // handle to window UINT uMsg, // WM_POWER WPARAM wParam, // power-event notification LPARAM lParam // not used );
///
///
/// Parameters
/// hwnd
/// A handle to window.
/// uMsg
/// The WM_POWER message identifier.
/// wParam
/// The power-event notification. This parameter can be one of the following values.
///
///
/// Value
/// Meaning
///
/// -
/// PWR_CRITICALRESUME
///
/// Indicates that the system is resuming operation after entering suspended mode without first broadcasting a
/// PWR_SUSPENDREQUEST notification message to the application. An application should perform any necessary recovery actions.
///
///
/// -
/// PWR_SUSPENDREQUEST
/// Indicates that the system is about to enter suspended mode.
///
/// -
/// PWR_SUSPENDRESUME
///
/// Indicates that the system is resuming operation after having entered suspended mode normally that is, the system broadcast a
/// PWR_SUSPENDREQUEST notification message to the application before the system was suspended. An application should
/// perform any necessary recovery actions.
///
///
///
/// lParam
/// This parameter is not used.
/// Returns
///
/// The value an application returns depends on the value of the wParam parameter. If wParam is PWR_SUSPENDREQUEST, the
/// return value is PWR_FAIL to prevent the system from entering the suspended state; otherwise, it is PWR_OK. If
/// wParam is PWR_SUSPENDRESUME or PWR_CRITICALRESUME, the return value is zero.
///
///
///
/// This message is broadcast only to an application that is running on a system that conforms to the Advanced Power Management
/// (APM) basic input/output system (BIOS) specification. The message is broadcast by the power-management driver to each window
/// returned by the EnumWindows function.
///
///
/// The suspended mode is the state in which the greatest amount of power savings occurs, but all operational data and parameters
/// are preserved. Random-access memory (RAM) contents are preserved, but many devices are likely to be turned off.
///
///
// https://docs.microsoft.com/en-us/windows/win32/power/wm-power
[Obsolete]
WM_POWER = 0x0048,
///
/// An application sends the WM_COPYDATA message to pass data to another application.
///
/// #define WM_COPYDATA 0x004A
///
///
/// Parameters
/// wParam
/// A handle to the window passing the data.
/// lParam
/// A pointer to a COPYDATASTRUCT structure that contains the data to be passed.
/// Returns
/// If the receiving application processes this message, it should return TRUE; otherwise, it should return FALSE.
///
///
/// The data being passed must not contain pointers or other references to objects not accessible to the application receiving
/// the data.
///
/// While this message is being sent, the referenced data must not be changed by another thread of the sending process.
///
/// The receiving application should consider the data read-only. The lParam parameter is valid only during the processing of the
/// message. The receiving application should not free the memory referenced by lParam. If the receiving application must access
/// the data after SendMessage returns, it must copy the data into a local buffer.
///
///
// https://docs.microsoft.com/en-us/windows/win32/dataxchg/wm-copydata
WM_COPYDATA = 0x004A,
///
///
/// Posted to an application when a user cancels the application's journaling activities. The message is posted with a
/// NULL window handle.
///
///
/// #define WM_CANCELJOURNAL 0x004B
///
///
/// Parameters
/// wParam
/// This parameter is not used.
/// lParam
/// This parameter is not used.
/// Returns
/// Type: void
///
/// This message does not return a value. It is meant to be processed from within an application's main loop or a
/// GetMessage hook procedure, not from a window procedure.
///
///
///
/// Journal record and playback modes are modes imposed on the system that let an application sequentially record or play back
/// user input. The system enters these modes when an application installs a JournalRecordProc or JournalPlaybackProc hook
/// procedure. When the system is in either of these journaling modes, applications must take turns reading input from the input
/// queue. If any one application stops reading input while the system is in a journaling mode, other applications are forced to wait.
///
///
/// To ensure a robust system, one that cannot be made unresponsive by any one application, the system automatically cancels any
/// journaling activities when a user presses CTRL+ESC or CTRL+ALT+DEL. The system then unhooks any journaling hook procedures,
/// and posts a WM_CANCELJOURNAL message, with a NULL window handle, to the application that set the journaling hook.
///
///
/// The WM_CANCELJOURNAL message has a NULL window handle, therefore it cannot be dispatched to a window procedure.
/// There are two ways for an application to see a WM_CANCELJOURNAL message: If the application is running in its own main
/// loop, it must catch the message between its call to GetMessage or PeekMessage and its call to
/// DispatchMessage. If the application is not running in its own main loop, it must set a GetMsgProc hook procedure
/// (through a call to SetWindowsHookEx specifying the WH_GETMESSAGE hook type) that watches for the message.
///
///
/// When an application sees a WM_CANCELJOURNAL message, it can assume two things: the user has intentionally canceled the
/// journal record or playback mode, and the system has already unhooked any journal record or playback hook procedures.
///
///
/// Note that the key combinations mentioned above (CTRL+ESC or CTRL+ALT+DEL) cause the system to cancel journaling. If any one
/// application is made unresponsive, they give the user a means of recovery. The VK_CANCEL virtual key code (usually
/// implemented as the CTRL+BREAK key combination) is what an application that is in journal record mode should watch for as a
/// signal that the user wishes to cancel the journaling activity. The difference is that watching for VK_CANCEL is a
/// suggested behavior for journaling applications, whereas CTRL+ESC or CTRL+ALT+DEL cause the system to cancel journaling
/// regardless of a journaling application's behavior.
///
///
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-canceljournal
WM_CANCELJOURNAL = 0x004B,
/// Sent by a common control to its parent window when an event has occurred or the control requires some information.
/// Parameters
/// wParam
///
/// The identifier of the common control sending the message. This identifier is not guaranteed to be unique. An application
/// should use the hwndFrom or idFrom member of the NMHDR structure (passed as the lParam parameter) to
/// identify the control.
///
/// lParam
///
/// A pointer to an NMHDR structure that contains the notification code and additional information. For some notification
/// messages, this parameter points to a larger structure that has the NMHDR structure as its first member.
///
/// Returns
/// The return value is ignored except for notification messages that specify otherwise.
///
///
/// The destination of the message must be the HWND of the parent of the control. This value can be obtained by using
/// GetParent, as shown in the following example, where m_controlHwnd is the HWND of the control itself.
///
///
/// NMHDR nmh; nmh.code = CUSTOM_SELCHANGE; // Message type defined by control. nmh.idFrom = GetDlgCtrlID(m_controlHwnd); nmh.hwndFrom = m_controlHwnd; SendMessage(GetParent(m_controlHwnd), WM_NOTIFY, nmh.idFrom, (LPARAM)&nmh);
///
///
/// Applications handle the message in the window procedure of the parent window, as shown in the following example, which
/// handles the notification message sent by the custom control in the previous example.
///
///
/// INT_PTR CALLBACK DlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { case WM_NOTIFY: switch (((LPNMHDR)lParam)->code) { case CUSTOM_SELCHANGE: if (((LPNMHDR)lParam)->idFrom == IDC_CUSTOMLISTBOX1) { ... // Respond to message. return TRUE; } break; ... // More cases on WM_NOTIFY switch. break; } ... // More cases on message switch. } return FALSE; }
///
///
/// Some notifications, chiefly those that have been in the API for a long time, are sent as WM_COMMAND messages. For more
/// information, see Control Messages.
///
///
/// If the message handler is in a dialog box procedure, you must use the SetWindowLong function with DWL_MSGRESULT to set
/// a return value.
///
/// For Windows Vista and later systems, the WM_NOTIFY message cannot be sent between processes.
///
/// Many notifications are available in both ANSI and Unicode formats. The window sending the WM_NOTIFY message uses the
/// WM_NOTIFYFORMAT message to determine which format should be used. See WM_NOTIFYFORMAT for further discussion.
///
///
// https://docs.microsoft.com/en-us/windows/win32/controls/wm-notify
WM_NOTIFY = 0x004E,
///
///
/// Posted to the window with the focus when the user chooses a new input language, either with the hotkey (specified in the
/// Keyboard control panel application) or from the indicator on the system taskbar. An application can accept the change by
/// passing the message to the DefWindowProc function or reject the change (and prevent it from taking place) by returning immediately.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_INPUTLANGCHANGEREQUEST 0x0050
///
///
/// Parameters
/// wParam
/// The new input locale. This parameter can be a combination of the following flags.
///
///
/// Value
/// Meaning
///
/// -
/// INPUTLANGCHANGE_BACKWARD 0x0004
///
/// A hot key was used to choose the previous input locale in the installed list of input locales. This flag cannot be used with
/// the INPUTLANGCHANGE_FORWARD flag.
///
///
/// -
/// INPUTLANGCHANGE_FORWARD 0x0002
///
/// A hot key was used to choose the next input locale in the installed list of input locales. This flag cannot be used with the
/// INPUTLANGCHANGE_BACKWARD flag.
///
///
/// -
/// INPUTLANGCHANGE_SYSCHARSET 0x0001
/// The new input locale's keyboard layout can be used with the system character set.
///
///
/// lParam
/// The input locale identifier. For more information, see Languages, Locales, and Keyboard Layouts.
/// Returns
/// Type: LRESULT
///
/// This message is posted, not sent, to the application, so the return value is ignored. To accept the change, the application
/// should pass the message to DefWindowProc. To reject the change, the application should return zero without calling DefWindowProc.
///
///
///
/// When the DefWindowProc function receives the WM_INPUTLANGCHANGEREQUEST message, it activates the new input
/// locale and notifies the application of the change by sending the WM_INPUTLANGCHANGE message.
///
///
/// The language indicator is present on the taskbar only if you have installed more than one keyboard layout and if you have
/// enabled the indicator using the Keyboard control panel application.
///
///
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-inputlangchangerequest
WM_INPUTLANGCHANGEREQUEST = 0x0050,
///
///
/// Sent to the topmost affected window after an application's input language has been changed. You should make any
/// application-specific settings and pass the message to the DefWindowProc function, which passes the message to all
/// first-level child windows. These child windows can pass the message to DefWindowProc to have it pass the message to
/// their child windows, and so on.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_INPUTLANGCHANGE 0x0051
///
///
/// Parameters
/// wParam
/// Type: **WPARAM**
/// The code page of the new locale.
/// lParam
/// Type: **LPARAM**
/// The HKL input locale identifier. For more information, see Languages, Locales, and Keyboard Layouts.
/// Returns
/// Type: LRESULT
/// An application should return nonzero if it processes this message.
///
/// You can retrieve keyboard locale name via LCIDToLocaleName function. With locale name you can use modern locale functions:
///
/// case WM_INPUTLANGCHANGE: { HKL hkl = (HKL)lParam; WCHAR localeName[LOCALE_NAME_MAX_LENGTH]; LCIDToLocaleName(MAKELCID(LOWORD(hkl), SORT_DEFAULT), localeName, LOCALE_NAME_MAX_LENGTH, 0); WCHAR lang[9]; GetLocaleInfoEx(localeName, LOCALE_SISO639LANGNAME2, lang, 9); }
///
///
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-inputlangchange
WM_INPUTLANGCHANGE = 0x0051,
///
/// Sent to an application that has initiated a training card with Windows Help. The message informs the application when the
/// user clicks an authorable button. An application initiates a training card by specifying the HELP_TCARD command in a call to
/// the WinHelp function.
///
/// Parameters
/// idAction
/// A value that indicates the action the user has taken. This can be one of the following values.
/// IDABORT
/// The user clicked an authorable Abort button.
/// IDCANCEL
/// The user clicked an authorable Cancel button.
/// IDCLOSE
/// The user closed the training card.
/// IDHELP
/// The user clicked an authorable Windows Help button.
/// IDIGNORE
/// The user clicked an authorable Ignore button.
/// IDOK
/// The user clicked an authorable OK button.
/// IDNO
/// The user clicked an authorable No button.
/// IDRETRY
/// The user clicked an authorable Retry button.
/// HELP_TCARD_DATA
/// The user clicked an authorable button. The dwActionData parameter contains a long integer specified by the Help author.
/// HELP_TCARD_OTHER_CALLER
/// Another application has requested training cards.
/// IDYES
/// The user clicked an authorable Yes button.
/// Returns
/// The return value is ignored; use zero.
// https://docs.microsoft.com/en-us/windows/win32/shell/wm-tcard
WM_TCARD = 0x0052,
///
/// Indicates that the user pressed the F1 key. If a menu is active when F1 is pressed, WM_HELP is sent to the window
/// associated with the menu; otherwise, WM_HELP is sent to the window that has the keyboard focus. If no window has the
/// keyboard focus, WM_HELP is sent to the currently active window.
///
/// Parameters
/// wParam
/// Must be zero.
/// lphi
///
/// The address of a HELPINFO structure that contains information about the menu item, control, dialog box, or window for
/// which Help is requested.
///
/// Returns
/// Returns TRUE.
///
/// The DefWindowProc function passes WM_HELP to the parent window of a child window or to the owner of a top-level window.
///
// https://docs.microsoft.com/en-us/windows/win32/shell/wm-help
WM_HELP = 0x0053,
///
///
/// Sent to all windows after the user has logged on or off. When the user logs on or off, the system updates the user-specific
/// settings. The system sends this message immediately after updating the settings.
///
/// A window receives this message through its WindowProc function.
///
/// Note
/// This message is not supported as of Windows Vista.
///
///
/// #define WM_USERCHANGED 0x0054
///
///
/// Parameters
/// wParam
/// This parameter is not used.
/// lParam
/// This parameter is not used.
/// Returns
/// Type: LRESULT
/// An application should return zero if it processes this message.
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-userchanged
WM_USERCHANGED = 0x0054,
///
/// Determines if a window accepts ANSI or Unicode structures in the WM_NOTIFY notification message.
/// WM_NOTIFYFORMAT messages are sent from a common control to its parent window and from the parent window to the common control.
///
/// Parameters
/// wParam
///
/// A handle to the window that is sending the WM_NOTIFYFORMAT message. If lParam is NF_QUERY, this parameter is the
/// handle to a control. If lParam is NF_REQUERY, this parameter is the handle to the parent window of a control.
///
/// lParam
///
/// The command value that specifies the nature of the WM_NOTIFYFORMAT message. This will be one of the following values:
///
///
///
/// Value
/// Meaning
///
/// -
/// NF_QUERY
///
/// The message is a query to determine whether ANSI or Unicode structures should be used in WM_NOTIFY messages. This
/// command is sent from a control to its parent window during the creation of a control and in response to an NF_REQUERY command.
///
///
/// -
/// NF_REQUERY
///
/// The message is a request for a control to send an NF_QUERY form of this message to its parent window. This command is sent
/// from the parent window. The parent window is asking the control to requery it about the type of structures to use in
/// WM_NOTIFY messages. If lParam is NF_REQUERY, the return value is the result of the requery operation.
///
///
///
/// Returns
/// Returns one of the following values.
///
///
/// Return code
/// Description
///
/// -
/// NFR_ANSI
/// ANSI structures should be used in WM_NOTIFY messages sent by the control.
///
/// -
/// NFR_UNICODE
/// Unicode structures should be used in WM_NOTIFY messages sent by the control.
///
/// -
/// 0
/// An error occurred.
///
///
///
///
/// When a common control is created, the control sends a WM_NOTIFYFORMAT message to its parent window to determine the
/// type of structures to use in WM_NOTIFY messages. If the parent window does not handle this message, the
/// DefWindowProc function responds according to the type of the parent window. That is, if the parent window is a Unicode
/// window, DefWindowProc returns NFR_UNICODE, and if the parent window is an ANSI window, DefWindowProc returns
/// NFR_ANSI. If the parent window is a dialog box and does not handle this message, the DefDlgProc function similarly
/// responds according to the type of the dialog box (Unicode or ANSI).
///
///
/// A parent window can change the type of structures a common control uses in WM_NOTIFY messages by setting lParam to
/// NF_REQUERY and sending a WM_NOTIFYFORMAT message to the control. This causes the control to send an NF_QUERY form of
/// the WM_NOTIFYFORMAT message to the parent window.
///
///
/// All common controls will send WM_NOTIFYFORMAT messages. However, the standard Windows controls (edit controls, combo
/// boxes, list boxes, buttons, scroll bars, and static controls) do not.
///
///
// https://docs.microsoft.com/en-us/windows/win32/controls/wm-notifyformat
WM_NOTIFYFORMAT = 0x0055,
///
///
/// Notifies a window that the user desires a context menu to appear. The user may have clicked the right mouse button
/// (right-clicked) in the window, pressed Shift+F10 or pressed the applications key (context menu key) available on some keyboards.
///
///
/// #define WM_CONTEXTMENU 0x007B
///
///
/// Parameters
/// wParam
///
/// A handle to the window in which the user right-clicked the mouse. This can be a child window of the window receiving the
/// message. For more information about processing this message, see the Remarks section.
///
/// lParam
///
/// The low-order word specifies the horizontal position of the cursor, in screen coordinates, at the time of the mouse click.
///
///
/// The high-order word specifies the vertical position of the cursor, in screen coordinates, at the time of the mouse click.
///
/// Returns
/// No return value.
///
///
/// A window can process this message by displaying a shortcut menu using the TrackPopupMenu or TrackPopupMenuEx
/// functions. To obtain the horizontal and vertical positions, use the following code.
///
///
/// xPos = GET_X_LPARAM(lParam); yPos = GET_Y_LPARAM(lParam);
///
///
/// If a window does not display a shortcut menu it should pass this message to the DefWindowProc function. If a window is
/// a child window, DefWindowProc sends the message to the parent. Otherwise, DefWindowProc displays a default
/// shortcut menu if the specified position is in the window's caption.
///
///
/// DefWindowProc generates the WM_CONTEXTMENU message when it processes the WM_RBUTTONUP or
/// WM_NCRBUTTONUP message or when the user types SHIFT+F10. The WM_CONTEXTMENU message is also generated when the
/// user presses and releases the VK_APPS key.
///
///
/// If the context menu is generated from the keyboard for example, if the user types SHIFT+F10 then the x- and y-coordinates are
/// -1 and the application should display the context menu at the location of the current selection rather than at (xPos, yPos).
///
///
// https://docs.microsoft.com/en-us/windows/win32/menurc/wm-contextmenu
WM_CONTEXTMENU = 0x007B,
///
/// Sent to a window when the SetWindowLong function is about to change one or more of the window's styles.
/// A window receives this message through its WindowProc function.
///
/// #define WM_STYLECHANGING 0x007C
///
///
/// Parameters
/// wParam
///
/// Indicates whether the window's styles or extended window styles are changing. This parameter can be one or more of the
/// following values.
///
///
///
/// Value
/// Meaning
///
/// -
/// GWL_EXSTYLE -20
/// The extended window styles are changing.
///
/// -
/// GWL_STYLE -16
/// The window styles are changing.
///
///
/// lParam
///
/// A pointer to a STYLESTRUCT structure that contains the proposed new styles for the window. An application can examine
/// the styles and, if necessary, change them.
///
/// Returns
/// Type: LRESULT
/// An application should return zero if it processes this message.
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-stylechanging
WM_STYLECHANGING = 0x007C,
///
/// Sent to a window after the SetWindowLong function has changed one or more of the window's styles.
/// A window receives this message through its WindowProc function.
///
/// #define WM_STYLECHANGED 0x007D
///
///
/// Parameters
/// wParam
///
/// Indicates whether the window's styles or extended window styles have changed. This parameter can be one or more of the
/// following values.
///
///
///
/// Value
/// Meaning
///
/// -
/// GWL_EXSTYLE -20
/// The extended window styles have changed.
///
/// -
/// GWL_STYLE -16
/// The window styles have changed.
///
///
/// lParam
///
/// A pointer to a STYLESTRUCT structure that contains the new styles for the window. An application can examine the
/// styles, but cannot change them.
///
/// Returns
/// Type: LRESULT
/// An application should return zero if it processes this message.
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-stylechanged
WM_STYLECHANGED = 0x007D,
///
/// The WM_DISPLAYCHANGE message is sent to all windows when the display resolution has changed.
/// A window receives this message through its WindowProc function.
///
/// LRESULT CALLBACK WindowProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
///
///
/// Parameters
/// wParam
/// The new image depth of the display, in bits per pixel.
/// lParam
/// The low-order word specifies the horizontal resolution of the screen.
/// The high-order word specifies the vertical resolution of the screen.
/// This message is only sent to top-level windows. For all other windows it is posted.
// https://docs.microsoft.com/en-us/windows/win32/gdi/wm-displaychange
WM_DISPLAYCHANGE = 0x007E,
///
///
/// Sent to a window to retrieve a handle to the large or small icon associated with a window. The system displays the large icon
/// in the ALT+TAB dialog, and the small icon in the window caption.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_GETICON 0x007F
///
///
/// Parameters
/// wParam
/// The type of icon being retrieved. This parameter can be one of the following values.
///
///
/// Value
/// Meaning
///
/// -
/// ICON_BIG 1
/// Retrieve the large icon for the window.
///
/// -
/// ICON_SMALL 0
/// Retrieve the small icon for the window.
///
/// -
/// ICON_SMALL2 2
///
/// Retrieves the small icon provided by the application. If the application does not provide one, the system uses the
/// system-generated icon for that window.
///
///
///
/// lParam
/// The DPI of the icon being retrieved. This can be used to provide different icons depending on the icon size.
/// Returns
/// Type: HICON
///
/// The return value is a handle to the large or small icon, depending on the value of wParam. When an application receives this
/// message, it can return a handle to a large or small icon, or pass the message to the DefWindowProc function.
///
///
///
/// When an application receives this message, it can return a handle to a large or small icon, or pass the message to DefWindowProc.
///
///
/// DefWindowProc returns a handle to the large or small icon associated with the window, depending on the value of wParam.
///
///
/// A window that has no icon explicitly set (with WM_SETICON) uses the icon for the registered window class, and in this
/// case DefWindowProc will return 0 for a WM_GETICON message. If sending a WM_GETICON message to a window
/// returns 0, next try calling the GetClassLongPtr function for the window. If that returns 0 then try the
/// LoadIcon function.
///
///
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-geticon
WM_GETICON = 0x007F,
///
///
/// Associates a new large or small icon with a window. The system displays the large icon in the ALT+TAB dialog box, and the
/// small icon in the window caption.
///
///
/// #define WM_SETICON 0x0080
///
///
/// Parameters
/// wParam
/// The type of icon to be set. This parameter can be one of the following values.
///
///
/// Value
/// Meaning
///
/// -
/// ICON_BIG 1
/// Set the large icon for the window.
///
/// -
/// ICON_SMALL 0
/// Set the small icon for the window.
///
///
/// lParam
/// A handle to the new large or small icon. If this parameter is NULL, the icon indicated by wParamis removed.
/// Returns
/// Type: LRESULT
///
/// The return value is a handle to the previous large or small icon, depending on the value of wParam. It is NULL if the
/// window previously had no icon of the type indicated by wParam.
///
///
/// The DefWindowProc function returns a handle to the previous large or small icon associated with the window, depending
/// on the value of wParam.
///
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-seticon
WM_SETICON = 0x0080,
///
/// Sent prior to the WM_CREATE message when a window is first created.
/// A window receives this message through its WindowProc function.
///
/// #define WM_NCCREATE 0x0081
///
///
/// Parameters
/// wParam
/// This parameter is not used.
/// lParam
///
/// A pointer to the CREATESTRUCT structure that contains information about the window being created. The members of
/// CREATESTRUCT are identical to the parameters of the CreateWindowEx function.
///
/// Returns
/// Type: LRESULT
///
/// If an application processes this message, it should return TRUE to continue creation of the window. If the application
/// returns FALSE, the CreateWindow or CreateWindowEx function will return a NULL handle.
///
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-nccreate
WM_NCCREATE = 0x0081,
///
///
/// Notifies a window that its nonclient area is being destroyed. The DestroyWindow function sends the WM_NCDESTROY
/// message to the window following the WM_DESTROY message. WM_DESTROY is used to free the allocated memory object
/// associated with the window.
///
///
/// The WM_NCDESTROY message is sent after the child windows have been destroyed. In contrast, WM_DESTROY is sent
/// before the child windows are destroyed.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_NCDESTROY 0x0082
///
///
/// Parameters
/// wParam
/// This parameter is not used.
/// lParam
/// This parameter is not used.
/// Returns
/// Type: LRESULT
/// If an application processes this message, it should return zero.
/// This message frees any memory internally allocated for the window.
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-ncdestroy
WM_NCDESTROY = 0x0082,
///
///
/// Sent when the size and position of a window's client area must be calculated. By processing this message, an application can
/// control the content of the window's client area when the size or position of the window changes.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_NCCALCSIZE 0x0083
///
///
/// Parameters
/// wParam
///
/// If wParam is TRUE, it specifies that the application should indicate which part of the client area contains valid
/// information. The system copies the valid information to the specified area within the new client area.
///
/// If wParam is FALSE, the application does not need to indicate the valid part of the client area.
/// lParam
///
/// If wParam is TRUE, lParam points to an NCCALCSIZE_PARAMS structure that contains information an application can
/// use to calculate the new size and position of the client rectangle.
///
///
/// If wParam is FALSE, lParam points to a RECT structure. On entry, the structure contains the proposed window
/// rectangle for the window. On exit, the structure should contain the screen coordinates of the corresponding window client area.
///
/// Returns
/// Type: LRESULT
/// If the wParam parameter is FALSE, the application should return zero.
/// If wParam is TRUE, the application should return zero or a combination of the following values.
///
/// If wParam is TRUE and an application returns zero, the old client area is preserved and is aligned with the upper-left
/// corner of the new client area.
///
///
///
/// Return code/value
/// Description
///
/// -
/// WVR_ALIGNTOP 0x0010
///
/// Specifies that the client area of the window is to be preserved and aligned with the top of the new position of the window.
/// For example, to align the client area to the upper-left corner, return the WVR_ALIGNTOP and WVR_ALIGNLEFT values.
///
///
/// -
/// WVR_ALIGNRIGHT 0x0080
///
/// Specifies that the client area of the window is to be preserved and aligned with the right side of the new position of the
/// window. For example, to align the client area to the lower-right corner, return the WVR_ALIGNRIGHT and WVR_ALIGNBOTTOM values.
///
///
/// -
/// WVR_ALIGNLEFT 0x0020
///
/// Specifies that the client area of the window is to be preserved and aligned with the left side of the new position of the
/// window. For example, to align the client area to the lower-left corner, return the WVR_ALIGNLEFT and
/// WVR_ALIGNBOTTOM values.
///
///
/// -
/// WVR_ALIGNBOTTOM 0x0040
///
/// Specifies that the client area of the window is to be preserved and aligned with the bottom of the new position of the
/// window. For example, to align the client area to the top-left corner, return the WVR_ALIGNTOP and WVR_ALIGNLEFT values.
///
///
/// -
/// WVR_HREDRAW 0x0100
///
/// Used in combination with any other values, except WVR_VALIDRECTS, causes the window to be completely redrawn if the
/// client rectangle changes size horizontally. This value is similar to CS_HREDRAW class style
///
///
/// -
/// WVR_VREDRAW 0x0200
///
/// Used in combination with any other values, except WVR_VALIDRECTS, causes the window to be completely redrawn if the
/// client rectangle changes size vertically. This value is similar to CS_VREDRAW class style
///
///
/// -
/// WVR_REDRAW 0x0300
///
/// This value causes the entire window to be redrawn. It is a combination of WVR_HREDRAW and WVR_VREDRAW values.
///
///
/// -
/// WVR_VALIDRECTS 0x0400
///
/// This value indicates that, upon return from WM_NCCALCSIZE, the rectangles specified by the rgrc[1] and
/// rgrc[2] members of the NCCALCSIZE_PARAMS structure contain valid destination and source area rectangles,
/// respectively. The system combines these rectangles to calculate the area of the window to be preserved. The system copies any
/// part of the window image that is within the source rectangle and clips the image to the destination rectangle. Both
/// rectangles are in parent-relative or screen-relative coordinates. This flag cannot be combined with any other flags. This
/// return value allows an application to implement more elaborate client-area preservation strategies, such as centering or
/// preserving a subset of the client area.
///
///
///
///
///
/// The window may be redrawn, depending on whether the CS_HREDRAW or CS_VREDRAW class style is specified. This is the default,
/// backward-compatible processing of this message by the DefWindowProc function (in addition to the usual client
/// rectangle calculation described in the preceding table).
///
///
/// When wParam is TRUE, simply returning 0 without processing the NCCALCSIZE_PARAMS rectangles will cause the
/// client area to resize to the size of the window, including the window frame. This will remove the window frame and caption
/// items from your window, leaving only the client area displayed.
///
///
/// Starting with Windows Vista, removing the standard frame by simply returning 0 when the wParam is TRUE does not affect
/// frames that are extended into the client area using the DwmExtendFrameIntoClientArea function. Only the standard frame
/// will be removed.
///
///
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-nccalcsize
WM_NCCALCSIZE = 0x0083,
///
///
/// Sent to a window in order to determine what part of the window corresponds to a particular screen coordinate. This can
/// happen, for example, when the cursor moves, when a mouse button is pressed or released, or in response to a call to a
/// function such as WindowFromPoint. If the mouse is not captured, the message is sent to the window beneath the cursor.
/// Otherwise, the message is sent to the window that has captured the mouse.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_NCHITTEST 0x0084
///
///
/// Parameters
/// wParam
/// This parameter is not used.
/// lParam
///
/// The low-order word specifies the x-coordinate of the cursor. The coordinate is relative to the upper-left corner of the screen.
///
///
/// The high-order word specifies the y-coordinate of the cursor. The coordinate is relative to the upper-left corner of the screen.
///
/// Returns
///
/// The return value of the DefWindowProc function is one of the following values, indicating the position of the cursor
/// hot spot.
///
///
///
/// Return code/value
/// Description
///
/// -
/// HTBORDER 18
/// In the border of a window that does not have a sizing border.
///
/// -
/// HTBOTTOM 15
/// In the lower-horizontal border of a resizable window (the user can click the mouse to resize the window vertically).
///
/// -
/// HTBOTTOMLEFT 16
/// In the lower-left corner of a border of a resizable window (the user can click the mouse to resize the window diagonally).
///
/// -
/// HTBOTTOMRIGHT 17
/// In the lower-right corner of a border of a resizable window (the user can click the mouse to resize the window diagonally).
///
/// -
/// HTCAPTION 2
/// In a title bar.
///
/// -
/// HTCLIENT 1
/// In a client area.
///
/// -
/// HTCLOSE 20
/// In a Close button.
///
/// -
/// HTERROR -2
///
/// On the screen background or on a dividing line between windows (same as HTNOWHERE, except that the
/// DefWindowProc function produces a system beep to indicate an error).
///
///
/// -
/// HTGROWBOX 4
/// In a size box (same as HTSIZE).
///
/// -
/// HTHELP 21
/// In a Help button.
///
/// -
/// HTHSCROLL 6
/// In a horizontal scroll bar.
///
/// -
/// HTLEFT 10
/// In the left border of a resizable window (the user can click the mouse to resize the window horizontally).
///
/// -
/// HTMENU 5
/// In a menu.
///
/// -
/// HTMAXBUTTON 9
/// In a Maximize button.
///
/// -
/// HTMINBUTTON 8
/// In a Minimize button.
///
/// -
/// HTNOWHERE 0
/// On the screen background or on a dividing line between windows.
///
/// -
/// HTREDUCE 8
/// In a Minimize button.
///
/// -
/// HTRIGHT 11
/// In the right border of a resizable window (the user can click the mouse to resize the window horizontally).
///
/// -
/// HTSIZE 4
/// In a size box (same as HTGROWBOX).
///
/// -
/// HTSYSMENU 3
/// In a window menu or in a Close button in a child window.
///
/// -
/// HTTOP 12
/// In the upper-horizontal border of a window.
///
/// -
/// HTTOPLEFT 13
/// In the upper-left corner of a window border.
///
/// -
/// HTTOPRIGHT 14
/// In the upper-right corner of a window border.
///
/// -
/// HTTRANSPARENT -1
///
/// In a window currently covered by another window in the same thread (the message will be sent to underlying windows in the
/// same thread until one of them returns a code that is not HTTRANSPARENT).
///
///
/// -
/// HTVSCROLL 7
/// In the vertical scroll bar.
///
/// -
/// HTZOOM 9
/// In a Maximize button.
///
///
///
/// Use the following code to obtain the horizontal and vertical position:
///
/// xPos = GET_X_LPARAM(lParam); yPos = GET_Y_LPARAM(lParam);
///
///
/// As noted above, the x-coordinate is in the low-order short of the return value; the y-coordinate is in the high-order
/// short (both represent signed values because they can take negative values on systems with multiple monitors). If the
/// return value is assigned to a variable, you can use the MAKEPOINTS macro to obtain a POINTS structure from the
/// return value. You can also use the GET_X_LPARAM or GET_Y_LPARAM macro to extract the x- or y-coordinate.
///
///
/// Important
///
/// Do not use the LOWORD or HIWORD macros to extract the x- and y- coordinates of the cursor position because
/// these macros return incorrect results on systems with multiple monitors. Systems with multiple monitors can have negative x-
/// and y- coordinates, and LOWORD and HIWORD treat the coordinates as unsigned quantities.
///
///
///
/// Windows Vista: When creating custom frames that include the standard caption buttons, this message should first be
/// passed to the DwmDefWindowProc function. This enables the Desktop Window Manager (DWM) to provide hit-testing for the
/// captions buttons. If DwmDefWindowProc does not handle the message, further processing of WM_NCHITTEST may be needed.
///
///
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-nchittest
WM_NCHITTEST = 0x0084,
///
/// The WM_NCPAINT message is sent to a window when its frame must be painted.
/// A window receives this message through its WindowProc function.
///
/// LRESULT CALLBACK WindowProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
///
///
/// Parameters
/// wParam
/// A handle to the update region of the window. The update region is clipped to the window frame.
/// lParam
/// This parameter is not used.
/// Returns
/// An application returns zero if it processes this message.
///
/// The DefWindowProc function paints the window frame.
///
/// An application can intercept the WM_NCPAINT message and paint its own custom window frame. The clipping region for a
/// window is always rectangular, even if the shape of the frame is altered.
///
/// The wParam value can be passed to GetDCEx as in the following example.
///
/// case WM_NCPAINT: { HDC hdc; hdc = GetDCEx(hwnd, (HRGN)wParam, DCX_WINDOW|DCX_INTERSECTRGN); // Paint into this DC ReleaseDC(hwnd, hdc); }
///
///
// https://docs.microsoft.com/en-us/windows/win32/gdi/wm-ncpaint
WM_NCPAINT = 0x0085,
///
/// Sent to a window when its nonclient area needs to be changed to indicate an active or inactive state.
/// A window receives this message through its WindowProc function.
///
/// #define WM_NCACTIVATE 0x0086
///
///
/// Parameters
/// wParam
///
/// Indicates when a title bar or icon needs to be changed to indicate an active or inactive state. If an active title bar or
/// icon is to be drawn, the wParam parameter is TRUE. If an inactive title bar or icon is to be drawn, wParam is FALSE.
///
/// lParam
/// When a visual style is active for this window, this parameter is not used.
///
/// When a visual style is not active for this window, this parameter is a handle to an optional update region for the nonclient
/// area of the window. If this parameter is set to -1, DefWindowProc does not repaint the nonclient area to reflect the
/// state change.
///
/// Returns
/// Type: LRESULT
///
/// When the wParam parameter is FALSE, an application should return TRUE to indicate that the system should
/// proceed with the default processing, or it should return FALSE to prevent the change. When wParam is TRUE, the
/// return value is ignored.
///
///
///
/// Processing messages related to the nonclient area of a standard window is not recommended, because the application must be
/// able to draw all the required parts of the nonclient area for the window. If an application does process this message, it
/// must return TRUE to direct the system to complete the change of active window. If the window is minimized when this
/// message is received, the application should pass the message to the DefWindowProc function.
///
///
/// The DefWindowProc function draws the title bar or icon title in its active colors when the wParam parameter is
/// TRUE and in its inactive colors when wParam is FALSE.
///
///
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-ncactivate
WM_NCACTIVATE = 0x0086,
///
///
/// Sent to the window procedure associated with a control. By default, the system handles all keyboard input to the control; the
/// system interprets certain types of keyboard input as dialog box navigation keys. To override this default behavior, the
/// control can respond to the WM_GETDLGCODE message to indicate the types of input it wants to process itself.
///
///
/// #define WM_GETDLGCODE 0x0087
///
///
/// Parameters
/// wParam
///
/// The virtual key, pressed by the user, that prompted Windows to issue this notification. The handler must selectively handle
/// these keys. For instance, the handler might accept and process VK_RETURN but delegate VK_TAB to the owner
/// window. For a list of values, see Virtual-Key Codes.
///
/// lParam
/// A pointer to an MSG structure (or NULL if the system is performing a query).
/// Returns
/// The return value is one or more of the following values, indicating which type of input the application processes.
///
///
/// Return code/value
/// Description
///
/// -
/// DLGC_BUTTON 0x2000
/// Button.
///
/// -
/// DLGC_DEFPUSHBUTTON 0x0010
/// Default push button.
///
/// -
/// DLGC_HASSETSEL 0x0008
/// EM_SETSEL messages.
///
/// -
/// DLGC_RADIOBUTTON 0x0040
/// Radio button.
///
/// -
/// DLGC_STATIC 0x0100
/// Static control.
///
/// -
/// DLGC_UNDEFPUSHBUTTON 0x0020
/// Non-default push button.
///
/// -
/// DLGC_WANTALLKEYS 0x0004
/// All keyboard input.
///
/// -
/// DLGC_WANTARROWS 0x0001
/// Direction keys.
///
/// -
/// DLGC_WANTCHARS 0x0080
/// WM_CHAR messages.
///
/// -
/// DLGC_WANTMESSAGE 0x0004
/// All keyboard input (the application passes this message in the MSG structure to the control).
///
/// -
/// DLGC_WANTTAB 0x0002
/// TAB key.
///
///
///
///
/// Although the DefWindowProc function always returns zero in response to the WM_GETDLGCODE message, the window
/// procedure for the predefined control classes return a code appropriate for each class.
///
///
/// The WM_GETDLGCODE message and the returned values are useful only with user-defined dialog box controls or standard
/// controls modified by subclassing.
///
///
// https://docs.microsoft.com/en-us/windows/win32/dlgbox/wm-getdlgcode
WM_GETDLGCODE = 0x0087,
///
/// The WM_SYNCPAINT message is used to synchronize painting while avoiding linking independent GUI threads.
/// A window receives this message through its WindowProc function.
///
/// LRESULT CALLBACK WindowProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
///
///
/// Parameters
/// wParam
/// This parameter is not used.
/// lParam
/// This parameter is not used.
/// Returns
/// An application returns zero if it processes this message.
///
/// When a window has been hidden, shown, moved, or sized, the system may determine that it is necessary to send a
/// WM_SYNCPAINT message to the top-level windows of other threads. Applications must pass WM_SYNCPAINT to
/// DefWindowProc for processing. The DefWindowProc function will send a WM_NCPAINT message to the window
/// procedure if the window frame must be painted and send a WM_ERASEBKGND message if the window background must be erased.
///
// https://docs.microsoft.com/en-us/windows/win32/gdi/wm-syncpaint
WM_SYNCPAINT = 0x0088,
///
WM_UAHDESTROYWINDOW = 0x0090,
///
WM_UAHDRAWMENU = 0x0091,
///
WM_UAHDRAWMENUITEM = 0x0092,
///
WM_UAHINITMENU = 0x0093,
///
WM_UAHMEASUREMENUITEM = 0x0094,
///
WM_UAHNCPAINTMENUPOPUP = 0x0095,
///
///
/// Posted to a window when the cursor is moved within the nonclient area of the window. This message is posted to the window
/// that contains the cursor. If a window has captured the mouse, this message is not posted.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_NCMOUSEMOVE 0x00A0
///
///
/// Parameters
/// wParam
///
/// The hit-test value returned by the DefWindowProc function as a result of processing the WM_NCHITTEST message.
/// For a list of hit-test values, see WM_NCHITTEST.
///
/// lParam
///
/// A POINTS structure that contains the x- and y-coordinates of the cursor. The coordinates are relative to the
/// upper-left corner of the screen.
///
/// Returns
/// If an application processes this message, it should return zero.
///
/// If it is appropriate to do so, the system sends the WM_SYSCOMMAND message to the window.
///
/// You can also use the GET_X_LPARAM and GET_Y_LPARAM macros to extract the values of the x- and y- coordinates
/// from lParam.
///
///
/// xPos = GET_X_LPARAM(lParam); yPos = GET_Y_LPARAM(lParam);
///
///
/// Important
///
/// Do not use the LOWORD or HIWORD macros to extract the x- and y- coordinates of the cursor position because
/// these macros return incorrect results on systems with multiple monitors. Systems with multiple monitors can have negative x-
/// and y- coordinates, and LOWORD and HIWORD treat the coordinates as unsigned quantities.
///
///
///
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-ncmousemove
WM_NCMOUSEMOVE = 0x00A0,
///
///
/// Posted when the user presses the left mouse button while the cursor is within the nonclient area of a window. This message is
/// posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_NCLBUTTONDOWN 0x00A1
///
///
/// Parameters
/// wParam
///
/// The hit-test value returned by the DefWindowProc function as a result of processing the WM_NCHITTEST message.
/// For a list of hit-test values, see WM_NCHITTEST.
///
/// lParam
///
/// A POINTS structure that contains the x- and y-coordinates of the cursor. The coordinates are relative to the
/// upper-left corner of the screen.
///
/// Returns
/// If an application processes this message, it should return zero.
///
///
/// The DefWindowProc function tests the specified point to find the location of the cursor and performs the appropriate
/// action. If appropriate, DefWindowProc sends the WM_SYSCOMMAND message to the window.
///
///
/// You can also use the GET_X_LPARAM and GET_Y_LPARAM macros to extract the values of the x- and y- coordinates
/// from lParam.
///
///
/// xPos = GET_X_LPARAM(lParam); yPos = GET_Y_LPARAM(lParam);
///
///
/// Important
///
/// Do not use the LOWORD or HIWORD macros to extract the x- and y- coordinates of the cursor position because
/// these macros return incorrect results on systems with multiple monitors. Systems with multiple monitors can have negative x-
/// and y- coordinates, and LOWORD and HIWORD treat the coordinates as unsigned quantities.
///
///
///
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-nclbuttondown
WM_NCLBUTTONDOWN = 0x00A1,
///
///
/// Posted when the user releases the left mouse button while the cursor is within the nonclient area of a window. This message
/// is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_NCLBUTTONUP 0x00A2
///
///
/// Parameters
/// wParam
///
/// The hit-test value returned by the DefWindowProc function as a result of processing the WM_NCHITTEST message.
/// For a list of hit-test values, see WM_NCHITTEST.
///
/// lParam
///
/// A POINTS structure that contains the x- and y-coordinates of the cursor. The coordinates are relative to the
/// upper-left corner of the screen.
///
/// Returns
/// If an application processes this message, it should return zero.
///
///
/// The DefWindowProc function tests the specified point to find out the location of the cursor and performs the
/// appropriate action. If appropriate, DefWindowProc sends the WM_SYSCOMMAND message to the window.
///
///
/// You can also use the GET_X_LPARAM and GET_Y_LPARAM macros to extract the values of the x- and y- coordinates
/// from lParam.
///
///
/// xPos = GET_X_LPARAM(lParam); yPos = GET_Y_LPARAM(lParam);
///
///
/// Important
///
/// Do not use the LOWORD or HIWORD macros to extract the x- and y- coordinates of the cursor position because
/// these macros return incorrect results on systems with multiple monitors. Systems with multiple monitors can have negative x-
/// and y- coordinates, and LOWORD and HIWORD treat the coordinates as unsigned quantities.
///
///
/// If it is appropriate to do so, the system sends the WM_SYSCOMMAND message to the window.
///
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-nclbuttonup
WM_NCLBUTTONUP = 0x00A2,
///
///
/// Posted when the user double-clicks the left mouse button while the cursor is within the nonclient area of a window. This
/// message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_NCLBUTTONDBLCLK 0x00A3
///
///
/// Parameters
/// wParam
///
/// The hit-test value returned by the DefWindowProc function as a result of processing the WM_NCHITTEST message.
/// For a list of hit-test values, see WM_NCHITTEST.
///
/// lParam
///
/// A POINTS structure that contains the x- and y-coordinates of the cursor. The coordinates are relative to the
/// upper-left corner of the screen.
///
/// Returns
/// If an application processes this message, it should return zero.
///
///
/// You can also use the GET_X_LPARAM and GET_Y_LPARAM macros to extract the values of the x- and y- coordinates
/// from lParam.
///
///
/// xPos = GET_X_LPARAM(lParam); yPos = GET_Y_LPARAM(lParam);
///
///
/// Important
///
/// Do not use the LOWORD or HIWORD macros to extract the x- and y- coordinates of the cursor position because
/// these macros return incorrect results on systems with multiple monitors. Systems with multiple monitors can have negative x-
/// and y- coordinates, and LOWORD and HIWORD treat the coordinates as unsigned quantities.
///
///
///
/// By default, the DefWindowProc function tests the specified point to find out the location of the cursor and performs
/// the appropriate action. If appropriate, DefWindowProc sends the WM_SYSCOMMAND message to the window.
///
/// A window need not have the CS_DBLCLKS style to receive WM_NCLBUTTONDBLCLK messages.
///
/// The system generates a WM_NCLBUTTONDBLCLK message when the user presses, releases, and again presses the left mouse
/// button within the system's double-click time limit. Double-clicking the left mouse button actually generates four messages:
/// WM_NCLBUTTONDOWN, WM_NCLBUTTONUP, WM_NCLBUTTONDBLCLK, and WM_NCLBUTTONUP again.
///
///
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-nclbuttondblclk
WM_NCLBUTTONDBLCLK = 0x00A3,
///
///
/// Posted when the user presses the right mouse button while the cursor is within the nonclient area of a window. This message
/// is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_NCRBUTTONDOWN 0x00A4
///
///
/// Parameters
/// wParam
///
/// The hit-test value returned by the DefWindowProc function as a result of processing the WM_NCHITTEST message.
/// For a list of hit-test values, see WM_NCHITTEST.
///
/// lParam
///
/// A POINTS structure that contains the x- and y-coordinates of the cursor. The coordinates are relative to the
/// upper-left corner of the screen.
///
/// Returns
/// If an application processes this message, it should return zero.
///
///
/// You can also use the GET_X_LPARAM and GET_Y_LPARAM macros to extract the values of the x- and y- coordinates
/// from lParam.
///
///
/// xPos = GET_X_LPARAM(lParam); yPos = GET_Y_LPARAM(lParam);
///
///
/// Important
///
/// Do not use the LOWORD or HIWORD macros to extract the x- and y- coordinates of the cursor position because
/// these macros return incorrect results on systems with multiple monitors. Systems with multiple monitors can have negative x-
/// and y- coordinates, and LOWORD and HIWORD treat the coordinates as unsigned quantities.
///
///
/// If it is appropriate to do so, the system sends the WM_SYSCOMMAND message to the window.
///
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-ncrbuttondown
WM_NCRBUTTONDOWN = 0x00A4,
///
///
/// Posted when the user releases the right mouse button while the cursor is within the nonclient area of a window. This message
/// is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_NCRBUTTONUP 0x00A5
///
///
/// Parameters
/// wParam
///
/// The hit-test value returned by the DefWindowProc function as a result of processing the WM_NCHITTEST message.
/// For a list of hit-test values, see WM_NCHITTEST.
///
/// lParam
///
/// A POINTS structure that contains the x- and y-coordinates of the cursor. The coordinates are relative to the
/// upper-left corner of the screen.
///
/// Returns
/// If an application processes this message, it should return zero.
///
///
/// You can also use the GET_X_LPARAM and GET_Y_LPARAM macros to extract the values of the x- and y- coordinates
/// from lParam.
///
///
/// xPos = GET_X_LPARAM(lParam); yPos = GET_Y_LPARAM(lParam);
///
///
/// Important
///
/// Do not use the LOWORD or HIWORD macros to extract the x- and y- coordinates of the cursor position because
/// these macros return incorrect results on systems with multiple monitors. Systems with multiple monitors can have negative x-
/// and y- coordinates, and LOWORD and HIWORD treat the coordinates as unsigned quantities.
///
///
/// If it is appropriate to do so, the system sends the WM_SYSCOMMAND message to the window.
///
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-ncrbuttonup
WM_NCRBUTTONUP = 0x00A5,
///
///
/// Posted when the user double-clicks the right mouse button while the cursor is within the nonclient area of a window. This
/// message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_NCRBUTTONDBLCLK 0x00A6
///
///
/// Parameters
/// wParam
///
/// The hit-test value returned by the DefWindowProc function as a result of processing the WM_NCHITTEST message.
/// For a list of hit-test values, see WM_NCHITTEST.
///
/// lParam
///
/// A POINTS structure that contains the x- and y-coordinates of the cursor. The coordinates are relative to the
/// upper-left corner of the screen.
///
/// Returns
/// If an application processes this message, it should return zero.
///
/// A window need not have the CS_DBLCLKS style to receive WM_NCRBUTTONDBLCLK messages.
///
/// The system generates a WM_NCRBUTTONDBLCLK message when the user presses, releases, and again presses the right mouse
/// button within the system's double-click time limit. Double-clicking the right mouse button actually generates four messages:
/// WM_NCRBUTTONDOWN, WM_NCRBUTTONUP, WM_NCRBUTTONDBLCLK, and WM_NCRBUTTONUP again.
///
///
/// You can also use the GET_X_LPARAM and GET_Y_LPARAM macros to extract the values of the x- and y- coordinates
/// from lParam.
///
///
/// xPos = GET_X_LPARAM(lParam); yPos = GET_Y_LPARAM(lParam);
///
///
/// Important
///
/// Do not use the LOWORD or HIWORD macros to extract the x- and y- coordinates of the cursor position because
/// these macros return incorrect results on systems with multiple monitors. Systems with multiple monitors can have negative x-
/// and y- coordinates, and LOWORD and HIWORD treat the coordinates as unsigned quantities.
///
///
/// If it is appropriate to do so, the system sends the WM_SYSCOMMAND message to the window.
///
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-ncrbuttondblclk
WM_NCRBUTTONDBLCLK = 0x00A6,
///
///
/// Posted when the user presses the middle mouse button while the cursor is within the nonclient area of a window. This message
/// is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_NCMBUTTONDOWN 0x00A7
///
///
/// Parameters
/// wParam
///
/// The hit-test value returned by the DefWindowProc function as a result of processing the WM_NCHITTEST message.
/// For a list of hit-test values, see WM_NCHITTEST.
///
/// lParam
///
/// A POINTS structure that contains the x- and y-coordinates of the cursor. The coordinates are relative to the
/// upper-left corner of the screen.
///
/// Returns
/// If an application processes this message, it should return zero.
///
///
/// You can also use the GET_X_LPARAM and GET_Y_LPARAM macros to extract the values of the x- and y- coordinates
/// from lParam.
///
///
/// xPos = GET_X_LPARAM(lParam); yPos = GET_Y_LPARAM(lParam);
///
///
/// Important
///
/// Do not use the LOWORD or HIWORD macros to extract the x- and y- coordinates of the cursor position because
/// these macros return incorrect results on systems with multiple monitors. Systems with multiple monitors can have negative x-
/// and y- coordinates, and LOWORD and HIWORD treat the coordinates as unsigned quantities.
///
///
/// If it is appropriate to do so, the system sends the WM_SYSCOMMAND message to the window.
///
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-ncmbuttondown
WM_NCMBUTTONDOWN = 0x00A7,
///
///
/// Posted when the user releases the middle mouse button while the cursor is within the nonclient area of a window. This message
/// is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_NCMBUTTONUP 0x00A8
///
///
/// Parameters
/// wParam
///
/// The hit-test value returned by the DefWindowProc function as a result of processing the WM_NCHITTEST message.
/// For a list of hit-test values, see WM_NCHITTEST.
///
/// lParam
///
/// A POINTS structure that contains the x- and y-coordinates of the cursor. The coordinates are relative to the
/// upper-left corner of the screen.
///
/// Returns
/// If an application processes this message, it should return zero.
///
///
/// You can also use the GET_X_LPARAM and GET_Y_LPARAM macros to extract the values of the x- and y- coordinates
/// from lParam.
///
///
/// xPos = GET_X_LPARAM(lParam); yPos = GET_Y_LPARAM(lParam);
///
///
/// Important
///
/// Do not use the LOWORD or HIWORD macros to extract the x- and y- coordinates of the cursor position because
/// these macros return incorrect results on systems with multiple monitors. Systems with multiple monitors can have negative x-
/// and y- coordinates, and LOWORD and HIWORD treat the coordinates as unsigned quantities.
///
///
/// If it is appropriate to do so, the system sends the WM_SYSCOMMAND message to the window.
///
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-ncmbuttonup
WM_NCMBUTTONUP = 0x00A8,
///
///
/// Posted when the user double-clicks the middle mouse button while the cursor is within the nonclient area of a window. This
/// message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_NCMBUTTONDBLCLK 0x00A9
///
///
/// Parameters
/// wParam
///
/// The hit-test value returned by the DefWindowProc function as a result of processing the WM_NCHITTEST message.
/// For a list of hit-test values, see WM_NCHITTEST.
///
/// lParam
///
/// A POINTS structure that contains the x- and y-coordinates of the cursor. The coordinates are relative to the
/// upper-left corner of the screen.
///
/// Returns
/// If an application processes this message, it should return zero.
///
/// A window need not have the CS_DBLCLKS style to receive WM_NCMBUTTONDBLCLK messages.
///
/// The system generates a WM_NCMBUTTONDBLCLK message when the user presses, releases, and again presses the middle mouse
/// button within the system's double-click time limit. Double-clicking the middle mouse button actually generates four messages:
/// WM_NCMBUTTONDOWN, WM_NCMBUTTONUP, WM_NCMBUTTONDBLCLK, and WM_NCMBUTTONUP again.
///
///
/// You can also use the GET_X_LPARAM and GET_Y_LPARAM macros to extract the values of the x- and y- coordinates
/// from lParam.
///
///
/// xPos = GET_X_LPARAM(lParam); yPos = GET_Y_LPARAM(lParam);
///
///
/// Important
///
/// Do not use the LOWORD or HIWORD macros to extract the x- and y- coordinates of the cursor position because
/// these macros return incorrect results on systems with multiple monitors. Systems with multiple monitors can have negative x-
/// and y- coordinates, and LOWORD and HIWORD treat the coordinates as unsigned quantities.
///
///
/// If it is appropriate to do so, the system sends the WM_SYSCOMMAND message to the window.
///
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-ncmbuttondblclk
WM_NCMBUTTONDBLCLK = 0x00A9,
///
///
/// Posted when the user presses the first or second X button while the cursor is in the nonclient area of a window. This message
/// is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_NCXBUTTONDOWN 0x00AB
///
///
/// Parameters
/// wParam
///
/// The low-order word specifies the hit-test value returned by the DefWindowProc function from processing the
/// WM_NCHITTEST message. For a list of hit-test values, see WM_NCHITTEST. The high-order word indicates which
/// button was pressed. It can be one of the following values.
///
///
///
/// Value
/// Meaning
///
/// -
/// XBUTTON1 0x0001
/// The first X button was pressed.
///
/// -
/// XBUTTON2 0x0002
/// The second X button was pressed.
///
///
/// lParam
///
/// A pointer to a POINTS structure that contains the x- and y-coordinates of the cursor. The coordinates are relative to
/// the upper-left corner of the screen.
///
/// Returns
///
/// If an application processes this message, it should return TRUE. For more information about processing the return
/// value, see the Remarks section.
///
///
/// Use the following code to get the information in the wParam parameter.
///
/// nHittest = GET_NCHITTEST_WPARAM(wParam); fwButton = GET_XBUTTON_WPARAM(wParam);
///
/// You can also use the following code to get the x- and y-coordinates from lParam:
///
/// xPos = GET_X_LPARAM(lParam); yPos = GET_Y_LPARAM(lParam);
///
///
/// Important
///
/// Do not use the LOWORD or HIWORD macros to extract the x- and y- coordinates of the cursor position because
/// these macros return incorrect results on systems with multiple monitors. Systems with multiple monitors can have negative x-
/// and y- coordinates, and LOWORD and HIWORD treat the coordinates as unsigned quantities.
///
///
///
/// By default, the DefWindowProc function tests the specified point to get the position of the cursor and performs the
/// appropriate action. If appropriate, it sends the WM_SYSCOMMAND message to the window.
///
///
/// Unlike the WM_NCLBUTTONDOWN, WM_NCMBUTTONDOWN, and WM_NCRBUTTONDOWN messages, an application should
/// return TRUE from this message if it processes it. Doing so will allow software that simulates this message on Windows
/// systems earlier than Windows 2000 to determine whether the window procedure processed the message or called
/// DefWindowProc to process it.
///
///
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-ncxbuttondown
WM_NCXBUTTONDOWN = 0x00AB,
///
///
/// Posted when the user releases the first or second X button while the cursor is in the nonclient area of a window. This
/// message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_NCXBUTTONUP 0x00AC
///
///
/// Parameters
/// wParam
///
/// The low-order word specifies the hit-test value returned by the DefWindowProc function from processing the
/// WM_NCHITTEST message. For a list of hit-test values, see WM_NCHITTEST.
///
/// The high-order word indicates which button was released. It can be one of the following values.
///
///
/// Value
/// Meaning
///
/// -
/// XBUTTON1 0x0001
/// The first X button was released.
///
/// -
/// XBUTTON2 0x0002
/// The second X button was released.
///
///
/// lParam
///
/// A pointer to a POINTS structure that contains the x- and y-coordinates of the cursor. The coordinates are relative to
/// the upper-left corner of the screen.
///
/// Returns
///
/// If an application processes this message, it should return TRUE. For more information about processing the return
/// value, see the Remarks section.
///
///
/// Use the following code to get the information in the wParam parameter.
///
/// nHittest = GET_NCHITTEST_WPARAM(wParam); fwButton = GET_XBUTTON_WPARAM(wParam);
///
/// You can also use the following code to get the x- and y-coordinates from lParam:
///
/// xPos = GET_X_LPARAM(lParam); yPos = GET_Y_LPARAM(lParam);
///
///
/// Important
///
/// Do not use the LOWORD or HIWORD macros to extract the x- and y- coordinates of the cursor position because
/// these macros return incorrect results on systems with multiple monitors. Systems with multiple monitors can have negative x-
/// and y- coordinates, and LOWORD and HIWORD treat the coordinates as unsigned quantities.
///
///
///
/// By default, the DefWindowProc function tests the specified point to get the position of the cursor and performs the
/// appropriate action. If appropriate, it sends the WM_SYSCOMMAND message to the window.
///
///
/// Unlike the WM_NCLBUTTONUP, WM_NCMBUTTONUP, and WM_NCRBUTTONUP messages, an application should return
/// TRUE from this message if it processes it. Doing so will allow software that simulates this message on Windows systems
/// earlier than Windows 2000 to determine whether the window procedure processed the message or called DefWindowProc to
/// process it.
///
///
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-ncxbuttonup
WM_NCXBUTTONUP = 0x00AC,
///
///
/// Posted when the user double-clicks the first or second X button while the cursor is in the nonclient area of a window. This
/// message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_NCXBUTTONDBLCLK 0x00AD
///
///
/// Parameters
/// wParam
///
/// The low-order word specifies the hit-test value returned by the DefWindowProc function from processing the
/// WM_NCHITTEST message. For a list of hit-test values, see WM_NCHITTEST.
///
/// The high-order word indicates which button was double-clicked. It can be one of the following values.
///
///
/// Value
/// Meaning
///
/// -
/// XBUTTON1 0x0001
/// The first X button was double-clicked..
///
/// -
/// XBUTTON2 0x0002
/// The second X button was double-clicked.
///
///
/// lParam
///
/// A pointer to a POINTS structure that contains the x- and y-coordinates of the cursor. The coordinates are relative to
/// the upper-left corner of the screen.
///
/// Returns
///
/// If an application processes this message, it should return TRUE. For more information about processing the return
/// value, see the Remarks section.
///
///
/// Use the following code to get the information in the wParam parameter.
///
/// nHittest = GET_NCHITTEST_WPARAM(wParam); fwButton = GET_XBUTTON_WPARAM(wParam);
///
/// You can also use the following code to get the x- and y-coordinates from lParam:
///
/// xPos = GET_X_LPARAM(lParam); yPos = GET_Y_LPARAM(lParam);
///
///
/// Important
///
/// Do not use the LOWORD or HIWORD macros to extract the x- and y- coordinates of the cursor position because
/// these macros return incorrect results on systems with multiple monitors. Systems with multiple monitors can have negative x-
/// and y- coordinates, and LOWORD and HIWORD treat the coordinates as unsigned quantities.
///
///
///
/// By default, the DefWindowProc function tests the specified point to get the position of the cursor and performs the
/// appropriate action. If appropriate, it sends the WM_SYSCOMMAND message to the window.
///
///
/// A window need not have the CS_DBLCLKS style to receive WM_NCXBUTTONDBLCLK messages. The system generates a
/// WM_NCXBUTTONDBLCLK message when the user presses, releases, and again presses an X button within the system's
/// double-click time limit. Double-clicking one of these buttons actually generates four messages: WM_NCXBUTTONDOWN,
/// WM_NCXBUTTONUP, WM_NCXBUTTONDBLCLK, and WM_NCXBUTTONUP again.
///
///
/// Unlike the WM_NCLBUTTONDBLCLK, WM_NCMBUTTONDBLCLK, and WM_NCRBUTTONDBLCLK messages, an application
/// should return TRUE from this message if it processes it. Doing so will allow software that simulates this message on
/// Windows systems earlier than Windows 2000 to determine whether the window procedure processed the message or called
/// DefWindowProc to process it.
///
///
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-ncxbuttondblclk
WM_NCXBUTTONDBLCLK = 0x00AD,
///
/// Simulates the user clicking a button. This message causes the button to receive the WM_LBUTTONDOWN and
/// WM_LBUTTONUP messages, and the button's parent window to receive a BN_CLICKED notification code.
///
/// Parameters
/// wParam
/// Not used; must be zero.
/// lParam
/// Not used; must be zero.
/// Returns
/// This message does not return a value.
///
/// If the button is in a dialog box and the dialog box is not active, the BM_CLICK message might fail. To ensure success
/// in this situation, call the SetActiveWindow function to activate the dialog box before sending the BM_CLICK
/// message to the button.
///
// https://docs.microsoft.com/en-us/windows/win32/controls/bm-click
WM_BM_CLICK = 0x00F5,
///
/// Sent to the window that registered to receive raw input.
///
/// Raw input notifications are available only after the application calls RegisterRawInputDevices with RIDEV_DEVNOTIFY flag.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_INPUT_DEVICE_CHANGE 0x00FE
///
///
/// Parameters
/// wParam
/// Type: WPARAM
/// This parameter can be one of the following values.
///
///
/// Value
/// Meaning
///
/// -
/// GIDC_ARRIVAL 1
///
/// A new device has been added to the system. You can call GetRawInputDeviceInfo to get more information regarding the device.
///
///
/// -
/// GIDC_REMOVAL 2
/// A device has been removed from the system.
///
///
/// lParam
/// Type: LPARAM
/// The HANDLE to the raw input device.
/// Returns
/// If an application processes this message, it should return zero.
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-input-device-change
WM_INPUT_DEVICE_CHANGE = 0x00FE,
///
/// Sent to the window that is getting raw input.
/// A window receives this message through its WindowProc function.
///
/// #define WM_INPUT 0x00FF
///
///
/// Parameters
/// wParam
/// The input code. Use GET_RAWINPUT_CODE_WPARAM macro to get the value.
/// Can be one of the following values:
///
///
/// Value
/// Meaning
///
/// -
/// RIM_INPUT 0
///
/// Input occurred while the application was in the foreground. The application must call DefWindowProc so the system can
/// perform cleanup.
///
///
/// -
/// RIM_INPUTSINK 1
/// Input occurred while the application was not in the foreground.
///
///
/// lParam
///
/// A HRAWINPUT handle to the RAWINPUT structure that contains the raw input from the device. To get the raw data,
/// use this handle in the call to GetRawInputData.
///
/// Returns
/// If an application processes this message, it should return zero.
/// Raw input is available only when the application calls RegisterRawInputDevices with valid device specifications.
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-input
WM_INPUT = 0x00FF,
///
///
/// Posted to the window with the keyboard focus when a nonsystem key is pressed. A nonsystem key is a key that is pressed when
/// the ALT key is not pressed.
///
///
/// #define WM_KEYDOWN 0x0100
///
///
/// Parameters
/// wParam
/// The virtual-key code of the nonsystem key. See Virtual-Key Codes.
/// lParam
///
/// The repeat count, scan code, extended-key flag, context code, previous key-state flag, and transition-state flag, as shown following.
///
///
///
/// Bits
/// Meaning
///
/// -
/// 0-15
///
/// The repeat count for the current message. The value is the number of times the keystroke is autorepeated as a result of the
/// user holding down the key. If the keystroke is held long enough, multiple messages are sent. However, the repeat count is not cumulative.
///
///
/// -
/// 16-23
/// The scan code. The value depends on the OEM.
///
/// -
/// 24
///
/// Indicates whether the key is an extended key, such as the right-hand ALT and CTRL keys that appear on an enhanced 101- or
/// 102-key keyboard. The value is 1 if it is an extended key; otherwise, it is 0.
///
///
/// -
/// 25-28
/// Reserved; do not use.
///
/// -
/// 29
/// The context code. The value is always 0 for a WM_KEYDOWN message.
///
/// -
/// 30
/// The previous key state. The value is 1 if the key is down before the message is sent, or it is zero if the key is up.
///
/// -
/// 31
/// The transition state. The value is always 0 for a WM_KEYDOWN message.
///
///
/// For more detail, see Keystroke Message Flags.
/// Returns
/// An application should return zero if it processes this message.
///
///
/// If the F10 key is pressed, the DefWindowProc function sets an internal flag. When DefWindowProc receives the
/// WM_KEYUP message, the function checks whether the internal flag is set and, if so, sends a WM_SYSCOMMAND
/// message to the top-level window. The WM_SYSCOMMAND parameter of the message is set to SC_KEYMENU.
///
///
/// Because of the autorepeat feature, more than one WM_KEYDOWN message may be posted before a WM_KEYUP message is
/// posted. The previous key state (bit 30) can be used to determine whether the WM_KEYDOWN message indicates the first
/// down transition or a repeated down transition.
///
///
/// For enhanced 101- and 102-key keyboards, extended keys are the right ALT and CTRL keys on the main section of the keyboard;
/// the INS, DEL, HOME, END, PAGE UP, PAGE DOWN, and arrow keys in the clusters to the left of the numeric keypad; and the divide
/// (/) and ENTER keys in the numeric keypad. Other keyboards may support the extended-key bit in the lParam parameter.
///
/// Applications must pass wParam to TranslateMessage without altering it at all.
///
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-keydown
WM_KEYFIRST = 0x0100,
///
///
/// Posted to the window with the keyboard focus when a nonsystem key is pressed. A nonsystem key is a key that is pressed when
/// the ALT key is not pressed.
///
///
/// #define WM_KEYDOWN 0x0100
///
///
/// Parameters
/// wParam
/// The virtual-key code of the nonsystem key. See Virtual-Key Codes.
/// lParam
///
/// The repeat count, scan code, extended-key flag, context code, previous key-state flag, and transition-state flag, as shown following.
///
///
///
/// Bits
/// Meaning
///
/// -
/// 0-15
///
/// The repeat count for the current message. The value is the number of times the keystroke is autorepeated as a result of the
/// user holding down the key. If the keystroke is held long enough, multiple messages are sent. However, the repeat count is not cumulative.
///
///
/// -
/// 16-23
/// The scan code. The value depends on the OEM.
///
/// -
/// 24
///
/// Indicates whether the key is an extended key, such as the right-hand ALT and CTRL keys that appear on an enhanced 101- or
/// 102-key keyboard. The value is 1 if it is an extended key; otherwise, it is 0.
///
///
/// -
/// 25-28
/// Reserved; do not use.
///
/// -
/// 29
/// The context code. The value is always 0 for a WM_KEYDOWN message.
///
/// -
/// 30
/// The previous key state. The value is 1 if the key is down before the message is sent, or it is zero if the key is up.
///
/// -
/// 31
/// The transition state. The value is always 0 for a WM_KEYDOWN message.
///
///
/// For more detail, see Keystroke Message Flags.
/// Returns
/// An application should return zero if it processes this message.
///
///
/// If the F10 key is pressed, the DefWindowProc function sets an internal flag. When DefWindowProc receives the
/// WM_KEYUP message, the function checks whether the internal flag is set and, if so, sends a WM_SYSCOMMAND
/// message to the top-level window. The WM_SYSCOMMAND parameter of the message is set to SC_KEYMENU.
///
///
/// Because of the autorepeat feature, more than one WM_KEYDOWN message may be posted before a WM_KEYUP message is
/// posted. The previous key state (bit 30) can be used to determine whether the WM_KEYDOWN message indicates the first
/// down transition or a repeated down transition.
///
///
/// For enhanced 101- and 102-key keyboards, extended keys are the right ALT and CTRL keys on the main section of the keyboard;
/// the INS, DEL, HOME, END, PAGE UP, PAGE DOWN, and arrow keys in the clusters to the left of the numeric keypad; and the divide
/// (/) and ENTER keys in the numeric keypad. Other keyboards may support the extended-key bit in the lParam parameter.
///
/// Applications must pass wParam to TranslateMessage without altering it at all.
///
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-keydown
WM_KEYDOWN = 0x0100,
///
///
/// Posted to the window with the keyboard focus when a nonsystem key is released. A nonsystem key is a key that is pressed when
/// the ALT key is not pressed, or a keyboard key that is pressed when a window has the keyboard focus.
///
///
/// #define WM_KEYUP 0x0101
///
///
/// Parameters
/// wParam
/// The virtual-key code of the nonsystem key. See Virtual-Key Codes.
/// lParam
///
/// The repeat count, scan code, extended-key flag, context code, previous key-state flag, and transition-state flag, as shown in
/// the following table.
///
///
///
/// Bits
/// Meaning
///
/// -
/// 0-15
///
/// The repeat count for the current message. The value is the number of times the keystroke is autorepeated as a result of the
/// user holding down the key. The repeat count is always 1 for a WM_KEYUP message.
///
///
/// -
/// 16-23
/// The scan code. The value depends on the OEM.
///
/// -
/// 24
///
/// Indicates whether the key is an extended key, such as the right-hand ALT and CTRL keys that appear on an enhanced 101- or
/// 102-key keyboard. The value is 1 if it is an extended key; otherwise, it is 0.
///
///
/// -
/// 25-28
/// Reserved; do not use.
///
/// -
/// 29
/// The context code. The value is always 0 for a WM_KEYUP message.
///
/// -
/// 30
/// The previous key state. The value is always 1 for a WM_KEYUP message.
///
/// -
/// 31
/// The transition state. The value is always 1 for a WM_KEYUP message.
///
///
/// For more detail, see Keystroke Message Flags.
/// Returns
/// An application should return zero if it processes this message.
///
///
/// The DefWindowProc function sends a WM_SYSCOMMAND message to the top-level window if the F10 key or the ALT key
/// was released. The wParam parameter of the message is set to SC_KEYMENU.
///
///
/// For enhanced 101- and 102-key keyboards, extended keys are the right ALT and CTRL keys on the main section of the keyboard;
/// the INS, DEL, HOME, END, PAGE UP, PAGE DOWN, and arrow keys in the clusters to the left of the numeric keypad; and the divide
/// (/) and ENTER keys in the numeric keypad. Other keyboards may support the extended-key bit in the lParam parameter.
///
/// Applications must pass wParam to TranslateMessage without altering it at all.
///
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-keyup
WM_KEYUP = 0x0101,
///
///
/// Posted to the window with the keyboard focus when a WM_KEYDOWN message is translated by the TranslateMessage
/// function. The WM_CHAR message contains the character code of the key that was pressed.
///
///
/// #define WM_CHAR 0x0102
///
///
/// Parameters
/// wParam
/// The character code of the key.
/// lParam
///
/// The repeat count, scan code, extended-key flag, context code, previous key-state flag, and transition-state flag, as shown in
/// the following table.
///
///
///
/// Bits
/// Meaning
///
/// -
/// 0-15
///
/// The repeat count for the current message. The value is the number of times the keystroke is autorepeated as a result of the
/// user holding down the key. If the keystroke is held long enough, multiple messages are sent. However, the repeat count is not cumulative.
///
///
/// -
/// 16-23
/// The scan code. The value depends on the OEM.
///
/// -
/// 24
///
/// Indicates whether the key is an extended key, such as the right-hand ALT and CTRL keys that appear on an enhanced 101- or
/// 102-key keyboard. The value is 1 if it is an extended key; otherwise, it is 0.
///
///
/// -
/// 25-28
/// Reserved; do not use.
///
/// -
/// 29
/// The context code. The value is 1 if the ALT key is held down while the key is pressed; otherwise, the value is 0.
///
/// -
/// 30
/// The previous key state. The value is 1 if the key is down before the message is sent, or it is 0 if the key is up.
///
/// -
/// 31
/// The transition state. The value is 1 if the key is being released, or it is 0 if the key is being pressed.
///
///
/// For more detail, see Keystroke Message Flags.
/// Returns
/// An application should return zero if it processes this message.
///
/// The WM_CHAR message uses Unicode Transformation Format (UTF)-16.
///
/// There is not necessarily a one-to-one correspondence between keys pressed and character messages generated, and so the
/// information in the high-order word of the lParam parameter is generally not useful to applications. The information in the
/// high-order word applies only to the most recent WM_KEYDOWN message that precedes the posting of the WM_CHAR message.
///
///
/// For enhanced 101- and 102-key keyboards, extended keys are the right ALT and the right CTRL keys on the main section of the
/// keyboard; the INS, DEL, HOME, END, PAGE UP, PAGE DOWN and arrow keys in the clusters to the left of the numeric keypad; and
/// the divide (/) and ENTER keys in the numeric keypad. Some other keyboards may support the extended-key bit in the lParam parameter.
///
///
/// The WM_UNICHAR message is the same as WM_CHAR, except it uses UTF-32. It is designed to send or post Unicode
/// characters to ANSI windows, and it can handle Unicode Supplementary Plane characters.
///
///
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-char
WM_CHAR = 0x0102,
///
///
/// Posted to the window with the keyboard focus when a WM_KEYUP message is translated by the TranslateMessage
/// function. WM_DEADCHAR specifies a character code generated by a dead key. A dead key is a key that generates a
/// character, such as the umlaut (double-dot), that is combined with another character to form a composite character. For
/// example, the umlaut-O character ( ) is generated by typing the dead key for the umlaut character, and then typing the O key.
///
///
/// #define WM_DEADCHAR 0x0103
///
///
/// Parameters
/// wParam
/// The character code generated by the dead key.
/// lParam
///
/// The repeat count, scan code, extended-key flag, context code, previous key-state flag, and transition-state flag, as shown in
/// the following table.
///
///
///
/// Bits
/// Meaning
///
/// -
/// 0-15
///
/// The repeat count for the current message. The value is the number of times the keystroke is autorepeated as a result of the
/// user holding down the key. If the keystroke is held long enough, multiple messages are sent. However, the repeat count is not cumulative.
///
///
/// -
/// 16-23
/// The scan code. The value depends on the OEM.
///
/// -
/// 24
///
/// Indicates whether the key is an extended key, such as the right-hand ALT and CTRL keys that appear on an enhanced 101- or
/// 102-key keyboard. The value is 1 if it is an extended key; otherwise, it is 0.
///
///
/// -
/// 25-28
/// Reserved; do not use.
///
/// -
/// 29
/// The context code. The value is 1 if the ALT key is held down while the key is pressed; otherwise, the value is 0.
///
/// -
/// 30
/// The previous key state. The value is 1 if the key is down before the message is sent, or it is 0 if the key is up.
///
/// -
/// 31
/// The transition state. The value is 1 if the key is being released, or it is 0 if the key is being pressed.
///
///
/// For more detail, see Keystroke Message Flags.
/// Returns
/// An application should return zero if it processes this message.
///
///
/// The WM_DEADCHAR message typically is used by applications to give the user feedback about each key pressed. For
/// example, an application can display the accent in the current character position without moving the caret.
///
///
/// Because there is not necessarily a one-to-one correspondence between keys pressed and character messages generated, the
/// information in the high-order word of the lParam parameter is generally not useful to applications. The information in the
/// high-order word applies only to the most recent WM_KEYDOWN message that precedes the posting of the WM_DEADCHAR message.
///
///
/// For enhanced 101- and 102-key keyboards, extended keys are the right ALT and the right CTRL keys on the main section of the
/// keyboard; the INS, DEL, HOME, END, PAGE UP, PAGE DOWN and arrow keys in the clusters to the left of the numeric keypad; and
/// the divide (/) and ENTER keys in the numeric keypad. Some other keyboards may support the extended-key bit in the lParam parameter.
///
///
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-deadchar
WM_DEADCHAR = 0x0103,
///
///
/// Posted to the window with the keyboard focus when the user presses the F10 key (which activates the menu bar) or holds down
/// the ALT key and then presses another key. It also occurs when no window currently has the keyboard focus; in this case, the
/// WM_SYSKEYDOWN message is sent to the active window. The window that receives the message can distinguish between these
/// two contexts by checking the context code in the lParam parameter.
///
///
/// #define WM_SYSKEYDOWN 0x0104
///
///
/// Parameters
/// wParam
/// The virtual-key code of the key being pressed. See Virtual-Key Codes.
/// lParam
///
/// The repeat count, scan code, extended-key flag, context code, previous key-state flag, and transition-state flag, as shown in
/// the following table.
///
///
///
/// Bits
/// Meaning
///
/// -
/// 0-15
///
/// The repeat count for the current message. The value is the number of times the keystroke is autorepeated as a result of the
/// user holding down the key. If the keystroke is held long enough, multiple messages are sent. However, the repeat count is not cumulative.
///
///
/// -
/// 16-23
/// The scan code. The value depends on the OEM.
///
/// -
/// 24
///
/// Indicates whether the key is an extended key, such as the right-hand ALT and CTRL keys that appear on an enhanced 101- or
/// 102-key keyboard. The value is 1 if it is an extended key; otherwise, it is 0.
///
///
/// -
/// 25-28
/// Reserved; do not use.
///
/// -
/// 29
///
/// The context code. The value is 1 if the ALT key is down while the key is pressed; it is 0 if the WM_SYSKEYDOWN message
/// is posted to the active window because no window has the keyboard focus.
///
///
/// -
/// 30
/// The previous key state. The value is 1 if the key is down before the message is sent, or it is 0 if the key is up.
///
/// -
/// 31
/// The transition state. The value is always 0 for a WM_SYSKEYDOWN message.
///
///
/// For more detail, see Keystroke Message Flags.
/// Returns
/// An application should return zero if it processes this message.
///
///
/// The DefWindowProc function examines the specified key and generates a WM_SYSCOMMAND message if the key is
/// either TAB or ENTER.
///
///
/// When the context code is zero, the message can be passed to the TranslateAccelerator function, which will handle it as
/// though it were a normal key message instead of a character-key message. This allows accelerator keys to be used with the
/// active window even if the active window does not have the keyboard focus.
///
///
/// Because of automatic repeat, more than one WM_SYSKEYDOWN message may occur before a WM_SYSKEYUP message is
/// sent. The previous key state (bit 30) can be used to determine whether the WM_SYSKEYDOWN message indicates the first
/// down transition or a repeated down transition.
///
///
/// For enhanced 101- and 102-key keyboards, enhanced keys are the right ALT and CTRL keys on the main section of the keyboard;
/// the INS, DEL, HOME, END, PAGE UP, PAGE DOWN, and arrow keys in the clusters to the left of the numeric keypad; and the divide
/// (/) and ENTER keys in the numeric keypad. Other keyboards may support the extended-key bit in the lParam parameter.
///
/// This message is also sent whenever the user presses the F10 key without the ALT key.
///
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-syskeydown
WM_SYSKEYDOWN = 0x0104,
///
///
/// Posted to the window with the keyboard focus when the user releases a key that was pressed while the ALT key was held down.
/// It also occurs when no window currently has the keyboard focus; in this case, the WM_SYSKEYUP message is sent to the
/// active window. The window that receives the message can distinguish between these two contexts by checking the context code
/// in the lParam parameter.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_SYSKEYUP 0x0105
///
///
/// Parameters
/// wParam
/// The virtual-key code of the key being released. See Virtual-Key Codes.
/// lParam
///
/// The repeat count, scan code, extended-key flag, context code, previous key-state flag, and transition-state flag, as shown in
/// the following table.
///
///
///
/// Bits
/// Meaning
///
/// -
/// 0-15
///
/// The repeat count for the current message. The value is the number of times the keystroke is autorepeated as a result of the
/// user holding down the key. The repeat count is always one for a WM_SYSKEYUP message.
///
///
/// -
/// 16-23
/// The scan code. The value depends on the OEM.
///
/// -
/// 24
///
/// Indicates whether the key is an extended key, such as the right-hand ALT and CTRL keys that appear on an enhanced 101- or
/// 102-key keyboard. The value is 1 if it is an extended key; otherwise, it is zero.
///
///
/// -
/// 25-28
/// Reserved; do not use.
///
/// -
/// 29
///
/// The context code. The value is 1 if the ALT key is down while the key is released; it is zero if the WM_SYSKEYUP
/// message is posted to the active window because no window has the keyboard focus.
///
///
/// -
/// 30
/// The previous key state. The value is always 1 for a WM_SYSKEYUP message.
///
/// -
/// 31
/// The transition state. The value is always 1 for a WM_SYSKEYUP message.
///
///
/// For more details, see Keystroke Message Flags.
/// Returns
/// An application should return zero if it processes this message.
///
///
/// The DefWindowProc function sends a WM_SYSCOMMAND message to the top-level window if the F10 key or the ALT key
/// was released. The wParam parameter of the message is set to SC_KEYMENU.
///
///
/// When the context code is zero, the message can be passed to the TranslateAccelerator function, which will handle it as
/// though it were a normal key message instead of a character-key message. This allows accelerator keys to be used with the
/// active window even if the active window does not have the keyboard focus.
///
///
/// For enhanced 101- and 102-key keyboards, extended keys are the right ALT and CTRL keys on the main section of the keyboard;
/// the INS, DEL, HOME, END, PAGE UP, PAGE DOWN, and arrow keys in the clusters to the left of the numeric keypad; and the divide
/// (/) and ENTER keys in the numeric keypad. Other keyboards may support the extended-key bit in the lParam parameter.
///
///
/// For non-U.S. enhanced 102-key keyboards, the right ALT key is handled as a CTRL+ALT key. The following table shows the
/// sequence of messages that result when the user presses and releases this key.
///
///
///
/// Message
/// Virtual-key code
///
/// -
/// WM_KEYDOWN
/// VK_CONTROL
///
/// -
/// WM_KEYDOWN
/// VK_MENU
///
/// -
/// WM_KEYUP
/// VK_CONTROL
///
/// -
/// WM_SYSKEYUP
/// VK_MENU
///
///
///
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-syskeyup
WM_SYSKEYUP = 0x0105,
///
///
/// Posted to the window with the keyboard focus when a WM_SYSKEYDOWN message is translated by the TranslateMessage
/// function. It specifies the character code of a system character key that is, a character key that is pressed while the ALT
/// key is down.
///
///
/// #define WM_SYSCHAR 0x0106
///
///
/// Parameters
/// wParam
/// The character code of the window menu key.
/// lParam
///
/// The repeat count, scan code, extended-key flag, context code, previous key-state flag, and transition-state flag, as shown in
/// the following table.
///
///
///
/// Bits
/// Meaning
///
/// -
/// 0 15
///
/// The repeat count for the current message. The value is the number of times the keystroke was auto-repeated as a result of the
/// user holding down the key. If the keystroke is held long enough, multiple messages are sent. However, the repeat count is not cumulative.
///
///
/// -
/// 16 23
/// The scan code. The value depends on the original equipment manufacturer (OEM).
///
/// -
/// 24
///
/// Indicates whether the key is an extended key, such as the right-hand ALT and CTRL keys that appear on an enhanced 101- or
/// 102-key keyboard. The value is 1 if it is an extended key; otherwise, it is 0.
///
///
/// -
/// 25 28
/// Reserved; do not use.
///
/// -
/// 29
/// The context code. The value is 1 if the ALT key is held down while the key is pressed; otherwise, the value is 0.
///
/// -
/// 30
/// The previous key state. The value is 1 if the key is down before the message is sent, or it is 0 if the key is up.
///
/// -
/// 31
/// The transition state. The value is 1 if the key is being released, or it is 0 if the key is being pressed.
///
///
/// For more detail, see Keystroke Message Flags.
/// Returns
/// An application should return zero if it processes this message.
///
///
/// When the context code is zero, the message can be passed to the TranslateAccelerator function, which will handle it as
/// though it were a standard key message instead of a system character-key message. This allows accelerator keys to be used with
/// the active window even if the active window does not have the keyboard focus.
///
///
/// For enhanced 101- and 102-key keyboards, extended keys are the right ALT and CTRL keys on the main section of the keyboard;
/// the INS, DEL, HOME, END, PAGE UP, PAGE DOWN and arrow keys in the clusters to the left of the numeric keypad; the PRINT SCRN
/// key; the BREAK key; the NUMLOCK key; and the divide (/) and ENTER keys in the numeric keypad. Other keyboards may support the
/// extended-key bit in the parameter.
///
///
// https://docs.microsoft.com/en-us/windows/win32/menurc/wm-syschar
WM_SYSCHAR = 0x0106,
///
///
/// Sent to the window with the keyboard focus when a WM_SYSKEYDOWN message is translated by the TranslateMessage
/// function. WM_SYSDEADCHAR specifies the character code of a system dead key that is, a dead key that is pressed while
/// holding down the ALT key.
///
///
/// #define WM_SYSDEADCHAR 0x0107
///
///
/// Parameters
/// wParam
///
/// The character code generated by the system dead key that is, a dead key that is pressed while holding down the ALT key.
///
/// lParam
///
/// The repeat count, scan code, extended-key flag, context code, previous key-state flag, and transition-state flag, as shown in
/// the following table.
///
///
///
/// Bits
/// Meaning
///
/// -
/// 0-15
///
/// The repeat count for the current message. The value is the number of times the keystroke is autorepeated as a result of the
/// user holding down the key. If the keystroke is held long enough, multiple messages are sent. However, the repeat count is not cumulative.
///
///
/// -
/// 16-23
/// The scan code. The value depends on the OEM.
///
/// -
/// 24
///
/// Indicates whether the key is an extended key, such as the right-hand ALT and CTRL keys that appear on an enhanced 101- or
/// 102-key keyboard. The value is 1 if it is an extended key; otherwise, it is 0.
///
///
/// -
/// 25-28
/// Reserved; do not use.
///
/// -
/// 29
/// The context code. The value is 1 if the ALT key is held down while the key is pressed; otherwise, the value is 0.
///
/// -
/// 30
/// The previous key state. The value is 1 if the key is down before the message is sent, or it is 0 if the key is up.
///
/// -
/// 31
/// Transition state. The value is 1 if the key is being released, or it is 0 if the key is being pressed.
///
///
/// For more detail, see Keystroke Message Flags.
/// Returns
/// An application should return zero if it processes this message.
///
/// For enhanced 101- and 102-key keyboards, extended keys are the right ALT and CTRL keys on the main section of the keyboard;
/// the INS, DEL, HOME, END, PAGE UP, PAGE DOWN, and arrow keys in the clusters to the left of the numeric keypad; and the divide
/// (/) and ENTER keys in the numeric keypad. Other keyboards may support the extended-key bit in the lParam parameter.
///
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-sysdeadchar
WM_SYSDEADCHAR = 0x0107,
///
///
/// The WM_UNICHAR message can be used by an application to post input to other windows. This message contains the
/// character code of the key that was pressed. (Test whether a target app can process WM_UNICHAR messages by sending the
/// message with wParam set to UNICODE_NOCHAR.)
///
///
/// #define WM_UNICHAR 0x0109
///
///
/// Parameters
/// wParam
/// The character code of the key.
///
/// If wParam is UNICODE_NOCHAR and the application processes this message, then return TRUE. The
/// DefWindowProc function will return FALSE (the default).
///
///
/// If wParam is not UNICODE_NOCHAR, return FALSE. The Unicode DefWindowProc posts a WM_CHAR message
/// with the same parameters and the ANSI DefWindowProc function posts either one or two WM_CHAR messages with the
/// corresponding ANSI character(s).
///
/// lParam
///
/// The repeat count, scan code, extended-key flag, context code, previous key-state flag, and transition-state flag, as shown in
/// the following table.
///
///
///
/// Bits
/// Meaning
///
/// -
/// 0-15
///
/// The repeat count for the current message. The value is the number of times the keystroke is autorepeated as a result of the
/// user holding down the key. If the keystroke is held long enough, multiple messages are sent. However, the repeat count is not cumulative.
///
///
/// -
/// 16-23
/// The scan code. The value depends on the OEM.
///
/// -
/// 24
///
/// Indicates whether the key is an extended key, such as the right-hand ALT and CTRL keys that appear on an enhanced 101- or
/// 102-key keyboard. The value is 1 if it is an extended key; otherwise, it is 0.
///
///
/// -
/// 25-28
/// Reserved; do not use.
///
/// -
/// 29
/// The context code. The value is 1 if the ALT key is held down while the key is pressed; otherwise, the value is 0.
///
/// -
/// 30
/// The previous key state. The value is 1 if the key is down before the message is sent, or it is 0 if the key is up.
///
/// -
/// 31
/// The transition state. The value is 1 if the key is being released, or it is 0 if the key is being pressed.
///
///
/// For more detail, see Keystroke Message Flags.
/// Returns
/// An application should return zero if it processes this message.
///
///
/// The WM_UNICHAR message is similar to WM_CHAR, but it uses Unicode Transformation Format (UTF)-32, whereas
/// WM_CHAR uses UTF-16.
///
///
/// This message is designed to send or post Unicode characters to ANSI windows and can handle Unicode Supplementary Plane characters.
///
///
/// Because there is not necessarily a one-to-one correspondence between keys pressed and character messages generated, the
/// information in the high-order word of the lParam parameter is generally not useful to applications. The information in the
/// high-order word applies only to the most recent WM_KEYDOWN message that precedes the posting of the WM_UNICHAR message.
///
///
/// For enhanced 101- and 102-key keyboards, extended keys are the right ALT and the right CTRL keys on the main section of the
/// keyboard; the INS, DEL, HOME, END, PAGE UP, PAGE DOWN and arrow keys in the clusters to the left of the numeric keypad; and
/// the divide (/) and ENTER keys in the numeric keypad. Some other keyboards may support the extended-key bit in the lParam parameter.
///
///
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-unichar
WM_UNICHAR = 0x0109,
/// Keyboard message filter value.
///
/// Use the WM_KEYFIRST and WM_KEYLAST messages to filter for keyboard messages when using the GetMessage and PeekMessage functions.
///
WM_KEYLAST = 0x0109,
///
///
/// Sent immediately before the IME generates the composition string as a result of a keystroke. A window receives this message
/// through its WindowProc function.
///
///
/// LRESULT CALLBACK WindowProc( HWND hwnd, WM_IME_STARTCOMPOSITION, WPARAM wParam, LPARAM lParam );
///
///
/// Parameters
/// Returns
/// This message has no return value.
///
///
/// This message is a notification to an IME window to open its composition window. An application should process this message if
/// it displays composition characters itself.
///
///
/// If an application has created an IME window, it should pass this message to that window. The DefWindowProc function
/// processes the message by passing it to the default IME window.
///
///
// https://docs.microsoft.com/en-us/windows/win32/intl/wm-ime-startcomposition
WM_IME_STARTCOMPOSITION = 0x010D,
///
///
/// Sent to an application when the IME ends composition. A window receives this message through its WindowProc function.
///
///
/// LRESULT CALLBACK WindowProc( HWND hwnd, WM_IME_ENDCOMPOSITION, WPARAM wParam, LPARAM lParam );
///
///
/// Parameters
/// Returns
/// This message has no return value.
///
/// An application should process this message if it displays composition characters itself.
///
/// If the application has created an IME window, it should pass this message to that window. The DefWindowProc function
/// processes this message by passing it to the default IME window.
///
///
// https://docs.microsoft.com/en-us/windows/win32/intl/wm-ime-endcomposition
WM_IME_ENDCOMPOSITION = 0x010E,
///
///
/// Sent to an application when the IME changes composition status as a result of a keystroke. A window receives this message
/// through its WindowProc function.
///
///
/// LRESULT CALLBACK WindowProc( HWND hwnd, WM_IME_COMPOSITION, WPARAM wParam, LPARAM lParam );
///
///
/// Parameters
/// hwnd
/// A handle to window.
/// wParam
/// DBCS character representing the latest change to the composition string.
/// lParam
///
/// Value specifying how the composition string or character changed. This parameter can be one or more of the following values.
/// For more information about these values, see IME Composition String Values.
///
///
/// The lParam parameter can also have one or more of the following values.
///
///
/// Value
/// Meaning
///
/// -
/// CS_INSERTCHAR
///
/// Insert the wParam composition character at the current insertion point. An application should display the composition
/// character if it processes this message.
///
///
/// -
/// CS_NOMOVECARET
///
/// Do not move the caret position as a result of processing the message. For example, if an IME specifies a combination of
/// CS_INSERTCHAR and CS_NOMOVECARET, the application should insert the specified character at the current caret position but
/// should not move the caret to the next position. A subsequent WM_IME_COMPOSITION message with GCS_RESULTSTR will replace this character.
///
///
///
/// Returns
/// This message has no return value.
///
///
/// An application should process this message if it displays composition characters itself. Otherwise, it should send the
/// message to the IME window.
///
///
/// If the application has created an IME window, it should pass this message to that window. The DefWindowProc function
/// processes this message by passing it to the default IME window. The IME window processes this message by updating its
/// appearance based on the change flag specified. An application can call ImmGetCompositionString to retrieve the new
/// composition status.
///
///
/// If none of the GCS_ values are set, the message indicates that the current composition has been canceled and applications
/// that draw the composition string should delete the string.
///
///
// https://docs.microsoft.com/en-us/windows/win32/intl/wm-ime-composition
WM_IME_COMPOSITION = 0x010F,
///
WM_IME_KEYLAST = 0x010F,
///
///
/// Sent to the dialog box procedure immediately before a dialog box is displayed. Dialog box procedures typically use this
/// message to initialize controls and carry out any other initialization tasks that affect the appearance of the dialog box.
///
///
/// #define WM_INITDIALOG 0x0110
///
///
/// Parameters
/// wParam
///
/// A handle to the control to receive the default keyboard focus. The system assigns the default keyboard focus only if the
/// dialog box procedure returns TRUE.
///
/// lParam
///
/// Additional initialization data. This data is passed to the system as the lParam parameter in a call to the
/// CreateDialogIndirectParam, CreateDialogParam, DialogBoxIndirectParam, or DialogBoxParam function
/// used to create the dialog box. For property sheets, this parameter is a pointer to the PROPSHEETPAGE structure used to
/// create the page. This parameter is zero if any other dialog box creation function is used.
///
/// Returns
///
/// The dialog box procedure should return TRUE to direct the system to set the keyboard focus to the control specified by
/// wParam. Otherwise, it should return FALSE to prevent the system from setting the default keyboard focus.
///
///
/// The dialog box procedure should return the value directly. The DWL_MSGRESULT value set by the SetWindowLong
/// function is ignored.
///
///
///
/// The control to receive the default keyboard focus is always the first control in the dialog box that is visible, not
/// disabled, and that has the WS_TABSTOP style. When the dialog box procedure returns TRUE, the system checks the
/// control to ensure that the procedure has not disabled it. If it has been disabled, the system sets the keyboard focus to the
/// next control that is visible, not disabled, and has the WS_TABSTOP.
///
/// An application can return FALSE only if it has set the keyboard focus to one of the controls of the dialog box.
///
// https://docs.microsoft.com/en-us/windows/win32/dlgbox/wm-initdialog
WM_INITDIALOG = 0x0110,
///
///
/// Sent when the user selects a command item from a menu, when a control sends a notification message to its parent window, or
/// when an accelerator keystroke is translated.
///
///
/// #define WM_COMMAND 0x0111
///
///
/// Parameters
/// wParam
/// For a description of this parameter, see Remarks.
/// lParam
/// For a description of this parameter, see Remarks.
/// Returns
/// If an application processes this message, it should return zero.
///
/// Use of the wParam and lParam parameters are summarized here.
///
///
/// Message Source
/// wParam (high word)
/// wParam (low word)
/// lParam
///
/// -
/// Menu
/// 0
/// Menu identifier (IDM_*)
/// 0
///
/// -
/// Accelerator
/// 1
/// Accelerator identifier (IDM_*)
/// 0
///
/// -
/// Control
/// Control-defined notification code
/// Control identifier
/// Handle to the control window
///
///
/// Menus
///
/// If an application enables a menu separator, the system sends a WM_COMMAND message with the low-word of the wParam
/// parameter set to zero when the user selects the separator.
///
///
/// If a menu is defined with a MENUINFO.dwStyle value of MNS_NOTIFYBYPOS, WM_MENUCOMMAND is sent instead of WM_COMMAND.
///
/// Accelerators
/// Accelerator keystrokes that select items from the window menu are translated into WM_SYSCOMMAND messages.
///
/// If an accelerator keystroke occurs that corresponds to a menu item when the window that owns the menu is minimized, no
/// WM_COMMAND message is sent. However, if an accelerator keystroke occurs that does not match any of the items in the
/// window's menu or in the window menu, a WM_COMMAND message is sent, even if the window is minimized.
///
///
// https://docs.microsoft.com/en-us/windows/win32/menurc/wm-command
WM_COMMAND = 0x0111,
///
///
/// A window receives this message when the user chooses a command from the Window menu (formerly known as the system or
/// control menu) or when the user chooses the maximize button, minimize button, restore button, or close button.
///
///
/// #define WM_SYSCOMMAND 0x0112
///
///
/// Parameters
/// wParam
/// The type of system command requested. This parameter can be one of the following values.
///
///
/// Value
/// Meaning
///
/// -
/// SC_CLOSE 0xF060
/// Closes the window.
///
/// -
/// SC_CONTEXTHELP 0xF180
///
/// Changes the cursor to a question mark with a pointer. If the user then clicks a control in the dialog box, the control
/// receives a WM_HELP message.
///
///
/// -
/// SC_DEFAULT 0xF160
/// Selects the default item; the user double-clicked the window menu.
///
/// -
/// SC_HOTKEY 0xF150
///
/// Activates the window associated with the application-specified hot key. The lParam parameter identifies the window to activate.
///
///
/// -
/// SC_HSCROLL 0xF080
/// Scrolls horizontally.
///
/// -
/// SCF_ISSECURE 0x00000001
/// Indicates whether the screen saver is secure.
///
/// -
/// SC_KEYMENU 0xF100
/// Retrieves the window menu as a result of a keystroke. For more information, see the Remarks section.
///
/// -
/// SC_MAXIMIZE 0xF030
/// Maximizes the window.
///
/// -
/// SC_MINIMIZE 0xF020
/// Minimizes the window.
///
/// -
/// SC_MONITORPOWER 0xF170
///
/// Sets the state of the display. This command supports devices that have power-saving features, such as a battery-powered
/// personal computer. The lParam parameter can have the following values:
///
///
/// -
/// SC_MOUSEMENU 0xF090
/// Retrieves the window menu as a result of a mouse click.
///
/// -
/// SC_MOVE 0xF010
/// Moves the window.
///
/// -
/// SC_NEXTWINDOW 0xF040
/// Moves to the next window.
///
/// -
/// SC_PREVWINDOW 0xF050
/// Moves to the previous window.
///
/// -
/// SC_RESTORE 0xF120
/// Restores the window to its normal position and size.
///
/// -
/// SC_SCREENSAVE 0xF140
/// Executes the screen saver application specified in the [boot] section of the System.ini file.
///
/// -
/// SC_SIZE 0xF000
/// Sizes the window.
///
/// -
/// SC_TASKLIST 0xF130
/// Activates the Start menu.
///
/// -
/// SC_VSCROLL 0xF070
/// Scrolls vertically.
///
///
/// lParam
///
/// The low-order word specifies the horizontal position of the cursor, in screen coordinates, if a window menu command is chosen
/// with the mouse. Otherwise, this parameter is not used.
///
///
/// The high-order word specifies the vertical position of the cursor, in screen coordinates, if a window menu command is chosen
/// with the mouse. This parameter is 1 if the command is chosen using a system accelerator, or zero if using a mnemonic.
///
/// Returns
/// An application should return zero if it processes this message.
///
/// To obtain the position coordinates in screen coordinates, use the following code:
///
/// xPos = GET_X_LPARAM(lParam); // horizontal position yPos = GET_Y_LPARAM(lParam); // vertical position
///
///
/// The DefWindowProc function carries out the window menu request for the predefined actions specified in the previous table.
///
///
/// In WM_SYSCOMMAND messages, the four low-order bits of the wParam parameter are used internally by the system. To
/// obtain the correct result when testing the value of wParam, an application must combine the value 0xFFF0 with the wParam
/// value by using the bitwise AND operator.
///
///
/// The menu items in a window menu can be modified by using the GetSystemMenu, AppendMenu, InsertMenu,
/// ModifyMenu, InsertMenuItem, and SetMenuItemInfo functions. Applications that modify the window menu must
/// process WM_SYSCOMMAND messages.
///
///
/// An application can carry out any system command at any time by passing a WM_SYSCOMMAND message to
/// DefWindowProc. Any WM_SYSCOMMAND messages not handled by the application must be passed to
/// DefWindowProc. Any command values added by an application must be processed by the application and cannot be passed to DefWindowProc.
///
///
/// If password protection is enabled by policy, the screen saver is started regardless of what an application does with the
/// SC_SCREENSAVE notification even if fails to pass it to DefWindowProc.
///
///
/// Accelerator keys that are defined to choose items from the window menu are translated into WM_SYSCOMMAND messages; all
/// other accelerator keystrokes are translated into WM_COMMAND messages.
///
///
/// If the wParam is SC_KEYMENU, lParam contains the character code of the key that is used with the ALT key to display
/// the popup menu. For example, pressing ALT+F to display the File popup will cause a WM_SYSCOMMAND with wParam equal to
/// SC_KEYMENU and lParam equal to 'f'.
///
///
// https://docs.microsoft.com/en-us/windows/win32/menurc/wm-syscommand
WM_SYSCOMMAND = 0x0112,
///
///
/// Posted to the installing thread's message queue when a timer expires. The message is posted by the GetMessage or
/// PeekMessage function.
///
///
/// #define WM_TIMER 0x0113
///
///
/// Parameters
/// wParam
/// The timer identifier.
/// lParam
///
/// A pointer to an application-defined callback function that was passed to the SetTimer function when the timer was installed.
///
/// Returns
/// Type: LRESULT
/// An application should return zero if it processes this message.
///
///
/// You can process the message by providing a WM_TIMER case in the window procedure. Otherwise, DispatchMessage
/// will call the TimerProc callback function specified in the call to the SetTimer function used to install the timer.
///
///
/// The WM_TIMER message is a low-priority message. The GetMessage and PeekMessage functions post this
/// message only when no other higher-priority messages are in the thread's message queue.
///
///
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-timer
WM_TIMER = 0x0113,
///
///
/// The WM_HSCROLL message is sent to a window when a scroll event occurs in the window's standard horizontal scroll bar.
/// This message is also sent to the owner of a horizontal scroll bar control when a scroll event occurs in the control.
///
/// A window receives this message through its WindowProc function.
///
/// WM_HSCROLL WPARAM wParam LPARAM lParam;
///
///
/// Parameters
/// wParam
///
/// The HIWORD specifies the current position of the scroll box if the LOWORD is SB_THUMBPOSITION or SB_THUMBTRACK;
/// otherwise, this word is not used.
///
///
/// The LOWORD specifies a scroll bar value that indicates the user's scrolling request. This word can be one of the
/// following values.
///
///
///
/// Value
/// Meaning
///
/// -
/// SB_ENDSCROLL
/// Ends scroll.
///
/// -
/// SB_LEFT
/// Scrolls to the upper left.
///
/// -
/// SB_RIGHT
/// Scrolls to the lower right.
///
/// -
/// SB_LINELEFT
/// Scrolls left by one unit.
///
/// -
/// SB_LINERIGHT
/// Scrolls right by one unit.
///
/// -
/// SB_PAGELEFT
/// Scrolls left by the width of the window.
///
/// -
/// SB_PAGERIGHT
/// Scrolls right by the width of the window.
///
/// -
/// SB_THUMBPOSITION
///
/// The user has dragged the scroll box (thumb) and released the mouse button. The HIWORD indicates the position of the
/// scroll box at the end of the drag operation.
///
///
/// -
/// SB_THUMBTRACK
///
/// The user is dragging the scroll box. This message is sent repeatedly until the user releases the mouse button. The
/// HIWORD indicates the position that the scroll box has been dragged to.
///
///
///
/// lParam
///
/// If the message is sent by a scroll bar control, this parameter is the handle to the scroll bar control. If the message is
/// sent by a standard scroll bar, this parameter is NULL.
///
/// Returns
/// If an application processes this message, it should return zero.
///
///
/// The SB_THUMBTRACK request code is typically used by applications that provide feedback as the user drags the scroll box.
///
///
/// If an application scrolls the content of the window, it must also reset the position of the scroll box by using the
/// SetScrollPos function.
///
///
/// Note that the WM_HSCROLL message carries only 16 bits of scroll box position data. Thus, applications that rely solely
/// on WM_HSCROLL (and WM_VSCROLL) for scroll position data have a practical maximum position value of 65,535.
///
///
/// However, because the SetScrollInfo, SetScrollPos, SetScrollRange, GetScrollInfo,
/// GetScrollPos, and GetScrollRange functions support 32-bit scroll bar position data, there is a way to
/// circumvent the 16-bit barrier of the WM_HSCROLL and WM_VSCROLL messages. See GetScrollInfo for a
/// description of the technique.
///
///
// https://docs.microsoft.com/en-us/windows/win32/controls/wm-hscroll
WM_HSCROLL = 0x0114,
///
///
/// The WM_VSCROLL message is sent to a window when a scroll event occurs in the window's standard vertical scroll bar.
/// This message is also sent to the owner of a vertical scroll bar control when a scroll event occurs in the control.
///
/// A window receives this message through its WindowProc function.
///
/// WM_VSCROLL WPARAM wParam LPARAM lParam;
///
///
/// Parameters
/// wParam
///
/// The HIWORD specifies the current position of the scroll box if the LOWORD is SB_THUMBPOSITION or SB_THUMBTRACK;
/// otherwise, this word is not used.
///
///
/// The LOWORD specifies a scroll bar value that indicates the user's scrolling request. This parameter can be one of the
/// following values.
///
///
///
/// Value
/// Meaning
///
/// -
/// SB_BOTTOM
/// Scrolls to the lower right.
///
/// -
/// SB_ENDSCROLL
/// Ends scroll.
///
/// -
/// SB_LINEDOWN
/// Scrolls one line down.
///
/// -
/// SB_LINEUP
/// Scrolls one line up.
///
/// -
/// SB_PAGEDOWN
/// Scrolls one page down.
///
/// -
/// SB_PAGEUP
/// Scrolls one page up.
///
/// -
/// SB_THUMBPOSITION
///
/// The user has dragged the scroll box (thumb) and released the mouse button. The HIWORD indicates the position of the
/// scroll box at the end of the drag operation.
///
///
/// -
/// SB_THUMBTRACK
///
/// The user is dragging the scroll box. This message is sent repeatedly until the user releases the mouse button. The
/// HIWORD indicates the position that the scroll box has been dragged to.
///
///
/// -
/// SB_TOP
/// Scrolls to the upper left.
///
///
/// lParam
///
/// If the message is sent by a scroll bar control, this parameter is the handle to the scroll bar control. If the message is
/// sent by a standard scroll bar, this parameter is NULL.
///
/// Returns
/// If an application processes this message, it should return zero.
///
///
/// The SB_THUMBTRACK request code is typically used by applications that provide feedback as the user drags the scroll box.
///
///
/// If an application scrolls the content of the window, it must also reset the position of the scroll box by using the
/// SetScrollPos function.
///
///
/// Note that the WM_VSCROLL message carries only 16 bits of scroll box position data. Thus, applications that rely solely
/// on WM_VSCROLL (and WM_HSCROLL) for scroll position data have a practical maximum position value of 65,535.
///
///
/// However, because the SetScrollInfo, SetScrollPos, SetScrollRange, GetScrollInfo,
/// GetScrollPos, and GetScrollRange functions support 32-bit scroll bar position data, there is a way to
/// circumvent the 16-bit barrier of the WM_HSCROLL and WM_VSCROLL messages. See GetScrollInfo for a
/// description of the technique.
///
///
// https://docs.microsoft.com/en-us/windows/win32/controls/wm-vscroll
WM_VSCROLL = 0x0115,
///
///
/// Sent when a menu is about to become active. It occurs when the user clicks an item on the menu bar or presses a menu key.
/// This allows the application to modify the menu before it is displayed.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_INITMENU 0x0116
///
///
/// Parameters
/// wParam
/// A handle to the menu to be initialized.
/// lParam
/// This parameter is not used.
/// Returns
/// If an application processes this message, it should return zero.
///
/// A WM_INITMENU message is sent only when a menu is first accessed; only one WM_INITMENU message is generated for
/// each access. For example, moving the mouse across several menu items while holding down the button does not generate new
/// messages. WM_INITMENU does not provide information about menu items.
///
// https://docs.microsoft.com/en-us/windows/win32/menurc/wm-initmenu
WM_INITMENU = 0x0116,
///
///
/// Sent when a drop-down menu or submenu is about to become active. This allows an application to modify the menu before it is
/// displayed, without changing the entire menu.
///
///
/// #define WM_INITMENUPOPUP 0x0117
///
///
/// Parameters
/// wParam
/// A handle to the drop-down menu or submenu.
/// lParam
/// The low-order word specifies the zero-based relative position of the menu item that opens the drop-down menu or submenu.
///
/// The high-order word indicates whether the drop-down menu is the window menu. If the menu is the window menu, this parameter
/// is TRUE; otherwise, it is FALSE.
///
/// Returns
/// If an application processes this message, it should return zero.
// https://docs.microsoft.com/en-us/windows/win32/menurc/wm-initmenupopup
WM_INITMENUPOPUP = 0x0117,
///
/// Sent to a menu's owner window when the user selects a menu item.
///
/// #define WM_MENUSELECT 0x011F
///
///
/// Parameters
/// wParam
///
/// The low-order word specifies the menu item or submenu index. If the selected item is a command item, this parameter contains
/// the identifier of the menu item. If the selected item opens a drop-down menu or submenu, this parameter contains the index of
/// the drop-down menu or submenu in the main menu, and the lParam parameter contains the handle to the main (clicked) menu; use
/// the GetSubMenu function to get the menu handle to the drop-down menu or submenu.
///
/// The high-order word specifies one or more menu flags. This parameter can be one or more of the following values.
///
///
/// Value
/// Meaning
///
/// -
/// MF_BITMAP 0x00000004L
/// Item displays a bitmap.
///
/// -
/// MF_CHECKED 0x00000008L
/// Item is checked.
///
/// -
/// MF_DISABLED 0x00000002L
/// Item is disabled.
///
/// -
/// MF_GRAYED 0x00000001L
/// Item is grayed.
///
/// -
/// MF_HILITE 0x00000080L
/// Item is highlighted.
///
/// -
/// MF_MOUSESELECT 0x00008000L
/// Item is selected with the mouse.
///
/// -
/// MF_OWNERDRAW 0x00000100L
/// Item is an owner-drawn item.
///
/// -
/// MF_POPUP 0x00000010L
/// Item opens a drop-down menu or submenu.
///
/// -
/// MF_SYSMENU 0x00002000L
///
/// Item is contained in the window menu. The lParam parameter contains a handle to the menu associated with the message.
///
///
///
/// lParam
/// A handle to the menu that was clicked.
/// Returns
/// If an application processes this message, it should return zero.
///
///
/// If the high-order word of wParam contains 0xFFFF and the lParam parameter contains NULL, the system has closed the menu.
///
///
/// Do not use the value 1 for the high-order word of wParam, because this value is specified as ( UINT)
/// HIWORD(wParam). If the value is 0xFFFF, it would be interpreted as 0x0000FFFF, not 1, because of the cast to a UINT.
///
///
// https://docs.microsoft.com/en-us/windows/win32/menurc/wm-menuselect
WM_MENUSELECT = 0x011F,
///
///
/// Sent when a menu is active and the user presses a key that does not correspond to any mnemonic or accelerator key. This
/// message is sent to the window that owns the menu.
///
///
/// #define WM_MENUCHAR 0x0120
///
///
/// Parameters
/// wParam
/// The low-order word specifies the character code that corresponds to the key the user pressed.
/// The high-order word specifies the active menu type. This parameter can be one of the following values.
///
///
/// Value
/// Meaning
///
/// -
/// MF_POPUP 0x00000010L
/// A drop-down menu, submenu, or shortcut menu.
///
/// -
/// MF_SYSMENU 0x00002000L
/// The window menu.
///
///
/// lParam
/// A handle to the active menu.
/// Returns
///
/// An application that processes this message should return one of the following values in the high-order word of the return value.
///
///
///
/// Return code/value
/// Description
///
/// -
/// MNC_CLOSE 1
/// Informs the system that it should close the active menu.
///
/// -
/// MNC_EXECUTE 2
///
/// Informs the system that it should choose the item specified in the low-order word of the return value. The owner window
/// receives a WM_COMMAND message.
///
///
/// -
/// MNC_IGNORE 0
/// Informs the system that it should discard the character the user pressed and create a short beep on the system speaker.
///
/// -
/// MNC_SELECT 3
/// Informs the system that it should select the item specified in the low-order word of the return value.
///
///
///
/// The low-order word is ignored if the high-order word contains 0 or 1.
/// An application should process this message when an accelerator is used to select a menu item that displays a bitmap.
///
// https://docs.microsoft.com/en-us/windows/win32/menurc/wm-menuchar
WM_MENUCHAR = 0x0120,
///
///
/// Sent to the owner window of a modal dialog box or menu that is entering an idle state. A modal dialog box or menu enters an
/// idle state when no messages are waiting in its queue after it has processed one or more previous messages.
///
///
/// #define WM_ENTERIDLE 0x0121
///
///
/// Parameters
/// wParam
/// This parameter can be one of the following values.
///
///
/// Value
/// Meaning
///
/// -
/// MSGF_DIALOGBOX 0
/// The system is idle because a dialog box is displayed.
///
/// -
/// MSGF_MENU 2
/// The system is idle because a menu is displayed.
///
///
/// lParam
///
/// A handle to the dialog box (if wParam is MSGF_DIALOGBOX) or window containing the displayed menu (if wParam is MSGF_MENU).
///
/// Returns
/// An application should return zero if it processes this message.
///
/// You can suppress the WM_ENTERIDLE message for a dialog box by creating the dialog box with the DS_NOIDLEMSG style.
///
// https://docs.microsoft.com/en-us/windows/win32/dlgbox/wm-enteridle
WM_ENTERIDLE = 0x0121,
///
/// Sent when the user releases the right mouse button while the cursor is on a menu item.
///
/// #define WM_MENURBUTTONUP 0x0122
///
///
/// Parameters
/// wParam
/// The zero-based index of the menu item on which the right mouse button was released.
/// lParam
/// A handle to the menu containing the item.
///
/// The WM_MENURBUTTONUP message allows applications to provide a context-sensitive menu also known as a shortcut menu for
/// the menu item specified in this message. To display a context-sensitive menu for a menu item, call the
/// TrackPopupMenuEx function with TPM_RECURSE.
///
// https://docs.microsoft.com/en-us/windows/win32/menurc/wm-menurbuttonup
WM_MENURBUTTONUP = 0x0122,
///
/// Sent to the owner of a drag-and-drop menu when the user drags a menu item.
///
/// #define WM_MENUDRAG 0x0123
///
///
/// Parameters
/// wParam
/// The position of the item where the drag operation began.
/// lParam
/// A handle to the menu containing the item.
/// Returns
/// The application should return one of the following values.
///
///
/// Return code/value
/// Description
///
/// -
/// MND_CONTINUE 0
/// Menu should remain active. If the mouse is released, it should be ignored.
///
/// -
/// MND_ENDMENU 1
/// Menu should be ended.
///
///
///
/// The application can call the DoDragDrop function in response to this message.
/// To create a drag-and-drop menu, call SetMenuInfo with MNS_DRAGDROP.
///
// https://docs.microsoft.com/en-us/windows/win32/menurc/wm-menudrag
WM_MENUDRAG = 0x0123,
///
///
/// Sent to the owner of a drag-and-drop menu when the mouse cursor enters a menu item or moves from the center of the item to
/// the top or bottom of the item.
///
///
/// #define WM_MENUGETOBJECT 0x0124
///
///
/// Parameters
/// wParam
/// This parameter is not used.
/// lParam
/// A pointer to a MENUGETOBJECTINFO structure.
/// Returns
/// The application should return one of the following values.
///
///
/// Return code/value
/// Description
///
/// -
/// MNGO_NOERROR 0x00000001
/// An interface pointer was returned in the pvObj member of MENUGETOBJECTINFO
///
/// -
/// MNGO_NOINTERFACE 0x00000000
/// The interface is not supported.
///
///
// https://docs.microsoft.com/en-us/windows/win32/menurc/wm-menugetobject
WM_MENUGETOBJECT = 0x0124,
///
/// Sent when a drop-down menu or submenu has been destroyed.
///
/// #define WM_UNINITMENUPOPUP 0x0125
///
///
/// Parameters
/// wParam
/// A handle to the menu
/// lParam
///
/// The high-order word identifies the menu that was destroyed. Currently, this parameter can only be MF_SYSMENU (the
/// window menu).
///
/// If an application receives a WM_INITMENUPOPUP message, it will receive a WM_UNINITMENUPOPUP message.
// https://docs.microsoft.com/en-us/windows/win32/menurc/wm-uninitmenupopup
WM_UNINITMENUPOPUP = 0x0125,
///
/// Sent when the user makes a selection from a menu.
///
/// #define WM_MENUCOMMAND 0x0126
///
///
/// Parameters
/// wParam
/// The zero-based index of the item selected.
/// lParam
/// A handle to the menu for the item selected.
///
///
/// The WM_MENUCOMMAND message gives you a handle to the menu so you can access the menu data in the MENUINFO
/// structure and also gives you the index of the selected item, which is typically what applications need. In contrast, the
/// WM_COMMAND message gives you the menu item identifier.
///
///
/// The WM_MENUCOMMAND message is sent only for menus that are defined with the MNS_NOTIFYBYPOS flag set in the
/// dwStyle member of the MENUINFO structure.
///
///
// https://docs.microsoft.com/en-us/windows/win32/menurc/wm-menucommand
WM_MENUCOMMAND = 0x0126,
///
/// An application sends the WM_CHANGEUISTATE message to indicate that the UI state should be changed.
///
/// #define WM_CHANGEUISTATE 0x0127
///
///
/// Parameters
/// wParam
/// The low-order word specifies the action to be taken. This member can be one of the following values.
///
///
/// Value
/// Meaning
///
/// -
/// UIS_CLEAR 2
/// The UI state flags specified by the high-order word should be cleared.
///
/// -
/// UIS_INITIALIZE 3
///
/// The UI state flags specified by the high-order word should be changed based on the last input event. For more information,
/// see Remarks.
///
///
/// -
/// UIS_SET 1
/// The UI state flags specified by the high-order word should be set.
///
///
///
/// The high-order word specifies which UI state elements are affected or the style of the control. This member can be one or
/// more of the following values.
///
///
///
/// Value
/// Meaning
///
/// -
/// UISF_ACTIVE 0x4
/// A control should be drawn in the style used for active controls.
///
/// -
/// UISF_HIDEACCEL 0x2
/// Keyboard accelerators are hidden.
///
/// -
/// UISF_HIDEFOCUS 0x1
/// Focus indicators are hidden.
///
///
/// lParam
/// This parameter is not used and must be 0.
///
///
/// A window should send this message to itself or its parent when it must change the UI state elements of all windows in the
/// same hierarchy. The window procedure must let DefWindowProc process this message so that the entire window tree has a
/// consistent UI state. When the top-level window receives the WM_CHANGEUISTATE message, it sends a
/// WM_UPDATEUISTATE message with the same parameters to all child windows. When the system processes the
/// WM_UPDATEUISTATE message, it makes the change in the UI state.
///
///
/// If the low-order word of wParam is UIS_INITIALIZE, the system will send the WM_UPDATEUISTATE message with a UI state
/// based on the last input event. For example, if the last input came from the mouse, the system will hide the keyboard cues.
/// And, if the last input came from the keyboard, the system will show the keyboard cues. If the state that results from
/// processing WM_CHANGEUISTATE is the same as the old state, DefWindowProc does not send this message.
///
///
// https://docs.microsoft.com/en-us/windows/win32/menurc/wm-changeuistate
WM_CHANGEUISTATE = 0x0127,
///
///
/// An application sends the WM_UPDATEUISTATE message to change the UI state for the specified window and all its child windows.
///
///
/// #define WM_UPDATEUISTATE 0x0128
///
///
/// Parameters
/// wParam
/// The low-order word specifies the action to be performed. This parameter can be one of the following values.
///
///
/// Value
/// Meaning
///
/// -
/// UIS_CLEAR 2
/// The UI state element specified by the high-order word should be hidden.
///
/// -
/// UIS_INITIALIZE 3
///
/// The UI state element specified by the high-order word should be changed based on the last input event. For more information,
/// see Remarks.
///
///
/// -
/// UIS_SET 1
/// The UI state element specified by the high-order word should be visible.
///
///
///
/// The high-order word specifies which UI state elements are affected or the style of the control. This parameter can be one or
/// more of the following values.
///
///
///
/// Value
/// Meaning
///
/// -
/// UISF_ACTIVE 0x4
/// A control should be drawn in the style used for active controls.
///
/// -
/// UISF_HIDEACCEL 0x2
/// Keyboard accelerators.
///
/// -
/// UISF_HIDEFOCUS 0x1
/// Focus indicators.
///
///
/// lParam
/// This parameter is not used.
///
///
/// A window should send this message to change the UI state of all its child windows. In contrast to the WM_CHANGEUISTATE
/// message, which is a notification, when DefWindowProc processes the WM_UPDATEUISTATE message it changes the UI
/// state and propagates the changes to all child windows.
///
///
/// The DefWindowProc function updates the UI state according to the wParam value. If the UI state is modified, the
/// function sends the message to all the immediate child windows. DefWindowProc also sends this message when it receives
/// a WM_CHANGEUISTATE message notifying the system that a child window intends to modify the UI state.
///
///
// https://docs.microsoft.com/en-us/windows/win32/menurc/wm-updateuistate
WM_UPDATEUISTATE = 0x0128,
///
/// An application sends the WM_QUERYUISTATE message to retrieve the UI state for a window.
///
/// #define WM_QUERYUISTATE 0x0129
///
///
/// Parameters
/// wParam
/// This parameter is not used and must be 0.
/// lParam
/// This parameter is not used and must be 0.
/// Returns
///
/// The return value is NULL if the focus indicators and the keyboard accelerators are visible. Otherwise, the return
/// value can be one or more of the following values.
///
///
///
/// Return code/value
/// Description
///
/// -
/// UISF_ACTIVE 0x4
/// A control should be drawn in the style used for active controls.
///
/// -
/// UISF_HIDEACCEL 0x2
/// Keyboard accelerators are hidden.
///
/// -
/// UISF_HIDEFOCUS 0x1
/// Focus indicators are hidden.
///
///
// https://docs.microsoft.com/en-us/windows/win32/menurc/wm-queryuistate
WM_QUERYUISTATE = 0x0129,
///
///
/// The WM_CTLCOLORMSGBOX message is sent to the owner window of a message box before Windows draws the message box. By
/// responding to this message, the owner window can set the text and background colors of the message box by using the given
/// display device context handle.
///
/// Parameters
/// wParam
/// Type: HDC. Identifies the device context for the message box.
/// lParam
/// Type: HWND. Identifies the message box.
/// Returns
///
/// If an application processes this message, it must return the handle of a brush. Windows uses the brush to paint the
/// background of the message box.
///
///
///
/// The WM_CTLCOLORMSGBOX message is never sent between threads. It is sent only within one thread.
///
WM_CTLCOLORMSGBOX = 0x0132,
///
///
/// An edit control that is not read-only or disabled sends the WM_CTLCOLOREDIT message to its parent window when the
/// control is about to be drawn. By responding to this message, the parent window can use the specified device context handle to
/// set the text and background colors of the edit control.
///
///
/// WM_CTLCOLOREDIT WPARAM wParam; LPARAM lParam;
///
///
/// Parameters
/// wParam
/// A handle to the device context for the edit control window.
/// lParam
/// A handle to the edit control.
/// Returns
///
/// If an application processes this message, it must return the handle of a brush. The system uses the brush to paint the
/// background of the edit control.
///
///
///
/// If the application returns a brush that it created (for example, by using the CreateSolidBrush or
/// CreateBrushIndirect function), the application must free the brush. If the application returns a system brush (for
/// example, one that was retrieved by the GetStockObject or GetSysColorBrush function), the application does not
/// need to free the brush.
///
/// By default, the DefWindowProc function selects the default system colors for the edit control.
///
/// Read-only or disabled edit controls do not send the WM_CTLCOLOREDIT message; instead, they send the
/// WM_CTLCOLORSTATIC message.
///
/// The WM_CTLCOLOREDIT message is never sent between threads, it is only sent within the same thread.
///
/// If a dialog box procedure handles this message, it should cast the desired return value to a INT_PTR and return the
/// value directly. If the dialog box procedure returns FALSE, then default message handling is performed. The
/// DWL_MSGRESULT value set by the SetWindowLong function is ignored.
///
///
/// Rich Edit: This message is not supported. To set the background color for a rich edit control, use the
/// EM_SETBKGNDCOLOR message.
///
///
// https://docs.microsoft.com/en-us/windows/win32/controls/wm-ctlcoloredit
WM_CTLCOLOREDIT = 0x0133,
///
///
/// Sent to the parent window of a list box before the system draws the list box. By responding to this message, the parent
/// window can set the text and background colors of the list box by using the specified display device context handle.
///
///
/// WM_CTLCOLORLISTBOX WPARAM wParam; LPARAM lParam;
///
///
/// Parameters
/// wParam
/// Handle to the device context for the list box.
/// lParam
/// Handle to the list box.
/// Returns
///
/// If an application processes this message, it must return a handle to a brush. The system uses the brush to paint the
/// background of the list box.
///
///
/// By default, the DefWindowProc function selects the default system colors for the list box.
/// The WM_CTLCOLORLISTBOX message is never sent between threads. It is sent only within one thread.
///
/// If a dialog box procedure handles this message, it should cast the desired return value to a INT_PTR and return the
/// value directly. If the dialog box procedure returns FALSE, then default message handling is performed. The
/// DWL_MSGRESULT value set by the SetWindowLong function is ignored.
///
///
// https://docs.microsoft.com/en-us/windows/win32/controls/wm-ctlcolorlistbox
WM_CTLCOLORLISTBOX = 0x0134,
///
///
/// The WM_CTLCOLORBTN message is sent to the parent window of a button before drawing the button. The parent window can
/// change the button's text and background colors. However, only owner-drawn buttons respond to the parent window processing
/// this message.
///
///
/// WM_CTLCOLORBTN WPARAM wParam; LPARAM lParam;
///
///
/// Parameters
/// wParam
/// An HDC that specifies the handle to the display context for the button.
/// lParam
/// An HWND that specifies the handle to the button.
/// Returns
///
/// If an application processes this message, it must return a handle to a brush. The system uses the brush to paint the
/// background of the button.
///
///
///
/// If the application returns a brush that it created (for example, by using the CreateSolidBrush or
/// CreateBrushIndirect function), the application must free the brush. If the application returns a system brush (for
/// example, one that was retrieved by the GetStockObject or GetSysColorBrush function), the application does not
/// need to free the brush.
///
///
/// By default, the DefWindowProc function selects the default system colors for the button. Buttons with the
/// BS_PUSHBUTTON, BS_DEFPUSHBUTTON, or BS_PUSHLIKE styles do not use the returned brush. Buttons with these
/// styles are always drawn with the default system colors. Drawing push buttons requires several different brushes-face,
/// highlight, and shadow-but the WM_CTLCOLORBTN message allows only one brush to be returned. To provide a custom
/// appearance for push buttons, use an owner-drawn button. For more information, see Creating Owner-Drawn Controls.
///
/// The WM_CTLCOLORBTN message is never sent between threads. It is sent only within one thread.
///
/// The text color of a check box or radio button applies to the box or button, its check mark, and the text. The focus rectangle
/// for these buttons remains the system default color (typically black). The text color of a group box applies to the text but
/// not to the line that defines the box. The text color of a push button applies only to its focus rectangle; it does not affect
/// the color of the text.
///
///
/// If a dialog box procedure handles this message, it should cast the desired return value to a INT_PTR and return the
/// value directly. If the dialog box procedure returns FALSE, then default message handling is performed. The
/// DWL_MSGRESULT value set by the SetWindowLong function is ignored.
///
///
// https://docs.microsoft.com/en-us/windows/win32/controls/wm-ctlcolorbtn
WM_CTLCOLORBTN = 0x0135,
///
///
/// Sent to a dialog box before the system draws the dialog box. By responding to this message, the dialog box can set its text
/// and background colors using the specified display device context handle.
///
///
/// #define WM_CTLCOLORDLG 0x0136
///
///
/// Parameters
/// wParam
/// A handle to the device context for the dialog box.
/// lParam
/// A handle to the dialog box.
/// Returns
///
/// If an application processes this message, it must return a handle to a brush. The system uses the brush to paint the
/// background of the dialog box.
///
///
/// By default, the DefWindowProc function selects the default system colors for the dialog box.
///
/// The system does not automatically destroy the returned brush. It is the application's responsibility to destroy the brush
/// when it is no longer needed.
///
/// The WM_CTLCOLORDLG message is never sent between threads. It is sent only within one thread.
///
/// Note that the WM_CTLCOLORDLG message is sent to the dialog box itself; all of the other WM_CTLCOLOR* messages
/// are sent to the owner of the control.
///
///
/// If a dialog box procedure handles this message, it should cast the desired return value to an INT_PTR and return the
/// value directly. If the dialog box procedure returns FALSE, then default message handling is performed. The
/// DWL_MSGRESULT value set by the SetWindowLong function is ignored.
///
///
// https://docs.microsoft.com/en-us/windows/win32/dlgbox/wm-ctlcolordlg
WM_CTLCOLORDLG = 0x0136,
///
///
/// The WM_CTLCOLORSCROLLBAR message is sent to the parent window of a scroll bar control when the control is about to be
/// drawn. By responding to this message, the parent window can use the display context handle to set the background color of the
/// scroll bar control.
///
/// A window receives this message through its WindowProc function.
///
/// WM_CTLCOLORSCROLLBAR WPARAM wParam LPARAM lParam;
///
///
/// Parameters
/// wParam
/// Handle to the device context for the scroll bar control.
/// lParam
/// Handle to the scroll bar.
/// Returns
///
/// If an application processes this message, it must return the handle to a brush. The system uses the brush to paint the
/// background of the scroll bar control.
///
///
///
/// If the application returns a brush that it created (for example, by using the CreateSolidBrush or
/// CreateBrushIndirect function), the application must free the brush. If the application returns a system brush (for
/// example, one that was retrieved by the GetStockObject or GetSysColorBrush function), the application does not
/// need to free the brush.
///
/// By default, the DefWindowProc function selects the default system colors for the scroll bar control.
/// The WM_CTLCOLORSCROLLBAR message is never sent between threads; it is only sent within the same thread.
///
/// If a dialog box procedure handles this message, it should cast the desired return value to a INT_PTR and return the
/// value directly. If the dialog box procedure returns FALSE, then default message handling is performed. The
/// DWL_MSGRESULT value set by the SetWindowLong function is ignored.
///
///
/// The WM_CTLCOLORSCROLLBAR message is used only by child scroll bar controls. Scrollbars attached to a window (WS_SCROLL
/// and WS_VSCROLL) do not generate this message. To customize the appearance of scrollbars attached to a window, use the flat
/// scroll bar functions.
///
///
// https://docs.microsoft.com/en-us/windows/win32/controls/wm-ctlcolorscrollbar
WM_CTLCOLORSCROLLBAR = 0x0137,
///
///
/// A static control, or an edit control that is read-only or disabled, sends the WM_CTLCOLORSTATIC message to its parent
/// window when the control is about to be drawn. By responding to this message, the parent window can use the specified device
/// context handle to set the text foreground and background colors of the static control.
///
/// A window receives this message through its WindowProc function.
///
/// WM_CTLCOLORSTATIC WPARAM wParam; LPARAM lParam;
///
///
/// Parameters
/// wParam
/// Handle to the device context for the static control window.
/// lParam
/// Handle to the static control.
/// Returns
///
/// If an application processes this message, the return value is a handle to a brush that the system uses to paint the
/// background of the static control.
///
///
///
/// If the application returns a brush that it created (for example, by using the CreateSolidBrush or
/// CreateBrushIndirect function), the application must free the brush. If the application returns a system brush (for
/// example, one that was retrieved by the GetStockObject or GetSysColorBrush function), the application does not
/// need to free the brush.
///
/// By default, the DefWindowProc function selects the default system colors for the static control.
///
/// You can set the text background color of a disabled edit control, but you cannot set the text foreground color. The system
/// always uses COLOR_GRAYTEXT.
///
///
/// Edit controls that are not read-only or disabled do not send the WM_CTLCOLORSTATIC message; instead, they send the
/// WM_CTLCOLOREDIT message.
///
/// The WM_CTLCOLORSTATIC message is never sent between threads; it is sent only within the same thread.
///
/// If a dialog box procedure handles this message, it should cast the desired return value to a INT_PTR and return the
/// value directly. If the dialog box procedure returns FALSE, then default message handling is performed. The
/// DWL_MSGRESULT value set by the SetWindowLong function is ignored.
///
///
// https://docs.microsoft.com/en-us/windows/win32/controls/wm-ctlcolorstatic
WM_CTLCOLORSTATIC = 0x0138,
/// The first mouse related message.
WM_MOUSEFIRST = 0x0200,
///
///
/// Posted to a window when the cursor moves. If the mouse is not captured, the message is posted to the window that contains the
/// cursor. Otherwise, the message is posted to the window that has captured the mouse.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_MOUSEMOVE 0x0200
///
///
/// Parameters
/// wParam
/// Indicates whether various virtual keys are down. This parameter can be one or more of the following values.
///
///
/// Value
/// Meaning
///
/// -
/// MK_CONTROL 0x0008
/// The CTRL key is down.
///
/// -
/// MK_LBUTTON 0x0001
/// The left mouse button is down.
///
/// -
/// MK_MBUTTON 0x0010
/// The middle mouse button is down.
///
/// -
/// MK_RBUTTON 0x0002
/// The right mouse button is down.
///
/// -
/// MK_SHIFT 0x0004
/// The SHIFT key is down.
///
/// -
/// MK_XBUTTON1 0x0020
/// The first X button is down.
///
/// -
/// MK_XBUTTON2 0x0040
/// The second X button is down.
///
///
/// lParam
///
/// The low-order word specifies the x-coordinate of the cursor. The coordinate is relative to the upper-left corner of the
/// client area.
///
///
/// The high-order word specifies the y-coordinate of the cursor. The coordinate is relative to the upper-left corner of the
/// client area.
///
/// Returns
/// If an application processes this message, it should return zero.
///
/// Use the following code to obtain the horizontal and vertical position:
///
/// xPos = GET_X_LPARAM(lParam); yPos = GET_Y_LPARAM(lParam);
///
///
/// As noted above, the x-coordinate is in the low-order short of the return value; the y-coordinate is in the high-order
/// short (both represent signed values because they can take negative values on systems with multiple monitors). If the
/// return value is assigned to a variable, you can use the MAKEPOINTS macro to obtain a POINTS structure from the
/// return value. You can also use the GET_X_LPARAM or GET_Y_LPARAM macro to extract the x- or y-coordinate.
///
///
/// Important
///
/// Do not use the LOWORD or HIWORD macros to extract the x- and y- coordinates of the cursor position because
/// these macros return incorrect results on systems with multiple monitors. Systems with multiple monitors can have negative x-
/// and y- coordinates, and LOWORD and HIWORD treat the coordinates as unsigned quantities.
///
///
///
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-mousemove
WM_MOUSEMOVE = 0x0200,
///
///
/// Posted when the user presses the left mouse button while the cursor is in the client area of a window. If the mouse is not
/// captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has
/// captured the mouse.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_LBUTTONDOWN 0x0201
///
///
/// Parameters
/// wParam
/// Indicates whether various virtual keys are down. This parameter can be one or more of the following values.
///
///
/// Value
/// Meaning
///
/// -
/// MK_CONTROL 0x0008
/// The CTRL key is down.
///
/// -
/// MK_LBUTTON 0x0001
/// The left mouse button is down.
///
/// -
/// MK_MBUTTON 0x0010
/// The middle mouse button is down.
///
/// -
/// MK_RBUTTON 0x0002
/// The right mouse button is down.
///
/// -
/// MK_SHIFT 0x0004
/// The SHIFT key is down.
///
/// -
/// MK_XBUTTON1 0x0020
/// The first X button is down.
///
/// -
/// MK_XBUTTON2 0x0040
/// The second X button is down.
///
///
/// lParam
///
/// The low-order word specifies the x-coordinate of the cursor. The coordinate is relative to the upper-left corner of the
/// client area.
///
///
/// The high-order word specifies the y-coordinate of the cursor. The coordinate is relative to the upper-left corner of the
/// client area.
///
/// Returns
/// If an application processes this message, it should return zero.
///
///
/// As noted above, the x-coordinate is in the low-order short of the return value; the y-coordinate is in the high-order
/// short (both represent signed values because they can take negative values on systems with multiple monitors). If the
/// return value is assigned to a variable, you can use the MAKEPOINTS macro to obtain a POINTS structure from the
/// return value. You can also use the GET_X_LPARAM or GET_Y_LPARAM macro to extract the x- or y-coordinate.
///
///
/// Important
///
/// Do not use the LOWORD or HIWORD macros to extract the x- and y- coordinates of the cursor position because
/// these macros return incorrect results on systems with multiple monitors. Systems with multiple monitors can have negative x-
/// and y- coordinates, and LOWORD and HIWORD treat the coordinates as unsigned quantities.
///
///
///
/// To detect that the ALT key was pressed, check whether GetKeyState with VK_MENU < 0. Note, this must not be GetAsyncKeyState.
///
///
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-lbuttondown
WM_LBUTTONDOWN = 0x0201,
///
///
/// Posted when the user releases the left mouse button while the cursor is in the client area of a window. If the mouse is not
/// captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has
/// captured the mouse.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_LBUTTONUP 0x0202
///
///
/// Parameters
/// wParam
/// Indicates whether various virtual keys are down. This parameter can be one or more of the following values.
///
///
/// Value
/// Meaning
///
/// -
/// MK_CONTROL 0x0008
/// The CTRL key is down.
///
/// -
/// MK_MBUTTON 0x0010
/// The middle mouse button is down.
///
/// -
/// MK_RBUTTON 0x0002
/// The right mouse button is down.
///
/// -
/// MK_SHIFT 0x0004
/// The SHIFT key is down.
///
/// -
/// MK_XBUTTON1 0x0020
/// The first X button is down.
///
/// -
/// MK_XBUTTON2 0x0040
/// The second X button is down.
///
///
/// lParam
///
/// The low-order word specifies the x-coordinate of the cursor. The coordinate is relative to the upper-left corner of the
/// client area.
///
///
/// The high-order word specifies the y-coordinate of the cursor. The coordinate is relative to the upper-left corner of the
/// client area.
///
/// Returns
/// If an application processes this message, it should return zero.
///
/// Use the following code to obtain the horizontal and vertical position:
///
/// xPos = GET_X_LPARAM(lParam); yPos = GET_Y_LPARAM(lParam);
///
///
/// As noted above, the x-coordinate is in the low-order short of the lParam value; the y-coordinate is in the high-order
/// short (both represent signed values because they can take negative values on systems with multiple monitors). If the
/// return value is assigned to a variable, you can use the MAKEPOINTS macro to obtain a POINTS structure from the
/// return value. You can also use the GET_X_LPARAM or GET_Y_LPARAM macro to extract the x- or y-coordinate.
///
///
/// Important
///
/// Do not use the LOWORD or HIWORD macros to extract the x- and y- coordinates of the cursor position because
/// these macros return incorrect results on systems with multiple monitors. Systems with multiple monitors can have negative x-
/// and y- coordinates, and LOWORD and HIWORD treat the coordinates as unsigned quantities.
///
///
///
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-lbuttonup
WM_LBUTTONUP = 0x0202,
///
///
/// Posted when the user double-clicks the left mouse button while the cursor is in the client area of a window. If the mouse is
/// not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has
/// captured the mouse.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_LBUTTONDBLCLK 0x0203
///
///
/// Parameters
/// wParam
/// Indicates whether various virtual keys are down. This parameter can be one or more of the following values.
///
///
/// Value
/// Meaning
///
/// -
/// MK_CONTROL 0x0008
/// The CTRL key is down.
///
/// -
/// MK_LBUTTON 0x0001
/// The left mouse button is down.
///
/// -
/// MK_MBUTTON 0x0010
/// The middle mouse button is down.
///
/// -
/// MK_RBUTTON 0x0002
/// The right mouse button is down.
///
/// -
/// MK_SHIFT 0x0004
/// The SHIFT key is down.
///
/// -
/// MK_XBUTTON1 0x0020
/// The first X button is down.
///
/// -
/// MK_XBUTTON2 0x0040
/// The second X button is down.
///
///
/// lParam
///
/// The low-order word specifies the x-coordinate of the cursor. The coordinate is relative to the upper-left corner of the
/// client area.
///
///
/// The high-order word specifies the y-coordinate of the cursor. The coordinate is relative to the upper-left corner of the
/// client area.
///
/// Returns
/// If an application processes this message, it should return zero.
///
/// Use the following code to obtain the horizontal and vertical position:
///
/// xPos = GET_X_LPARAM(lParam); yPos = GET_Y_LPARAM(lParam);
///
///
/// As noted above, the x-coordinate is in the low-order short of the return value; the y-coordinate is in the high-order
/// short (both represent signed values because they can take negative values on systems with multiple monitors). If the
/// return value is assigned to a variable, you can use the MAKEPOINTS macro to obtain a POINTS structure from the
/// return value. You can also use the GET_X_LPARAM or GET_Y_LPARAM macro to extract the x- or y-coordinate.
///
///
/// Important
///
/// Do not use the LOWORD or HIWORD macros to extract the x- and y- coordinates of the cursor position because
/// these macros return incorrect results on systems with multiple monitors. Systems with multiple monitors can have negative x-
/// and y- coordinates, and LOWORD and HIWORD treat the coordinates as unsigned quantities.
///
///
///
/// Only windows that have the CS_DBLCLKS style can receive WM_LBUTTONDBLCLK messages, which the system generates
/// whenever the user presses, releases, and again presses the left mouse button within the system's double-click time limit.
/// Double-clicking the left mouse button actually generates a sequence of four messages: WM_LBUTTONDOWN,
/// WM_LBUTTONUP, WM_LBUTTONDBLCLK, and WM_LBUTTONUP.
///
///
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-lbuttondblclk
WM_LBUTTONDBLCLK = 0x0203,
///
///
/// Posted when the user presses the right mouse button while the cursor is in the client area of a window. If the mouse is not
/// captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has
/// captured the mouse.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_RBUTTONDOWN 0x0204
///
///
/// Parameters
/// wParam
/// Indicates whether various virtual keys are down. This parameter can be one or more of the following values.
///
///
/// Value
/// Meaning
///
/// -
/// MK_CONTROL 0x0008
/// The CTRL key is down.
///
/// -
/// MK_LBUTTON 0x0001
/// The left mouse button is down.
///
/// -
/// MK_MBUTTON 0x0010
/// The middle mouse button is down.
///
/// -
/// MK_RBUTTON 0x0002
/// The right mouse button is down.
///
/// -
/// MK_SHIFT 0x0004
/// The SHIFT key is down.
///
/// -
/// MK_XBUTTON1 0x0020
/// The first X button is down.
///
/// -
/// MK_XBUTTON2 0x0040
/// The second X button is down.
///
///
/// lParam
///
/// The low-order word specifies the x-coordinate of the cursor. The coordinate is relative to the upper-left corner of the
/// client area.
///
///
/// The high-order word specifies the y-coordinate of the cursor. The coordinate is relative to the upper-left corner of the
/// client area.
///
/// Returns
/// If an application processes this message, it should return zero.
///
/// Use the following code to obtain the horizontal and vertical position:
///
/// xPos = GET_X_LPARAM(lParam); yPos = GET_Y_LPARAM(lParam);
///
///
/// As noted above, the x-coordinate is in the low-order short of the return value; the y-coordinate is in the high-order
/// short (both represent signed values because they can take negative values on systems with multiple monitors). If the
/// return value is assigned to a variable, you can use the MAKEPOINTS macro to obtain a POINTS structure from the
/// return value. You can also use the GET_X_LPARAM or GET_Y_LPARAM macro to extract the x- or y-coordinate.
///
///
/// Important
///
/// Do not use the LOWORD or HIWORD macros to extract the x- and y- coordinates of the cursor position because
/// these macros return incorrect results on systems with multiple monitors. Systems with multiple monitors can have negative x-
/// and y- coordinates, and LOWORD and HIWORD treat the coordinates as unsigned quantities.
///
///
///
/// To detect that the ALT key was pressed, check whether GetKeyState with VK_MENU < 0. Note, this must not be GetAsyncKeyState.
///
///
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-rbuttondown
WM_RBUTTONDOWN = 0x0204,
///
///
/// Posted when the user releases the right mouse button while the cursor is in the client area of a window. If the mouse is not
/// captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has
/// captured the mouse.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_RBUTTONUP 0x0205
///
///
/// Parameters
/// wParam
/// Indicates whether various virtual keys are down. This parameter can be one or more of the following values.
///
///
/// Value
/// Meaning
///
/// -
/// MK_CONTROL 0x0008
/// The CTRL key is down.
///
/// -
/// MK_LBUTTON 0x0001
/// The left mouse button is down.
///
/// -
/// MK_MBUTTON 0x0010
/// The middle mouse button is down.
///
/// -
/// MK_RBUTTON 0x0002
/// The SHIFT key is down.
///
/// -
/// MK_XBUTTON1 0x0020
/// The first X button is down.
///
/// -
/// MK_XBUTTON2 0x0040
/// The second X button is down.
///
///
/// lParam
///
/// The low-order word specifies the x-coordinate of the cursor. The coordinate is relative to the upper-left corner of the
/// client area.
///
///
/// The high-order word specifies the y-coordinate of the cursor. The coordinate is relative to the upper-left corner of the
/// client area.
///
/// Returns
/// If an application processes this message, it should return zero.
///
/// Use the following code to obtain the horizontal and vertical position:
///
/// xPos = GET_X_LPARAM(lParam); yPos = GET_Y_LPARAM(lParam);
///
///
/// As noted above, the x-coordinate is in the low-order short of the return value; the y-coordinate is in the high-order
/// short (both represent signed values because they can take negative values on systems with multiple monitors). If the
/// return value is assigned to a variable, you can use the MAKEPOINTS macro to obtain a POINTS structure from the
/// return value. You can also use the GET_X_LPARAM or GET_Y_LPARAM macro to extract the x- or y-coordinate.
///
///
/// Important
///
/// Do not use the LOWORD or HIWORD macros to extract the x- and y- coordinates of the cursor position because
/// these macros return incorrect results on systems with multiple monitors. Systems with multiple monitors can have negative x-
/// and y- coordinates, and LOWORD and HIWORD treat the coordinates as unsigned quantities.
///
///
///
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-rbuttonup
WM_RBUTTONUP = 0x0205,
///
///
/// Posted when the user double-clicks the right mouse button while the cursor is in the client area of a window. If the mouse is
/// not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has
/// captured the mouse.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_RBUTTONDBLCLK 0x0206
///
///
/// Parameters
/// wParam
/// Indicates whether various virtual keys are down. This parameter can be one or more of the following values.
///
///
/// Value
/// Meaning
///
/// -
/// MK_CONTROL 0x0008
/// The CTRL key is down.
///
/// -
/// MK_LBUTTON 0x0001
/// The left mouse button is down.
///
/// -
/// MK_MBUTTON 0x0010
/// The middle mouse button is down.
///
/// -
/// MK_RBUTTON 0x0002
/// The right mouse button is down.
///
/// -
/// MK_SHIFT 0x0004
/// The SHIFT key is down.
///
/// -
/// MK_XBUTTON1 0x0020
/// The first X button is down.
///
/// -
/// MK_XBUTTON2 0x0040
/// The second X button is down.
///
///
/// lParam
///
/// The low-order word specifies the x-coordinate of the cursor. The coordinate is relative to the upper-left corner of the
/// client area.
///
///
/// The high-order word specifies the y-coordinate of the cursor. The coordinate is relative to the upper-left corner of the
/// client area.
///
/// Returns
/// If an application processes this message, it should return zero.
///
///
/// Only windows that have the CS_DBLCLKS style can receive WM_RBUTTONDBLCLK messages, which the system generates
/// whenever the user presses, releases, and again presses the right mouse button within the system's double-click time limit.
/// Double-clicking the right mouse button actually generates four messages: WM_RBUTTONDOWN, WM_RBUTTONUP,
/// WM_RBUTTONDBLCLK, and WM_RBUTTONUP again.
///
/// Use the following code to obtain the horizontal and vertical position:
///
/// xPos = GET_X_LPARAM(lParam); yPos = GET_Y_LPARAM(lParam);
///
///
/// As noted above, the x-coordinate is in the low-order short of the return value; the y-coordinate is in the high-order
/// short (both represent signed values because they can take negative values on systems with multiple monitors). If the
/// return value is assigned to a variable, you can use the MAKEPOINTS macro to obtain a POINTS structure from the
/// return value. You can also use the GET_X_LPARAM or GET_Y_LPARAM macro to extract the x- or y-coordinate.
///
///
/// Important
///
/// Do not use the LOWORD or HIWORD macros to extract the x- and y- coordinates of the cursor position because
/// these macros return incorrect results on systems with multiple monitors. Systems with multiple monitors can have negative x-
/// and y- coordinates, and LOWORD and HIWORD treat the coordinates as unsigned quantities.
///
///
///
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-rbuttondblclk
WM_RBUTTONDBLCLK = 0x0206,
///
///
/// Posted when the user presses the middle mouse button while the cursor is in the client area of a window. If the mouse is not
/// captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has
/// captured the mouse.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_MBUTTONDOWN 0x0207
///
///
/// Parameters
/// wParam
/// Indicates whether various virtual keys are down. This parameter can be one or more of the following values.
///
///
/// Value
/// Meaning
///
/// -
/// MK_CONTROL 0x0008
/// The CTRL key is down.
///
/// -
/// MK_LBUTTON 0x0001
/// The left mouse button is down.
///
/// -
/// MK_MBUTTON 0x0010
/// The middle mouse button is down.
///
/// -
/// MK_RBUTTON 0x0002
/// The right mouse button is down.
///
/// -
/// MK_SHIFT 0x0004
/// The SHIFT key is down.
///
/// -
/// MK_XBUTTON1 0x0020
/// The first X button is down.
///
/// -
/// MK_XBUTTON2 0x0040
/// The second X button is down.
///
///
/// lParam
///
/// The low-order word specifies the x-coordinate of the cursor. The coordinate is relative to the upper-left corner of the
/// client area.
///
///
/// The high-order word specifies the y-coordinate of the cursor. The coordinate is relative to the upper-left corner of the
/// client area.
///
/// Returns
/// If an application processes this message, it should return zero.
///
/// Use the following code to obtain the horizontal and vertical position:
///
/// xPos = GET_X_LPARAM(lParam); yPos = GET_Y_LPARAM(lParam);
///
///
/// As noted above, the x-coordinate is in the low-order short of the return value; the y-coordinate is in the high-order
/// short (both represent signed values because they can take negative values on systems with multiple monitors). If the
/// return value is assigned to a variable, you can use the MAKEPOINTS macro to obtain a POINTS structure from the
/// return value. You can also use the GET_X_LPARAM or GET_Y_LPARAM macro to extract the x- or y-coordinate.
///
///
/// Important
///
/// Do not use the LOWORD or HIWORD macros to extract the x- and y- coordinates of the cursor position because
/// these macros return incorrect results on systems with multiple monitors. Systems with multiple monitors can have negative x-
/// and y- coordinates, and LOWORD and HIWORD treat the coordinates as unsigned quantities.
///
///
///
/// To detect that the ALT key was pressed, check whether GetKeyState with VK_MENU < 0. Note, this must not be GetAsyncKeyState.
///
///
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-mbuttondown
WM_MBUTTONDOWN = 0x0207,
///
///
/// Posted when the user releases the middle mouse button while the cursor is in the client area of a window. If the mouse is not
/// captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has
/// captured the mouse.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_MBUTTONUP 0x0208
///
///
/// Parameters
/// wParam
/// Indicates whether various virtual keys are down. This parameter can be one or more of the following values.
///
///
/// Value
/// Meaning
///
/// -
/// MK_CONTROL 0x0008
/// The CTRL key is down.
///
/// -
/// MK_LBUTTON 0x0001
/// The left mouse button is down.
///
/// -
/// MK_MBUTTON 0x0010
/// The middle mouse button is down.
///
/// -
/// MK_RBUTTON 0x0002
/// The right mouse button is down.
///
/// -
/// MK_SHIFT 0x0004
/// The SHIFT key is down.
///
/// -
/// MK_XBUTTON1 0x0020
/// The first X button is down.
///
/// -
/// MK_XBUTTON2 0x0040
/// The second X button is down.
///
///
/// lParam
///
/// The low-order word specifies the x-coordinate of the cursor. The coordinate is relative to the upper-left corner of the
/// client area.
///
///
/// The high-order word specifies the y-coordinate of the cursor. The coordinate is relative to the upper-left corner of the
/// client area.
///
///
/// Note that when a shortcut menu is present (displayed), coordinates are relative to the screen, not the client area. Because
/// TrackPopupMenu is an asynchronous call and the WM_MBUTTONUP notification does not have a special flag
/// indicating coordinate derivation, an application cannot tell if the x,y coordinates contained in lParam are relative to the
/// screen or the client area.
///
/// Returns
/// If an application processes this message, it should return zero.
///
/// Use the following code to obtain the horizontal and vertical position:
///
/// xPos = GET_X_LPARAM(lParam); yPos = GET_Y_LPARAM(lParam);
///
///
/// As noted above, the x-coordinate is in the low-order short of the return value; the y-coordinate is in the high-order
/// short (both represent signed values because they can take negative values on systems with multiple monitors). If the
/// return value is assigned to a variable, you can use the MAKEPOINTS macro to obtain a POINTS structure from the
/// return value. You can also use the GET_X_LPARAM or GET_Y_LPARAM macro to extract the x- or y-coordinate.
///
///
/// Important
///
/// Do not use the LOWORD or HIWORD macros to extract the x- and y- coordinates of the cursor position because
/// these macros return incorrect results on systems with multiple monitors. Systems with multiple monitors can have negative x-
/// and y- coordinates, and LOWORD and HIWORD treat the coordinates as unsigned quantities.
///
///
///
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-mbuttonup
WM_MBUTTONUP = 0x0208,
///
///
/// Posted when the user double-clicks the middle mouse button while the cursor is in the client area of a window. If the mouse
/// is not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that
/// has captured the mouse.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_MBUTTONDBLCLK 0x0209
///
///
/// Parameters
/// wParam
/// Indicates whether various virtual keys are down. This parameter can be one or more of the following values.
///
///
/// Value
/// Meaning
///
/// -
/// MK_CONTROL 0x0008
/// The CTRL key is down.
///
/// -
/// MK_LBUTTON 0x0001
/// The left mouse button is down.
///
/// -
/// MK_MBUTTON 0x0010
/// The middle mouse button is down.
///
/// -
/// MK_RBUTTON 0x0002
/// The right mouse button is down.
///
/// -
/// MK_SHIFT 0x0004
/// The SHIFT key is down.
///
/// -
/// MK_XBUTTON1 0x0020
/// The first X button is down.
///
/// -
/// MK_XBUTTON2 0x0040
/// The second X button is down.
///
///
/// lParam
///
/// The low-order word specifies the x-coordinate of the cursor. The coordinate is relative to the upper-left corner of the
/// client area.
///
///
/// The high-order word specifies the y-coordinate of the cursor. The coordinate is relative to the upper-left corner of the
/// client area.
///
/// Returns
/// If an application processes this message, it should return zero.
///
/// Use the following code to obtain the horizontal and vertical position:
///
/// xPos = GET_X_LPARAM(lParam); yPos = GET_Y_LPARAM(lParam);
///
///
/// As noted above, the x-coordinate is in the low-order short of the return value; the y-coordinate is in the high-order
/// short (both represent signed values because they can take negative values on systems with multiple monitors). If the
/// return value is assigned to a variable, you can use the MAKEPOINTS macro to obtain a POINTS structure from the
/// return value. You can also use the GET_X_LPARAM or GET_Y_LPARAM macro to extract the x- or y-coordinate.
///
///
/// Important
///
/// Do not use the LOWORD or HIWORD macros to extract the x- and y- coordinates of the cursor position because
/// these macros return incorrect results on systems with multiple monitors. Systems with multiple monitors can have negative x-
/// and y- coordinates, and LOWORD and HIWORD treat the coordinates as unsigned quantities.
///
///
///
/// Only windows that have the CS_DBLCLKS style can receive WM_MBUTTONDBLCLK messages, which the system generates
/// when the user presses, releases, and again presses the middle mouse button within the system's double-click time limit.
/// Double-clicking the middle mouse button actually generates four messages: WM_MBUTTONDOWN, WM_MBUTTONUP,
/// WM_MBUTTONDBLCLK, and WM_MBUTTONUP again.
///
///
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-mbuttondblclk
WM_MBUTTONDBLCLK = 0x0209,
///
///
/// Sent to the focus window when the mouse wheel is rotated. The DefWindowProc function propagates the message to the
/// window's parent. There should be no internal forwarding of the message, since DefWindowProc propagates it up the
/// parent chain until it finds a window that processes it.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_MOUSEWHEEL 0x020A
///
///
/// Parameters
/// wParam
///
/// The high-order word indicates the distance the wheel is rotated, expressed in multiples or divisions of WHEEL_DELTA,
/// which is 120. A positive value indicates that the wheel was rotated forward, away from the user; a negative value indicates
/// that the wheel was rotated backward, toward the user.
///
///
/// The low-order word indicates whether various virtual keys are down. This parameter can be one or more of the following values.
///
///
///
/// Value
/// Meaning
///
/// -
/// MK_CONTROL 0x0008
/// The CTRL key is down.
///
/// -
/// MK_LBUTTON 0x0001
/// The left mouse button is down.
///
/// -
/// MK_MBUTTON 0x0010
/// The middle mouse button is down.
///
/// -
/// MK_RBUTTON 0x0002
/// The right mouse button is down.
///
/// -
/// MK_SHIFT 0x0004
/// The SHIFT key is down.
///
/// -
/// MK_XBUTTON1 0x0020
/// The first X button is down.
///
/// -
/// MK_XBUTTON2 0x0040
/// The second X button is down.
///
///
/// lParam
/// The low-order word specifies the x-coordinate of the pointer, relative to the upper-left corner of the screen.
/// The high-order word specifies the y-coordinate of the pointer, relative to the upper-left corner of the screen.
/// Returns
/// If an application processes this message, it should return zero.
///
/// Use the following code to get the information in the wParam parameter:
///
/// fwKeys = GET_KEYSTATE_WPARAM(wParam); zDelta = GET_WHEEL_DELTA_WPARAM(wParam);
///
/// Use the following code to obtain the horizontal and vertical position:
///
/// xPos = GET_X_LPARAM(lParam); yPos = GET_Y_LPARAM(lParam);
///
///
/// As noted above, the x-coordinate is in the low-order short of the return value; the y-coordinate is in the high-order
/// short (both represent signed values because they can take negative values on systems with multiple monitors). If the
/// return value is assigned to a variable, you can use the MAKEPOINTS macro to obtain a POINTS structure from the
/// return value. You can also use the GET_X_LPARAM or GET_Y_LPARAM macro to extract the x- or y-coordinate.
///
///
/// Important
///
/// Do not use the LOWORD or HIWORD macros to extract the x- and y- coordinates of the cursor position because
/// these macros return incorrect results on systems with multiple monitors. Systems with multiple monitors can have negative x-
/// and y- coordinates, and LOWORD and HIWORD treat the coordinates as unsigned quantities.
///
///
///
/// The wheel rotation will be a multiple of WHEEL_DELTA, which is set at 120. This is the threshold for action to be
/// taken, and one such action (for example, scrolling one increment) should occur for each delta.
///
///
/// The delta was set to 120 to allow Microsoft or other vendors to build finer-resolution wheels (a freely-rotating wheel with
/// no notches) to send more messages per rotation, but with a smaller value in each message. To use this feature, you can either
/// add the incoming delta values until WHEEL_DELTA is reached (so for a delta-rotation you get the same response), or
/// scroll partial lines in response to the more frequent messages. You can also choose your scroll granularity and accumulate
/// deltas until it is reached.
///
/// Note, there is no fwKeys for MSH_MOUSEWHEEL. Otherwise, the parameters are exactly the same as for WM_MOUSEWHEEL.
///
/// It is up to the application to forward MSH_MOUSEWHEEL to any embedded objects or controls. The application is required
/// to send the message to an active embedded OLE application. It is optional that the application sends it to a wheel-enabled
/// control with focus. If the application does send the message to a control, it can check the return value to see if the
/// message was processed. Controls are required to return a value of TRUE if they process the message.
///
///
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-mousewheel
WM_MOUSEWHEEL = 0x020A,
///
///
/// Posted when the user presses the first or second X button while the cursor is in the client area of a window. If the mouse is
/// not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has
/// captured the mouse.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_XBUTTONDOWN 0x020B
///
///
/// Parameters
/// wParam
/// The low-order word indicates whether various virtual keys are down. It can be one or more of the following values.
///
///
/// Value
/// Meaning
///
/// -
/// MK_CONTROL 0x0008
/// The CTRL key is down.
///
/// -
/// MK_LBUTTON 0x0001
/// The left mouse button is down.
///
/// -
/// MK_MBUTTON 0x0010
/// The middle mouse button is down.
///
/// -
/// MK_RBUTTON 0x0002
/// The right mouse button is down.
///
/// -
/// MK_SHIFT 0x0004
/// The SHIFT key is down.
///
/// -
/// MK_XBUTTON1 0x0020
/// The first X button is down.
///
/// -
/// MK_XBUTTON2 0x0040
/// The second X button is down.
///
///
/// The high-order word indicates which button was clicked. It can be one of the following values.
///
///
/// Value
/// Meaning
///
/// -
/// XBUTTON1 0x0001
/// The first X button was clicked.
///
/// -
/// XBUTTON2 0x0002
/// The second X button was clicked.
///
///
/// lParam
///
/// The low-order word specifies the x-coordinate of the cursor. The coordinate is relative to the upper-left corner of the
/// client area.
///
///
/// The high-order word specifies the y-coordinate of the cursor. The coordinate is relative to the upper-left corner of the
/// client area.
///
/// Returns
///
/// If an application processes this message, it should return TRUE. For more information about processing the return
/// value, see the Remarks section.
///
///
/// Use the following code to get the information in the wParam parameter:
///
/// fwKeys = GET_KEYSTATE_WPARAM (wParam); fwButton = GET_XBUTTON_WPARAM (wParam);
///
/// Use the following code to obtain the horizontal and vertical position:
///
/// xPos = GET_X_LPARAM(lParam); yPos = GET_Y_LPARAM(lParam);
///
///
/// As noted above, the x-coordinate is in the low-order short of the return value; the y-coordinate is in the high-order
/// short (both represent signed values because they can take negative values on systems with multiple monitors). If the
/// return value is assigned to a variable, you can use the MAKEPOINTS macro to obtain a POINTS structure from the
/// return value. You can also use the GET_X_LPARAM or GET_Y_LPARAM macro to extract the x- or y-coordinate.
///
///
/// Important
///
/// Do not use the LOWORD or HIWORD macros to extract the x- and y- coordinates of the cursor position because
/// these macros return incorrect results on systems with multiple monitors. Systems with multiple monitors can have negative x-
/// and y- coordinates, and LOWORD and HIWORD treat the coordinates as unsigned quantities.
///
///
///
/// Unlike the WM_LBUTTONDOWN, WM_MBUTTONDOWN, and WM_RBUTTONDOWN messages, an application should return
/// TRUE from this message if it processes it. Doing so allows software that simulates this message on Windows systems
/// earlier than Windows 2000 to determine whether the window procedure processed the message or called DefWindowProc to
/// process it.
///
///
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-xbuttondown
WM_XBUTTONDOWN = 0x020B,
///
///
/// Posted when the user releases the first or second X button while the cursor is in the client area of a window. If the mouse
/// is not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that
/// has captured the mouse.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_XBUTTONUP 0x020C
///
///
/// Parameters
/// wParam
/// The low-order word indicates whether various virtual keys are down. It can be one or more of the following values.
///
///
/// Value
/// Meaning
///
/// -
/// MK_CONTROL 0x0008
/// The CTRL key is down.
///
/// -
/// MK_LBUTTON 0x0001
/// The left mouse button is down.
///
/// -
/// MK_MBUTTON 0x0010
/// The middle mouse button is down.
///
/// -
/// MK_RBUTTON 0x0002
/// The right mouse button is down.
///
/// -
/// MK_SHIFT 0x0004
/// The SHIFT key is down.
///
/// -
/// MK_XBUTTON1 0x0020
/// The first X button is down.
///
/// -
/// MK_XBUTTON2 0x0040
/// The second X button is down.
///
///
/// The high-order word indicates which button was released. It can be one of the following values:
///
///
/// Value
/// Meaning
///
/// -
/// XBUTTON1 0x0001
/// The first X button was released.
///
/// -
/// XBUTTON2 0x0002
/// The second X button was released.
///
///
/// lParam
///
/// The low-order word specifies the x-coordinate of the cursor. The coordinate is relative to the upper-left corner of the
/// client area.
///
///
/// The high-order word specifies the y-coordinate of the cursor. The coordinate is relative to the upper-left corner of the
/// client area.
///
/// Returns
///
/// If an application processes this message, it should return TRUE. For more information about processing the return
/// value, see the Remarks section.
///
///
/// Use the following code to get the information in the wParam parameter:
///
/// fwKeys = GET_KEYSTATE_WPARAM (wParam); fwButton = GET_XBUTTON_WPARAM (wParam);
///
/// Use the following code to obtain the horizontal and vertical position:
///
/// xPos = GET_X_LPARAM(lParam); yPos = GET_Y_LPARAM(lParam);
///
///
/// As noted above, the x-coordinate is in the low-order short of the return value; the y-coordinate is in the high-order
/// short (both represent signed values because they can take negative values on systems with multiple monitors). If the
/// return value is assigned to a variable, you can use the MAKEPOINTS macro to obtain a POINTS structure from the
/// return value. You can also use the GET_X_LPARAM or GET_Y_LPARAM macro to extract the x- or y-coordinate.
///
///
/// Important
///
/// Do not use the LOWORD or HIWORD macros to extract the x- and y- coordinates of the cursor position because
/// these macros return incorrect results on systems with multiple monitors. Systems with multiple monitors can have negative x-
/// and y- coordinates, and LOWORD and HIWORD treat the coordinates as unsigned quantities.
///
///
///
/// Unlike the WM_LBUTTONUP, WM_MBUTTONUP, and WM_RBUTTONUP messages, an application should return
/// TRUE from this message if it processes it. Doing so will allow software that simulates this message on Windows systems
/// earlier than Windows 2000 to determine whether the window procedure processed the message or called DefWindowProc to
/// process it.
///
///
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-xbuttonup
WM_XBUTTONUP = 0x020C,
///
///
/// Posted when the user double-clicks the first or second X button while the cursor is in the client area of a window. If the
/// mouse is not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window
/// that has captured the mouse.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_XBUTTONDBLCLK 0x020D
///
///
/// Parameters
/// wParam
/// The low-order word indicates whether various virtual keys are down. It can be one or more of the following values.
///
///
/// Value
/// Meaning
///
/// -
/// MK_CONTROL 0x0008
/// The CTRL key is down.
///
/// -
/// MK_LBUTTON 0x0001
/// The left mouse button is down.
///
/// -
/// MK_MBUTTON 0x0010
/// The middle mouse button is down.
///
/// -
/// MK_RBUTTON 0x0002
/// The right mouse button is down.
///
/// -
/// MK_SHIFT 0x0004
/// The SHIFT key is down.
///
/// -
/// MK_XBUTTON1 0x0020
/// The first X button is down.
///
/// -
/// MK_XBUTTON2 0x0040
/// The second X button is down.
///
///
/// The high-order word indicates which button was double-clicked. It can be one of the following values.
///
///
/// Value
/// Meaning
///
/// -
/// XBUTTON1 0x0001
/// The first X button was double-clicked.
///
/// -
/// XBUTTON2 0x0002
/// The second X button was double-clicked.
///
///
/// lParam
///
/// The low-order word specifies the x-coordinate of the cursor. The coordinate is relative to the upper-left corner of the
/// client area.
///
///
/// The high-order word specifies the y-coordinate of the cursor. The coordinate is relative to the upper-left corner of the
/// client area.
///
/// Returns
///
/// If an application processes this message, it should return TRUE. For more information about processing the return
/// value, see the Remarks section.
///
///
/// Use the following code to get the information in the wParam parameter:
///
/// fwKeys = GET_KEYSTATE_WPARAM (wParam); fwButton = GET_XBUTTON_WPARAM (wParam);
///
/// Use the following code to obtain the horizontal and vertical position:
///
/// xPos = GET_X_LPARAM(lParam); yPos = GET_Y_LPARAM(lParam);
///
///
/// As noted above, the x-coordinate is in the low-order short of the return value; the y-coordinate is in the high-order
/// short (both represent signed values because they can take negative values on systems with multiple monitors). If the
/// return value is assigned to a variable, you can use the MAKEPOINTS macro to obtain a POINTS structure from the
/// return value. You can also use the GET_X_LPARAM or GET_Y_LPARAM macro to extract the x- or y-coordinate.
///
///
/// Important
///
/// Do not use the LOWORD or HIWORD macros to extract the x- and y- coordinates of the cursor position because
/// these macros return incorrect results on systems with multiple monitors. Systems with multiple monitors can have negative x-
/// and y- coordinates, and LOWORD and HIWORD treat the coordinates as unsigned quantities.
///
///
///
/// Only windows that have the CS_DBLCLKS style can receive WM_XBUTTONDBLCLK messages, which the system generates
/// whenever the user presses, releases, and again presses an X button within the system's double-click time limit.
/// Double-clicking one of these buttons actually generates four messages: WM_XBUTTONDOWN, WM_XBUTTONUP,
/// WM_XBUTTONDBLCLK, and WM_XBUTTONUP again.
///
///
/// Unlike the WM_LBUTTONDBLCLK, WM_MBUTTONDBLCLK, and WM_RBUTTONDBLCLK messages, an application should
/// return TRUE from this message if it processes it. Doing so will allow software that simulates this message on Windows
/// systems earlier than Windows 2000 to determine whether the window procedure processed the message or called
/// DefWindowProc to process it.
///
///
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-xbuttondblclk
WM_XBUTTONDBLCLK = 0x020D,
///
///
/// Sent to the active window when the mouse's horizontal scroll wheel is tilted or rotated. The DefWindowProc function
/// propagates the message to the window's parent. There should be no internal forwarding of the message, since
/// DefWindowProc propagates it up the parent chain until it finds a window that processes it.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_MOUSEHWHEEL 0x020E
///
///
/// Parameters
/// wParam
///
/// The high-order word indicates the distance the wheel is rotated, expressed in multiples or factors of WHEEL_DELTA,
/// which is set to 120. A positive value indicates that the wheel was rotated to the right; a negative value indicates that the
/// wheel was rotated to the left.
///
///
/// The low-order word indicates whether various virtual keys are down. This parameter can be one or more of the following values.
///
///
///
/// Value
/// Meaning
///
/// -
/// MK_CONTROL 0x0008
/// The CTRL key is down.
///
/// -
/// MK_LBUTTON 0x0001
/// The left mouse button is down.
///
/// -
/// MK_MBUTTON 0x0010
/// The middle mouse button is down.
///
/// -
/// MK_RBUTTON 0x0002
/// The right mouse button is down.
///
/// -
/// MK_SHIFT 0x0004
/// The SHIFT key is down.
///
/// -
/// MK_XBUTTON1 0x0020
/// The first X button is down.
///
/// -
/// MK_XBUTTON2 0x0040
/// The second X button is down.
///
///
/// lParam
/// The low-order word specifies the x-coordinate of the pointer, relative to the upper-left corner of the screen.
/// The high-order word specifies the y-coordinate of the pointer, relative to the upper-left corner of the screen.
/// Returns
/// If an application processes this message, it should return zero.
///
/// Use the following code to obtain the information in the wParam parameter.
///
/// fwKeys = GET_KEYSTATE_WPARAM(wParam); zDelta = GET_WHEEL_DELTA_WPARAM(wParam);
///
/// Use the following code to obtain the horizontal and vertical position.
///
/// xPos = GET_X_LPARAM(lParam); yPos = GET_Y_LPARAM(lParam);
///
///
/// As noted above, the x-coordinate is in the low-order short of the return value; the y-coordinate is in the high-order
/// short (both represent signed values because they can take negative values on systems with multiple monitors). If the
/// return value is assigned to a variable, you can use the MAKEPOINTS macro to obtain a POINTS structure from the
/// return value. You can also use the GET_X_LPARAM or GET_Y_LPARAM macro to extract the x- or y-coordinate.
///
///
/// Important
///
/// Do not use the LOWORD or HIWORD macros to extract the x- and y- coordinates of the cursor position because
/// these macros return incorrect results on systems with multiple monitors. Systems with multiple monitors can have negative x-
/// and y- coordinates, and LOWORD and HIWORD treat the coordinates as unsigned quantities.
///
///
///
/// The wheel rotation is a multiple of WHEEL_DELTA, which is set to 120. This is the threshold for action to be taken,
/// and one such action (for example, scrolling one increment) should occur for each delta.
///
///
/// The delta was set to 120 to allow Microsoft or other vendors to build finer-resolution wheels (for example, a freely-rotating
/// wheel with no notches) to send more messages per rotation, but with a smaller value in each message. To use this feature, you
/// can either add the incoming delta values until WHEEL_DELTA is reached (so for a delta-rotation you get the same
/// response), or scroll partial lines in response to more frequent messages. You can also choose your scroll granularity and
/// accumulate deltas until it is reached.
///
///
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-mousehwheel
WM_MOUSEHWHEEL = 0x020E,
/// The last mouse related message.
WM_MOUSELAST = 0x020E,
///
///
/// Sent to a window when a significant action occurs on a descendant window. This message is now extended to include the
/// WM_POINTERDOWN event. When the child window is being created, the system sends WM_PARENTNOTIFY just before the
/// CreateWindow or CreateWindowEx function that creates the window returns. When the child window is being
/// destroyed, the system sends the message before any processing to destroy the window takes place.
///
/// A window receives this message through its WindowProc function.
///
///
/// [!Important] Desktop apps should be DPI aware. If your app is not DPI aware, screen coordinates contained in pointer messages
/// and related structures might appear inaccurate due to DPI virtualization. DPI virtualization provides automatic scaling
/// support to applications that are not DPI aware and is active by default (users can turn it off). For more information, see
/// Writing High-DPI Win32 Applications.
///
///
///
/// #define WM_PARENTNOTIFY 0x0210
///
///
/// Parameters
/// wParam
///
/// The low-order word of wParam specifies the event for which the parent is being notified. The value of the high-order word
/// depends on the value of the low-order word. This parameter can be one of the following values.
///
///
///
/// LOWORD( wParam)
/// Meaning
///
/// -
/// WM_CREATE 0x0001
///
/// The child window is being created. HIWORD( wParam) is the identifier of the child window. lParam is a handle to
/// the child window.
///
///
/// -
/// WM_DESTROY 0x0002
///
/// The child window is being destroyed. HIWORD( wParam) is the identifier of the child window. lParam is a handle
/// to the child window.
///
///
/// -
/// WM_LBUTTONDOWN 0x0201
///
/// The user has placed the cursor over the child window and has clicked the left mouse button. HIWORD( wParam) is
/// undefined. lParam is the x-coordinate of the cursor is the low-order word, and the y-coordinate of the cursor is the
/// high-order word.
///
///
/// -
/// WM_MBUTTONDOWN 0x0207
///
/// The user has placed the cursor over the child window and has clicked the middle mouse button. HIWORD( wParam) is
/// undefined. lParam is the x-coordinate of the cursor is the low-order word, and the y-coordinate of the cursor is the
/// high-order word.
///
///
/// -
/// WM_RBUTTONDOWN 0x0204
///
/// The user has placed the cursor over the child window and has clicked the right mouse button. HIWORD( wParam) is
/// undefined. lParam is the x-coordinate of the cursor is the low-order word, and the y-coordinate of the cursor is the
/// high-order word.
///
///
/// -
/// WM_XBUTTONDOWN 0x020B
///
/// The user has placed the cursor over the child window and has clicked the first or second X button. HIWORD( wParam)
/// indicates which button was pressed. This parameter can be one of the following values: XBUTTON1 or XBUTTON2. lParam is
/// the x-coordinate of the cursor is the low-order word, and the y-coordinate of the cursor is the high-order word.
///
///
/// -
/// WM_POINTERDOWN 0x0246
///
/// A pointer has made contact with the child window. HIWORD( wParam) contains the identifier of the pointer that
/// generated the WM_POINTERDOWN event.
///
///
///
/// lParam
/// Contains the point location of the pointer.
///
/// Note
///
/// Because the pointer may make contact with the device over a non-trivial area, this point location may be a simplification of
/// a more complex pointer area. Whenever possible, an application should use the complete pointer area information instead of
/// the point location.
///
///
/// Use the following macros to retrieve the physical screen coordinates of the point.
///
/// -
/// GET_X_LPARAM(lParam): the x (horizontal point) coordinate.
///
/// -
/// GET_Y_LPARAM(lParam): the y (vertical point) coordinate.
///
///
/// Returns
/// If the application processes this message, it returns zero.
/// If the application does not process this message, it calls DefWindowProc.
///
/// This message is also sent to all ancestor windows of the child window, including the top-level window.
///
/// All child windows, except those that have the WS_EX_NOPARENTNOTIFY extended window style, send this message to their
/// parent windows. By default, child windows in a dialog box have the WS_EX_NOPARENTNOTIFY style, unless the
/// CreateWindowEx function is called to create the child window without this style.
///
///
/// This notification provides the child window's ancestor windows an opportunity to examine the pointer information and, if
/// required, capture the pointer using the pointer capture functions.
///
///
// https://docs.microsoft.com/en-us/windows/win32/inputmsg/wm-parentnotify
WM_PARENTNOTIFY = 0x0210,
///
/// Notifies an application's main window procedure that a menu modal loop has been entered.
///
/// #define WM_ENTERMENULOOP 0x0211
///
///
/// Parameters
/// wParam
///
/// Specifies whether the window menu was entered using the TrackPopupMenu function. This parameter has a value of
/// TRUE if the window menu was entered using TrackPopupMenu, and FALSE if it was not.
///
/// lParam
/// This parameter is not used.
/// Returns
/// An application should return zero if it processes this message.
/// The DefWindowProc function returns zero.
// https://docs.microsoft.com/en-us/windows/win32/menurc/wm-entermenuloop
WM_ENTERMENULOOP = 0x0211,
///
/// Notifies an application's main window procedure that a menu modal loop has been exited.
///
/// #define WM_EXITMENULOOP 0x0212
///
///
/// Parameters
/// wParam
///
/// Specifies whether the menu is a shortcut menu. This parameter has a value of TRUE if it is a shortcut menu,
/// FALSE if it is not.
///
/// lParam
/// This parameter is not used.
/// Returns
/// An application should return zero if it processes this message.
/// The DefWindowProc function returns zero.
// https://docs.microsoft.com/en-us/windows/win32/menurc/wm-exitmenuloop
WM_EXITMENULOOP = 0x0212,
///
/// Sent to an application when the right or left arrow key is used to switch between the menu bar and the system menu.
///
/// #define WM_NEXTMENU 0x0213
///
///
/// Parameters
/// wParam
/// The virtual-key code of the key. See Virtual-Key Codes.
/// lParam
/// A pointer to a MDINEXTMENU structure that contains information about the menu to be activated.
///
/// In responding to this message, the application can specify the menu to switch to in the hmenuNext member of
/// MDINEXTMENU and the window to receive the menu notification messages in the hwndNext member of the
/// MDINEXTMENU structure. You must set both members for the changes to take effect (they are initially NULL).
///
// https://docs.microsoft.com/en-us/windows/win32/menurc/wm-nextmenu
WM_NEXTMENU = 0x0213,
///
///
/// Sent to a window that the user is resizing. By processing this message, an application can monitor the size and position of
/// the drag rectangle and, if needed, change its size or position.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_SIZING 0x0214
///
///
/// Parameters
/// wParam
/// The edge of the window that is being sized. This parameter can be one of the following values.
///
///
/// Value
/// Meaning
///
/// -
/// WMSZ_BOTTOM 6
/// Bottom edge
///
/// -
/// WMSZ_BOTTOMLEFT 7
/// Bottom-left corner
///
/// -
/// WMSZ_BOTTOMRIGHT 8
/// Bottom-right corner
///
/// -
/// WMSZ_LEFT 1
/// Left edge
///
/// -
/// WMSZ_RIGHT 2
/// Right edge
///
/// -
/// WMSZ_TOP 3
/// Top edge
///
/// -
/// WMSZ_TOPLEFT 4
/// Top-left corner
///
/// -
/// WMSZ_TOPRIGHT 5
/// Top-right corner
///
///
/// lParam
///
/// A pointer to a RECT structure with the screen coordinates of the drag rectangle. To change the size or position of the
/// drag rectangle, an application must change the members of this structure.
///
/// Returns
/// Type: LRESULT
/// An application should return TRUE if it processes this message.
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-sizing
WM_SIZING = 0x0214,
///
/// Sent to the window that is losing the mouse capture.
/// A window receives this message through its WindowProc function.
///
/// #define WM_CAPTURECHANGED 0x0215
///
///
/// Parameters
/// wParam
/// This parameter is not used.
/// lParam
/// A handle to the window gaining the mouse capture.
/// Returns
/// An application should return zero if it processes this message.
///
///
/// A window receives this message even if it calls ReleaseCapture itself. An application should not attempt to set the
/// mouse capture in response to this message.
///
/// When it receives this message, a window should redraw itself, if necessary, to reflect the new mouse-capture state.
///
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-capturechanged
WM_CAPTURECHANGED = 0x0215,
///
///
/// Sent to a window that the user is moving. By processing this message, an application can monitor the position of the drag
/// rectangle and, if needed, change its position.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_MOVING 0x0216
///
///
/// Parameters
/// wParam
/// This parameter is not used.
/// lParam
///
/// A pointer to a RECT structure with the current position of the window, in screen coordinates. To change the position
/// of the drag rectangle, an application must change the members of this structure.
///
/// Returns
/// Type: LRESULT
/// An application should return TRUE if it processes this message.
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-moving
WM_MOVING = 0x0216,
///
/// Notifies applications that a power-management event has occurred.
/// A window receives this message through its WindowProc function.
///
/// LRESULT CALLBACK WindowProc( HWND hwnd, // handle to window UINT uMsg, // WM_POWERBROADCAST WPARAM wParam, // power-management event LPARAM lParam // function-specific data );
///
///
/// Parameters
/// hwnd
/// A handle to window.
/// *uMsg*
///
///
/// Value
/// Meaning
///
/// -
/// WM_POWERBROADCAST 536 (0x218)
/// Message identifier.
///
///
/// wParam
/// The power-management event. This parameter can be one of the following event identifiers.
///
///
/// Event
/// Meaning
///
/// -
/// PBT_APMPOWERSTATUSCHANGE 10 (0xA)
/// Power status has changed.
///
/// -
/// PBT_APMRESUMEAUTOMATIC 18 (0x12)
/// Operation is resuming automatically from a low-power state. This message is sent every time the system resumes.
///
/// -
/// PBT_APMRESUMESUSPEND 7 (0x7)
///
/// Operation is resuming from a low-power state. This message is sent after PBT_APMRESUMEAUTOMATIC if the resume is triggered by
/// user input, such as pressing a key.
///
///
/// -
/// PBT_APMSUSPEND 4 (0x4)
/// System is suspending operation.
///
/// -
/// PBT_POWERSETTINGCHANGE 32787 (0x8013)
/// A power setting change event has been received.
///
///
/// lParam
/// The event-specific data. For most events, this parameter is reserved and not used.
///
/// If the wParam parameter is PBT_POWERSETTINGCHANGE, the lParam parameter is a pointer to a POWERBROADCAST_SETTING structure.
///
/// Returns
/// An application should return TRUE if it processes this message.
///
///
/// The system always sends a PBT_APMRESUMEAUTOMATIC message whenever the system resumes. If the system resumes in response to
/// user input such as pressing a key, the system also sends a PBT_APMRESUMESUSPEND message after sending PBT_APMRESUMEAUTOMATIC.
///
///
/// WM_POWERBROADCAST messages do not distinguish between different low-power states. An application can determine only
/// that the system is entering or has resumed from a low-power state; it cannot determine the specific power state. The system
/// records details about power state transitions in the Windows System event log.
///
///
/// To prevent the system from transitioning to a low-power state in Windows Vista, an application must call
/// SetThreadExecutionState to inform the system that it is in use.
///
/// The following messages are not supported on any of the operating systems specified in the Requirements section:
///
/// -
/// PBT_APMQUERYSTANDBY
///
/// -
/// PBT_APMQUERYSTANDBYFAILED
///
/// -
/// PBT_APMSTANDBY
///
/// -
/// PBT_APMRESUMESTANDBY
///
///
///
// https://docs.microsoft.com/en-us/windows/win32/power/wm-powerbroadcast
WM_POWERBROADCAST = 0x0218,
///
/// Notifies an application of a change to the hardware configuration of a device or the computer.
/// A window receives this message through its WindowProc function.
///
/// LRESULT CALLBACK WindowProc(HWND hwnd, // handle to window UINT uMsg, // WM_DEVICECHANGE WPARAM wParam, // device-change event LPARAM lParam ); // event-specific data
///
///
/// Parameters
/// hwnd
/// A handle to the window.
/// uMsg
/// The WM_DEVICECHANGE identifier.
/// wParam
/// The event that has occurred. This parameter can be one of the following values from the Dbt.h header file.
///
///
/// Value
/// Meaning
///
/// -
/// DBT_DEVNODES_CHANGED 0x0007
/// A device has been added to or removed from the system.
///
/// -
/// DBT_QUERYCHANGECONFIG 0x0017
/// Permission is requested to change the current configuration (dock or undock).
///
/// -
/// DBT_CONFIGCHANGED 0x0018
/// The current configuration has changed, due to a dock or undock.
///
/// -
/// DBT_CONFIGCHANGECANCELED 0x0019
/// A request to change the current configuration (dock or undock) has been canceled.
///
/// -
/// DBT_DEVICEARRIVAL 0x8000
/// A device or piece of media has been inserted and is now available.
///
/// -
/// DBT_DEVICEQUERYREMOVE 0x8001
///
/// Permission is requested to remove a device or piece of media. Any application can deny this request and cancel the removal.
///
///
/// -
/// DBT_DEVICEQUERYREMOVEFAILED 0x8002
/// A request to remove a device or piece of media has been canceled.
///
/// -
/// DBT_DEVICEREMOVEPENDING 0x8003
/// A device or piece of media is about to be removed. Cannot be denied.
///
/// -
/// DBT_DEVICEREMOVECOMPLETE 0x8004
/// A device or piece of media has been removed.
///
/// -
/// DBT_DEVICETYPESPECIFIC 0x8005
/// A device-specific event has occurred.
///
/// -
/// DBT_CUSTOMEVENT 0x8006
/// A custom event has occurred.
///
/// -
/// DBT_USERDEFINED 0xFFFF
/// The meaning of this message is user-defined.
///
///
/// lParam
///
/// A pointer to a structure that contains event-specific data. Its format depends on the value of the wParam parameter. For more
/// information, refer to the documentation for each event.
///
/// Returns
/// Return TRUE to grant the request.
/// Return BROADCAST_QUERY_DENY to deny the request.
///
/// For devices that offer software-controllable features, such as ejection and locking, the system typically sends a
/// DBT_DEVICEREMOVEPENDING message to let applications and device drivers end their use of the device gracefully. If the system
/// forcibly removes a device, it may not send a DBT_DEVICEQUERYREMOVE message before doing so.
///
// https://docs.microsoft.com/en-us/windows/win32/devio/wm-devicechange
WM_DEVICECHANGE = 0x0219,
///
///
/// An application sends the WM_MDICREATE message to a multiple-document interface (MDI) client window to create an MDI
/// child window.
///
///
/// #define WM_MDICREATE 0x0220
///
///
/// Parameters
/// wParam
/// This parameter is not used.
/// lParam
///
/// A pointer to an MDICREATESTRUCT structure containing information that the system uses to create the MDI child window.
///
/// Returns
/// Type: HWND
/// If the message succeeds, the return value is the handle to the new child window.
/// If the message fails, the return value is NULL.
///
///
/// The MDI child window is created with the window style bits WS_CHILD, WS_CLIPSIBLINGS,
/// WS_CLIPCHILDREN, WS_SYSMENU, WS_CAPTION, WS_THICKFRAME, WS_MINIMIZEBOX, and
/// WS_MAXIMIZEBOX, plus additional style bits specified in the MDICREATESTRUCT structure. The system adds the
/// title of the new child window to the window menu of the frame window. An application should use this message to create all
/// child windows of the client window.
///
///
/// If an MDI client window receives any message that changes the activation of its child windows while the active child window
/// is maximized, the system restores the active child window and maximizes the newly activated child window.
///
///
/// When an MDI child window is created, the system sends the WM_CREATE message to the window. The lParam parameter of the
/// WM_CREATE message contains a pointer to a CREATESTRUCT structure. The lpCreateParams member of this structure
/// contains a pointer to the MDICREATESTRUCT structure passed with the WM_MDICREATE message that created the MDI
/// child window.
///
///
/// An application should not send a second WM_MDICREATE message while a WM_MDICREATE message is still being
/// processed. For example, it should not send a WM_MDICREATE message while an MDI child window is processing its
/// WM_MDICREATE message.
///
///
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-mdicreate
WM_MDICREATE = 0x0220,
///
///
/// An application sends the WM_MDIDESTROY message to a multiple-document interface (MDI) client window to close an MDI
/// child window.
///
///
/// #define WM_MDIDESTROY 0x0221
///
///
/// Parameters
/// wParam
/// A handle to the MDI child window to be closed.
/// lParam
/// This parameter is not used.
/// Returns
/// Type: zero
/// This message always returns zero.
///
///
/// This message removes the title of the MDI child window from the MDI frame window and deactivates the child window. An
/// application should use this message to close all MDI child windows.
///
///
/// If an MDI client window receives a message that changes the activation of its child windows and the active MDI child window
/// is maximized, the system restores the active child window and maximizes the newly activated child window.
///
///
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-mdidestroy
WM_MDIDESTROY = 0x0221,
///
///
/// An application sends the WM_MDIACTIVATE message to a multiple-document interface (MDI) client window to instruct the
/// client window to activate a different MDI child window.
///
///
/// #define WM_MDIACTIVATE 0x0222
///
///
/// Parameters
/// wParam
/// A handle to the MDI child window to be activated.
/// lParam
/// This parameter is not used.
/// Returns
/// Type: LRESULT
/// If an application sends this message to an MDI client window, the return value is zero.
/// An MDI child window should return zero if it processes this message.
///
///
/// As the client window processes this message, it sends WM_MDIACTIVATE to the child window being deactivated and to the
/// child window being activated. The message parameters received by an MDI child window are as follows:
///
///
/// -
///
/// wParam
///
///
/// lParam
///
///
///
///
/// An MDI child window is activated independently of the MDI frame window. When the frame window becomes active, the child
/// window last activated by using the WM_MDIACTIVATE message receives the WM_NCACTIVATE message to draw an active
/// window frame and title bar; the child window does not receive another WM_MDIACTIVATE message.
///
///
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-mdiactivate
WM_MDIACTIVATE = 0x0222,
///
///
/// An application sends the WM_MDIRESTORE message to a multiple-document interface (MDI) client window to restore an MDI
/// child window from maximized or minimized size.
///
///
/// #define WM_MDIRESTORE 0x0223
///
///
/// Parameters
/// wParam
/// A handle to the MDI child window to be restored.
/// lParam
/// This parameter is not used.
/// Returns
/// Type: zero
/// The return value is always zero.
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-mdirestore
WM_MDIRESTORE = 0x0223,
///
///
/// An application sends the WM_MDINEXT message to a multiple-document interface (MDI) client window to activate the next
/// or previous child window.
///
///
/// #define WM_MDINEXT 0x0224
///
///
/// Parameters
/// wParam
///
/// A handle to the MDI child window. The system activates the child window that is immediately before or after the specified
/// child window, depending on the value of the lParam parameter. If the wParam parameter is NULL, the system activates
/// the child window that is immediately before or after the currently active child window.
///
/// lParam
///
/// If this parameter is zero, the system activates the next MDI child window and places the child window identified by the
/// wParam parameter behind all other child windows. If this parameter is nonzero, the system activates the previous child
/// window, placing it in front of the child window identified by wParam.
///
/// Returns
/// Type: zero
/// The return value is always zero.
///
/// If an MDI client window receives any message that changes the activation of its child windows while the active MDI child
/// window is maximized, the system restores the active child window and maximizes the newly activated child window.
///
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-mdinext
WM_MDINEXT = 0x0224,
///
///
/// An application sends the WM_MDIMAXIMIZE message to a multiple-document interface (MDI) client window to maximize an
/// MDI child window. The system resizes the child window to make its client area fill the client window. The system places the
/// child window's window menu icon in the rightmost position of the frame window's menu bar, and places the child window's
/// restore icon in the leftmost position. The system also appends the title bar text of the child window to that of the frame window.
///
///
/// #define WM_MDIMAXIMIZE 0x0225
///
///
/// Parameters
/// wParam
/// A handle to the MDI child window to be maximized.
/// lParam
/// This parameter is not used.
/// Returns
/// Type: zero
/// The return value is always zero.
///
/// If an MDI client window receives any message that changes the activation of its child windows while the currently active MDI
/// child window is maximized, the system restores the active child window and maximizes the newly activated child window.
///
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-mdimaximize
WM_MDIMAXIMIZE = 0x0225,
///
///
/// An application sends the WM_MDITILE message to a multiple-document interface (MDI) client window to arrange all of its
/// MDI child windows in a tile format.
///
///
/// #define WM_MDITILE 0x0226
///
///
/// Parameters
/// wParam
///
/// The tiling option. This parameter can be one of the following values, optionally combined with MDITILE_SKIPDISABLED to
/// prevent disabled MDI child windows from being tiled.
///
///
///
/// Value
/// Meaning
///
/// -
/// MDITILE_HORIZONTAL 0x0001
/// Tiles windows horizontally.
///
/// -
/// MDITILE_VERTICAL 0x0000
/// Tiles windows vertically.
///
///
/// lParam
/// This parameter is not used.
/// Returns
/// Type: BOOL
/// If the message succeeds, the return value is TRUE.
/// If the message fails, the return value is FALSE.
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-mditile
WM_MDITILE = 0x0226,
///
///
/// An application sends the WM_MDICASCADE message to a multiple-document interface (MDI) client window to arrange all its
/// child windows in a cascade format.
///
///
/// #define WM_MDICASCADE 0x0227
///
///
/// Parameters
/// wParam
/// The cascade behavior. This parameter can be one or more of the following values.
///
///
/// Value
/// Meaning
///
/// -
/// MDITILE_SKIPDISABLED 0x0002
/// Prevents disabled MDI child windows from being cascaded.
///
/// -
/// MDITILE_ZORDER 0x0004
/// Arranges the windows in Z order.
///
///
/// lParam
/// This parameter is not used.
/// Returns
/// Type: BOOL
/// If the message succeeds, the return value is TRUE.
/// If the message fails, the return value is FALSE.
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-mdicascade
WM_MDICASCADE = 0x0227,
///
///
/// An application sends the WM_MDIICONARRANGE message to a multiple-document interface (MDI) client window to arrange all
/// minimized MDI child windows. It does not affect child windows that are not minimized.
///
///
/// #define WM_MDIICONARRANGE 0x0228
///
///
/// Parameters
/// wParam
/// This parameter is not used; it must be zero.
/// lParam
/// This parameter is not used; it must be zero.
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-mdiiconarrange
WM_MDIICONARRANGE = 0x0228,
///
///
/// An application sends the WM_MDIGETACTIVE message to a multiple-document interface (MDI) client window to retrieve the
/// handle to the active MDI child window.
///
///
/// #define WM_MDIGETACTIVE 0x0229
///
///
/// Parameters
/// wParam
/// This parameter is not used.
/// lParam
///
/// The maximized state. If this parameter is not NULL, it is a pointer to a value that indicates the maximized state of
/// the MDI child window. If the value is TRUE, the window is maximized; a value of FALSE indicates that it is not.
/// If this parameter is NULL, the parameter is ignored.
///
/// Returns
/// Type: HWND
/// The return value is the handle to the active MDI child window.
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-mdigetactive
WM_MDIGETACTIVE = 0x0229,
///
///
/// An application sends the WM_MDISETMENU message to a multiple-document interface (MDI) client window to replace the
/// entire menu of an MDI frame window, to replace the window menu of the frame window, or both.
///
///
/// #define WM_MDISETMENU 0x0230
///
///
/// Parameters
/// wParam
/// A handle to the new frame window menu. If this parameter is NULL, the frame window menu is not changed.
/// lParam
/// A handle to the new window menu. If this parameter is NULL, the window menu is not changed.
/// Returns
/// Type: HMENU
/// If the message succeeds, the return value is the handle to the old frame window menu.
/// If the message fails, the return value is zero.
///
/// After sending this message, an application must call the DrawMenuBar function to update the menu bar.
///
/// If this message replaces the window menu, the MDI child window menu items are removed from the previous window menu and added
/// to the new window menu.
///
///
/// If an MDI child window is maximized and this message replaces the MDI frame window menu, the window menu icon and restore
/// icon are removed from the previous frame window menu and added to the new frame window menu.
///
///
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-mdisetmenu
WM_MDISETMENU = 0x0230,
///
///
/// Sent one time to a window after it enters the moving or sizing modal loop. The window enters the moving or sizing modal loop
/// when the user clicks the window's title bar or sizing border, or when the window passes the WM_SYSCOMMAND message to
/// the DefWindowProc function and the wParam parameter of the message specifies the SC_MOVE or SC_SIZE
/// value. The operation is complete when DefWindowProc returns.
///
/// The system sends the WM_ENTERSIZEMOVE message regardless of whether the dragging of full windows is enabled.
/// A window receives this message through its WindowProc function.
///
/// #define WM_ENTERSIZEMOVE 0x0231
///
///
/// Parameters
/// wParam
/// This parameter is not used.
/// lParam
/// This parameter is not used.
/// Returns
/// Type: LRESULT
/// An application should return zero if it processes this message.
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-entersizemove
WM_ENTERSIZEMOVE = 0x0231,
///
///
/// Sent one time to a window, after it has exited the moving or sizing modal loop. The window enters the moving or sizing modal
/// loop when the user clicks the window's title bar or sizing border, or when the window passes the WM_SYSCOMMAND message
/// to the DefWindowProc function and the wParam parameter of the message specifies the SC_MOV E or SC_SIZE
/// value. The operation is complete when DefWindowProc returns.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_EXITSIZEMOVE 0x0232
///
///
/// Parameters
/// wParam
/// This parameter is not used.
/// lParam
/// This parameter is not used.
/// Returns
/// Type: LRESULT
/// An application should return zero if it processes this message.
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-exitsizemove
WM_EXITSIZEMOVE = 0x0232,
///
///
/// Sent when the user drops a file on the window of an application that has registered itself as a recipient of dropped files.
///
///
/// PostMessage( (HWND) hWndControl, // handle to destination control (UINT) WM_DROPFILES, // message ID (WPARAM) wParam, // = (WPARAM) (HDROP) hDrop; (LPARAM) lParam // = 0; not used, must be zero );
///
///
/// Parameters
/// hDrop
///
/// A handle to an internal structure describing the dropped files. Pass this handle DragFinish, DragQueryFile, or
/// DragQueryPoint to retrieve information about the dropped files.
///
/// lParam
/// Must be zero.
/// Returns
/// An application should return zero if it processes this message.
///
/// The HDROP handle is declared in Shellapi.h. You must include this header in your build to use WM_DROPFILES. For
/// further discussion of how to use drag-and-drop to transfer Shell data, see Transferring Shell Data Using Drag-and-Drop or the Clipboard.
///
// https://docs.microsoft.com/en-us/windows/win32/shell/wm-dropfiles
WM_DROPFILES = 0x0233,
///
///
/// An application sends the WM_MDIREFRESHMENU message to a multiple-document interface (MDI) client window to refresh the
/// window menu of the MDI frame window.
///
///
/// #define WM_MDIREFRESHMENU 0x0234
///
///
/// Parameters
/// wParam
/// This parameter is not used and must be zero.
/// lParam
/// This parameter is not used and must be zero.
/// Returns
/// Type: HMENU
/// If the message succeeds, the return value is the handle to the frame window menu.
/// If the message fails, the return value is NULL.
/// After sending this message, an application must call the DrawMenuBar function to update the menu bar.
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-mdirefreshmenu
WM_MDIREFRESHMENU = 0x0234,
///
/// Sent to an application when a window is activated. A window receives this message through its WindowProc function.
///
/// LRESULT CALLBACK WindowProc( HWND hwnd, WM_IME_SETCONTEXT, WPARAM wParam, LPARAM lParam );
///
///
/// Parameters
/// hwnd
/// A handle to window.
/// wParam
/// TRUE if the window is active, and FALSE otherwise.
/// lParam
/// Display options. This parameter can have one or more of the following values.
///
///
/// Value
/// Meaning
///
/// -
/// ISC_SHOWUICOMPOSITIONWINDOW
/// Show the composition window by user interface window.
///
/// -
/// ISC_SHOWUIGUIDWINDOW
/// Show the guide window by user interface window.
///
/// -
/// ISC_SHOWUISOFTKBD
/// Show the soft keyboard by user interface window.
///
/// -
/// ISC_SHOWUICANDIDATEWINDOW
/// Show the candidate window of index 0 by user interface window.
///
/// -
/// ISC_SHOWUICANDIDATEWINDOW << 1
/// Show the candidate window of index 1 by user interface window.
///
/// -
/// ISC_SHOWUICANDIDATEWINDOW << 2
/// Show the candidate window of index 2 by user interface window.
///
/// -
/// ISC_SHOWUICANDIDATEWINDOW << 3
/// Show the candidate window of index 3 by user interface window.
///
///
/// Returns
/// Returns the value returned by DefWindowProc or ImmIsUIMessage.
///
///
/// If the application has created an IME window, it should call ImmIsUIMessage. Otherwise, it should pass this message to DefWindowProc.
///
///
/// If the application draws the composition window, the default IME window does not have to show its composition window. In this
/// case, the application must clear the ISC_SHOWUICOMPOSITIONWINDOW value from the lParam parameter before passing the
/// message to DefWindowProc or ImmIsUIMessage. To display a certain user interface window, an application should
/// remove the corresponding value so that the IME will not display it.
///
///
// https://docs.microsoft.com/en-us/windows/win32/intl/wm-ime-setcontext
WM_IME_SETCONTEXT = 0x0281,
///
///
/// Sent to an application to notify it of changes to the IME window. A window receives this message through its
/// WindowProc function.
///
///
/// LRESULT CALLBACK WindowProc( HWND hwnd, WM_IME_NOTIFY, WPARAM wParam, LPARAM lParam );
///
///
/// Parameters
/// hwnd
/// A handle to window.
/// wParam
/// The command. This parameter can have one of the following values.
///
/// lParam
///
/// Command-specific data, with format dependent on the value of the wParam parameter. For more information, refer to the
/// documentation for each command.
///
/// Returns
/// The return value depends on the command sent.
/// An application processes this message if it is responsible for managing the IME window.
// https://docs.microsoft.com/en-us/windows/win32/intl/wm-ime-notify
WM_IME_NOTIFY = 0x0282,
///
///
/// Sent by an application to direct the IME window to carry out the requested command. The application uses this message to
/// control the IME window that it has created. To send this message, the application calls the SendMessage function with
/// the following parameters.
///
///
/// SendMessage( HWND hwnd, WM_IME_CONTROL, WPARAM wParam, LPARAM lParam );
///
///
/// Parameters
/// hwnd
/// Handle to the window.
/// wParam
/// The command. This parameter can have one of the following values:
///
/// lParam
///
/// Command-specific data, with format dependent on the value of the wParam parameter. For more information, refer to the
/// documentation for each command.
///
/// Returns
/// The message returns a command-specific value.
// https://docs.microsoft.com/en-us/windows/win32/intl/wm-ime-control
WM_IME_CONTROL = 0x0283,
///
///
/// Sent to an application when the IME window finds no space to extend the area for the composition window. A window receives
/// this message through its WindowProc function.
///
///
/// LRESULT CALLBACK WindowProc( HWND hwnd, WM_IME_COMPOSITIONFULL, WPARAM wParam, LPARAM lParam );
///
///
/// Parameters
/// Returns
/// This message has no return value.
///
/// The application should use the IMC_SETCOMPOSITIONWINDOW command to specify how the window should be displayed.
/// The IME window, instead of the IME, sends this notification message by the SendMessage function.
///
// https://docs.microsoft.com/en-us/windows/win32/intl/wm-ime-compositionfull
WM_IME_COMPOSITIONFULL = 0x0284,
///
///
/// Sent to an application when the operating system is about to change the current IME. A window receives this message through
/// its WindowProc function.
///
///
/// LRESULT CALLBACK WindowProc( HWND hwnd, WM_IME_SELECT, WPARAM wParam, LPARAM lParam );
///
///
/// Parameters
/// hwnd
/// A handle to window.
/// wParam
///
/// Selection indicator. This parameter specifies TRUE if the indicated IME is selected. The parameter is set to
/// FALSE if the specified IME is no longer selected.
///
/// lParam
/// Input locale identifier associated with the IME.
/// Returns
/// This message has no return value.
///
///
/// An application that has created an IME window should pass this message to that window so that it can retrieve the keyboard
/// layout handle to the newly selected IME.
///
/// The DefWindowProc function processes this message by passing the information to the default IME window.
///
// https://docs.microsoft.com/en-us/windows/win32/intl/wm-ime-select
WM_IME_SELECT = 0x0285,
///
///
/// Sent to an application when the IME gets a character of the conversion result. A window receives this message through its
/// WindowProc function.
///
///
/// LRESULT CALLBACK WindowProc( HWND hwnd, WM_IME_CHAR, WPARAM wParam, LPARAM lParam );
///
///
/// Parameters
/// hwnd
/// A handle to window.
/// wParam
///
/// DBCS: A single-byte or double-byte character value. For a double-byte character, (BYTE)(wParam >> 8) contains
/// the lead byte. Note that the parentheses are necessary because the cast operator has higher precedence than the shift operator.
///
/// Unicode: A Unicode character value.
/// lParam
///
/// The repeat count, scan code, extended key flag, context code, previous key state flag, and transition state flag, with values
/// as defined below.
///
///
///
/// Bit
/// Meaning
///
/// -
/// 0-15
/// Repeat count. Since the first byte and second byte are continuous, this is always 1.
///
/// -
/// 16-23
/// Scan code for a complete Asian character.
///
/// -
/// 24
/// Extended key.
///
/// -
/// 25-28
/// Not used.
///
/// -
/// 29
/// Context code.
///
/// -
/// 30
/// Previous key state.
///
/// -
/// 31
/// Transition state.
///
///
///
///
/// Unlike the WM_CHAR message for a non-Unicode window, this message can include double-byte and single-byte character
/// values. For a Unicode window, this message is the same as WM_CHAR.
///
///
/// For a non-Unicode window, if the WM_IME_CHAR message includes a double-byte character and the application passes this message
/// to DefWindowProc, the IME converts this message into two WM_CHAR messages, each containing one byte of the double-byte character.
///
///
// https://docs.microsoft.com/en-us/windows/win32/intl/wm-ime-char
WM_IME_CHAR = 0x0286,
///
///
/// Sent to an application to provide commands and request information. A window receives this message through its
/// WindowProc function.
///
///
/// LRESULT CALLBACK WindowProc( HWND hwnd, WM_IME_REQUEST, WPARAM wParam, LPARAM lParam );
///
///
/// Parameters
/// hwnd
/// A handle to window.
/// wParam
/// Command. This parameter can have one of the following values:
///
/// lParam
/// Command-specific data. For more information, see the description for each command.
/// Returns
/// Returns a command-specific value.
// https://docs.microsoft.com/en-us/windows/win32/intl/wm-ime-request
WM_IME_REQUEST = 0x0288,
///
///
/// Sent to an application by the IME to notify the application of a key press and to keep message order. A window receives this
/// message through its WindowProc function.
///
///
/// LRESULT CALLBACK WindowProc( HWND hwnd, WM_IME_KEYDOWN, WPARAM wParam, LPARAM lParam );
///
///
/// Parameters
/// hwnd
/// A handle to window.
/// wParam
/// Virtual key code of the key.
/// lParam
///
/// Repeat count, scan code, extended key flag, context code, previous key state flag, and transition state flag, as shown in the
/// following table.
///
///
///
/// Bit
/// Meaning
///
/// -
/// 0-15
/// Repeat count.
///
/// -
/// 16-23
/// Scan code.
///
/// -
/// 24
/// Extended key. This value is 1 if it is an extended key. Otherwise, it is 0.
///
/// -
/// 25-28
/// Not used.
///
/// -
/// 29
/// Context code. This value is always 0.
///
/// -
/// 30
/// Previous key state. This value is 1 if the key is down or 0 if it is up.
///
/// -
/// 31
/// Transition state. This value is always 0.
///
///
/// Returns
/// An application should return 0 if it processes this message.
///
/// An application can process this message or pass it to the DefWindowProc function to generate a matching
/// WM_KEYDOWN message.
///
// https://docs.microsoft.com/en-us/windows/win32/intl/wm-ime-keydown
WM_IME_KEYDOWN = 0x0290,
///
///
/// Sent to an application by the IME to notify the application of a key release and to keep message order. A window receives
/// this message through its WindowProc function.
///
///
/// LRESULT CALLBACK WindowProc( HWND hwnd, WM_IME_KEYUP, WPARAM wParam, LPARAM lParam );
///
///
/// Parameters
/// hwnd
/// A handle to window.
/// wParam
/// Virtual key code of the key.
/// lParam
///
/// Repeat count, scan code, extended key flag, context code, previous key state flag, and transition state flag, as shown below.
///
///
///
/// Bit
/// Meaning
///
/// -
/// 0-15
/// Repeat count. This value is always 1.
///
/// -
/// 16-23
/// Scan code.
///
/// -
/// 24
/// Extended key. This value is 1 if it is an extended key. Otherwise, it is 0.
///
/// -
/// 25-28
/// Not used.
///
/// -
/// 29
/// Context code. This value is always 0.
///
/// -
/// 30
/// Previous key state. This value is always 1.
///
/// -
/// 31
/// Transition state. This value is always 1.
///
///
/// Returns
/// An application should return 0 if it processes this message.
///
/// An application can process this message or pass it to the DefWindowProc function to generate a matching
/// WM_KEYUP message.
///
// https://docs.microsoft.com/en-us/windows/win32/intl/wm-ime-keyup
WM_IME_KEYUP = 0x0291,
///
///
/// Posted to a window when the cursor hovers over the client area of the window for the period of time specified in a prior call
/// to TrackMouseEvent.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_MOUSEHOVER 0x02A1
///
///
/// Parameters
/// wParam
/// Indicates whether various virtual keys are down. This parameter can be one or more of the following values.
///
///
/// Value
/// Meaning
///
/// -
/// MK_CONTROL 0x0008
/// The CTRL key is depressed.
///
/// -
/// MK_LBUTTON 0x0001
/// The left mouse button is depressed.
///
/// -
/// MK_MBUTTON 0x0010
/// The middle mouse button is depressed.
///
/// -
/// MK_RBUTTON 0x0002
/// The right mouse button is depressed.
///
/// -
/// MK_SHIFT 0x0004
/// The SHIFT key is depressed.
///
/// -
/// MK_XBUTTON1 0x0020
/// The first X button is down.
///
/// -
/// MK_XBUTTON2 0x0040
/// The second X button is down.
///
///
/// lParam
///
/// The low-order word specifies the x-coordinate of the cursor. The coordinate is relative to the upper-left corner of the
/// client area.
///
///
/// The high-order word specifies the y-coordinate of the cursor. The coordinate is relative to the upper-left corner of the
/// client area.
///
/// Returns
/// If an application processes this message, it should return zero.
///
///
/// Hover tracking stops when WM_MOUSEHOVER is generated. The application must call TrackMouseEvent again if it
/// requires further tracking of mouse hover behavior.
///
/// Use the following code to obtain the horizontal and vertical position:
///
/// xPos = GET_X_LPARAM(lParam); yPos = GET_Y_LPARAM(lParam);
///
///
/// As noted above, the x-coordinate is in the low-order short of the return value; the y-coordinate is in the high-order
/// short (both represent signed values because they can take negative values on systems with multiple monitors). If the
/// return value is assigned to a variable, you can use the MAKEPOINTS macro to obtain a POINTS structure from the
/// return value. You can also use the GET_X_LPARAM or GET_Y_LPARAM macro to extract the x- or y-coordinate.
///
///
/// Important
///
/// Do not use the LOWORD or HIWORD macros to extract the x- and y- coordinates of the cursor position because
/// these macros return incorrect results on systems with multiple monitors. Systems with multiple monitors can have negative x-
/// and y- coordinates, and LOWORD and HIWORD treat the coordinates as unsigned quantities.
///
///
///
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-mousehover
WM_MOUSEHOVER = 0x02A1,
///
/// Posted to a window when the cursor leaves the client area of the window specified in a prior call to TrackMouseEvent.
/// A window receives this message through its WindowProc function.
///
/// #define WM_MOUSELEAVE 0x02A3
///
///
/// Parameters
/// wParam
/// This parameter is not used and must be zero.
/// lParam
/// This parameter is not used and must be zero.
/// Returns
/// If an application processes this message, it should return zero.
///
/// All tracking requested by TrackMouseEvent is canceled when this message is generated. The application must call
/// TrackMouseEvent when the mouse reenters its window if it requires further tracking of mouse hover behavior.
///
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-mouseleave
WM_MOUSELEAVE = 0x02A3,
///
///
/// Posted to a window when the cursor hovers over the nonclient area of the window for the period of time specified in a prior
/// call to TrackMouseEvent.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_NCMOUSEHOVER 0x02A0
///
///
/// Parameters
/// wParam
///
/// The hit-test value returned by the DefWindowProc function as a result of processing the WM_NCHITTEST message.
/// For a list of hit-test values, see WM_NCHITTEST.
///
/// lParam
///
/// A POINTS structure that contains the x- and y-coordinates of the cursor. The coordinates are relative to the
/// upper-left corner of the screen.
///
/// Returns
/// If an application processes this message, it should return zero.
///
///
/// Hover tracking stops when this message is generated. The application must call TrackMouseEvent again if it requires
/// further tracking of mouse hover behavior.
///
///
/// You can also use the GET_X_LPARAM and GET_Y_LPARAM macros to extract the values of the x- and y- coordinates
/// from lParam.
///
///
/// xPos = GET_X_LPARAM(lParam); yPos = GET_Y_LPARAM(lParam);
///
///
/// Important
///
/// Do not use the LOWORD or HIWORD macros to extract the x- and y- coordinates of the cursor position because
/// these macros return incorrect results on systems with multiple monitors. Systems with multiple monitors can have negative x-
/// and y- coordinates, and LOWORD and HIWORD treat the coordinates as unsigned quantities.
///
///
///
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-ncmousehover
WM_NCMOUSEHOVER = 0x02A0,
///
/// Posted to a window when the cursor leaves the nonclient area of the window specified in a prior call to TrackMouseEvent.
/// A window receives this message through its WindowProc function.
///
/// #define WM_NCMOUSELEAVE 0x02A2
///
///
/// Parameters
/// wParam
/// This parameter is not used and must be zero.
/// lParam
/// This parameter is not used and must be zero.
/// Returns
/// If an application processes this message, it should return zero.
///
/// All tracking requested by TrackMouseEvent is canceled when this message is generated. The application must call
/// TrackMouseEvent when the mouse reenters its window if it requires further tracking of mouse hover behavior.
///
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-ncmouseleave
WM_NCMOUSELEAVE = 0x02A2,
///
/// Notifies applications of changes in session state.
/// The window receives this message through its WindowProc function.
///
/// LRESULT CALLBACK WindowProc( HWND hWnd, // handle to window UINT Msg, // WM_WTSSESSION_CHANGE WPARAM wParam, // session state change event LPARAM lParam // session ID );
///
///
/// Parameters
/// hWnd
/// Handle to the window.
/// Msg
/// Specifies the message ( WM_WTSSESSION_CHANGE).
/// wParam
///
/// Status code describing the reason the session state change notification was sent. This parameter can be one of the following values.
///
/// WTS_CONSOLE_CONNECT (0x1)
/// The session identified by lParam was connected to the console terminal or RemoteFX session.
/// WTS_CONSOLE_DISCONNECT (0x2)
/// The session identified by lParam was disconnected from the console terminal or RemoteFX session.
/// WTS_REMOTE_CONNECT (0x3)
/// The session identified by lParam was connected to the remote terminal.
/// WTS_REMOTE_DISCONNECT (0x4)
/// The session identified by lParam was disconnected from the remote terminal.
/// WTS_SESSION_LOGON (0x5)
/// A user has logged on to the session identified by lParam.
/// WTS_SESSION_LOGOFF (0x6)
/// A user has logged off the session identified by lParam.
/// WTS_SESSION_LOCK (0x7)
/// The session identified by lParam has been locked.
/// WTS_SESSION_UNLOCK (0x8)
/// The session identified by lParam has been unlocked.
/// WTS_SESSION_REMOTE_CONTROL (0x9)
///
/// The session identified by lParam has changed its remote controlled status. To determine the status, call
/// GetSystemMetrics and check the SM_REMOTECONTROL metric.
///
/// WTS_SESSION_CREATE (0xA)
/// Reserved for future use.
/// WTS_SESSION_TERMINATE (0xB)
/// Reserved for future use.
/// Returns
/// The return value is ignored.
///
/// This message is sent only to applications that have registered to receive this message by calling WTSRegisterSessionNotification.
///
/// Examples of how applications can respond to this message include releasing or acquiring console-specific resources,
/// determining how a screen is to be painted, or triggering console animation effects.
///
///
// https://docs.microsoft.com/en-us/windows/win32/termserv/wm-wtssession-change
WM_WTSSESSION_CHANGE = 0x02B1,
///
WM_TABLET_LAST = 0x02df,
///
///
/// Sent when the effective dots per inch (dpi) for a window has changed. The DPI is the scale factor for a window. There are
/// multiple events that can cause the DPI to change. The following list indicates the possible causes for the change in DPI.
///
///
/// -
/// The window is moved to a new monitor that has a different DPI.
///
/// -
/// The DPI of the monitor hosting the window changes.
///
///
///
/// The current DPI for a window always equals the last DPI sent by WM_DPICHANGED. This is the scale factor that the
/// window should be scaling to for threads that are aware of DPI changes.
///
///
/// #define WM_DPICHANGED 0x02E0
///
///
/// Parameters
/// wParam
///
/// The HIWORD of the wParam contains the Y-axis value of the new dpi of the window. The LOWORD of the wParam
/// contains the X-axis value of the new DPI of the window. For example, 96, 120, 144, or 192. The values of the X-axis and the
/// Y-axis are identical for Windows apps.
///
/// lParam
///
/// A pointer to a RECT structure that provides a suggested size and position of the current window scaled for the new
/// DPI. The expectation is that apps will reposition and resize windows based on the suggestions provided by lParam when
/// handling this message.
///
/// Returns
/// If an application processes this message, it should return zero.
///
///
/// This message is only relevant for PROCESS_PER_MONITOR_DPI_AWARE applications or DPI_AWARENESS_PER_MONITOR_AWARE
/// threads. It may be received on certain DPI changes if your top-level window or process is running as DPI unaware or
/// system DPI aware, but in those situations it can be safely ignored. For more information about the different types of
/// awareness, see PROCESS_DPI_AWARENESS and DPI_AWARENESS. Older versions of Windows required DPI awareness to be
/// tied at the level of an application. Those apps use PROCESS_DPI_AWARENESS. Currently, DPI awareness is tied to threads
/// and individual windows rather than the entire application. These apps use DPI_AWARENESS.
///
/// You only need to use either the X-axis or the Y-axis value when scaling your application since they are the same.
///
/// In order to handle this message correctly, you will need to resize and reposition your window based on the suggestions
/// provided by lParam and using SetWindowPos. If you do not do this, your window will grow or shrink with respect to
/// everything else on the new monitor. For example, if a user is using multiple monitors and drags your window from a 96 DPI
/// monitor to a 192 DPI monitor, your window will appear to be half as large with respect to other items on the 192 DPI monitor.
///
///
/// The base value of DPI is defined as USER_DEFAULT_SCREEN_DPI which is set to 96. To determine the scaling factor for a
/// monitor, take the DPI value and divide by USER_DEFAULT_SCREEN_DPI. The following table provides some sample DPI values
/// and associated scaling factors.
///
///
///
/// DPI value
/// Scaling percentage
///
/// -
/// 96
/// 100%
///
/// -
/// 120
/// 125%
///
/// -
/// 144
/// 150%
///
/// -
/// 192
/// 200%
///
///
/// The following example provides a sample DPI change handler.
///
/// case WM_DPICHANGED: { g_dpi = HIWORD(wParam); UpdateDpiDependentFontsAndResources(); RECT* const prcNewWindow = (RECT*)lParam; SetWindowPos(hWnd, NULL, prcNewWindow ->left, prcNewWindow ->top, prcNewWindow->right - prcNewWindow->left, prcNewWindow->bottom - prcNewWindow->top, SWP_NOZORDER | SWP_NOACTIVATE); break; }
///
/// The following code linearly scales a value from 100% (96 DPI) to an arbitrary DPI defined by g_dpi.
///
/// INT iBorderWidth100 = 5; iBorderWidth = MulDiv(iBorderWidth100, g_dpi, USER_DEFAULT_SCREEN_DPI);
///
/// An alternative way to scale a value is to convert the DPI value into a scale factor and use that.
///
/// INT iBorderWidth100 = 5; FLOAT fscale = (float) g_dpi / USER_DEFAULT_SCREEN_DPI; iBorderWidth = iBorderWidth100 * fscale;
///
///
// https://docs.microsoft.com/en-us/windows/win32/hidpi/wm-dpichanged
WM_DPICHANGED = 0x02E0,
///
///
/// An application sends a WM_CUT message to an edit control or combo box to delete (cut) the current selection, if any,
/// in the edit control and copy the deleted text to the clipboard in CF_TEXT format.
///
///
/// #define WM_CUT 0x0300
///
///
/// Parameters
/// wParam
/// This parameter is not used and must be zero.
/// lParam
/// This parameter is not used and must be zero.
/// Returns
/// This message does not return a value.
///
/// The deletion performed by the WM_CUT message can be undone by sending the edit control an EM_UNDO message.
/// To delete the current selection without placing the deleted text on the clipboard, use the WM_CLEAR message.
///
/// When sent to a combo box, the WM_CUT message is handled by its edit control. This message has no effect when sent to a
/// combo box with the CBS_DROPDOWNLIST style.
///
///
// https://docs.microsoft.com/en-us/windows/win32/dataxchg/wm-cut
WM_CUT = 0x0300,
///
///
/// An application sends the WM_COPY message to an edit control or combo box to copy the current selection to the
/// clipboard in CF_TEXT format.
///
///
/// #define WM_COPY 0x0301
///
///
/// Parameters
/// wParam
/// This parameter is not used and must be zero.
/// lParam
/// This parameter is not used and must be zero.
/// Returns
/// Returns nonzero value on success, else zero.
///
/// When sent to a combo box, the WM_COPY message is handled by its edit control. This message has no effect when sent to
/// a combo box with the CBS_DROPDOWNLIST style.
///
// https://docs.microsoft.com/en-us/windows/win32/dataxchg/wm-copy
WM_COPY = 0x0301,
///
///
/// An application sends a WM_PASTE message to an edit control or combo box to copy the current content of the clipboard
/// to the edit control at the current caret position. Data is inserted only if the clipboard contains data in CF_TEXT format.
///
///
/// #define WM_PASTE 0x0302
///
///
/// Parameters
/// wParam
/// This parameter is not used and must be zero.
/// lParam
/// This parameter is not used and must be zero.
/// Returns
/// This message does not return a value.
///
/// When sent to a combo box, the WM_PASTE message is handled by its edit control. This message has no effect when sent to
/// a combo box with the CBS_DROPDOWNLIST style.
///
// https://docs.microsoft.com/en-us/windows/win32/dataxchg/wm-paste
WM_PASTE = 0x0302,
///
///
/// An application sends a WM_CLEAR message to an edit control or combo box to delete (clear) the current selection, if
/// any, from the edit control.
///
///
/// #define WM_CLEAR 0x0303
///
///
/// Parameters
/// wParam
/// This parameter is not used and must be zero.
/// lParam
/// This parameter is not used and must be zero.
/// Returns
/// This message does not return a value.
///
/// The deletion performed by the WM_CLEAR message can be undone by sending the edit control an EM_UNDO message.
/// To delete the current selection and place the deleted content on the clipboard, use the WM_CUT message.
///
/// When sent to a combo box, the WM_CLEAR message is handled by its edit control. This message has no effect when sent to
/// a combo box with the CBS_DROPDOWNLIST style.
///
///
// https://docs.microsoft.com/en-us/windows/win32/dataxchg/wm-clear
WM_CLEAR = 0x0303,
///
/// An application sends a WM_UNDO message to an edit control to undo the last operation. When this message is sent to an
/// edit control, the previously deleted text is restored or the previously added text is deleted.
///
/// Parameters
/// wParam
/// Not used; must be zero.
/// lParam
/// Not used; must be zero.
/// Returns
/// If the message succeeds, the return value is TRUE.
/// If the message fails, the return value is FALSE.
/// Rich Edit: It is recommended that EM_UNDO be used instead of WM_UNDO.
// https://docs.microsoft.com/en-us/windows/win32/controls/wm-undo
WM_UNDO = 0x0304,
///
///
/// Sent to the clipboard owner if it has delayed rendering a specific clipboard format and if an application has requested data
/// in that format. The clipboard owner must render data in the specified format and place it on the clipboard by calling the
/// SetClipboardData function.
///
///
/// #define WM_RENDERFORMAT 0x0305
///
///
/// Parameters
/// wParam
/// The clipboard format to be rendered.
/// lParam
/// This parameter is not used.
/// Returns
/// If an application processes this message, it should return zero.
///
/// When responding to a WM_RENDERFORMAT message, the clipboard owner must not open the clipboard before calling
/// SetClipboardData. Opening the clipboard is not necessary before placing data in response to WM_RENDERFORMAT,
/// and any attempt to open the clipboard will fail because the clipboard is currently being held open by the application that
/// requested the format to be rendered.
///
// https://docs.microsoft.com/en-us/windows/win32/dataxchg/wm-renderformat
WM_RENDERFORMAT = 0x0305,
///
///
/// Sent to the clipboard owner before it is destroyed, if the clipboard owner has delayed rendering one or more clipboard
/// formats. For the content of the clipboard to remain available to other applications, the clipboard owner must render data in
/// all the formats it is capable of generating, and place the data on the clipboard by calling the SetClipboardData function.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_RENDERALLFORMATS 0x0306
///
///
/// Parameters
/// wParam
/// This parameter is not used and must be zero.
/// lParam
/// This parameter is not used and must be zero.
/// Returns
/// If an application processes this message, it should return zero.
///
///
/// When responding to a WM_RENDERALLFORMATS message, the application must call the OpenClipboard function and then
/// check that it is still the clipboard owner by calling the GetClipboardOwner function before calling SetClipboardData.
///
///
/// The application needs to check that it is still the clipboard owner after opening the clipboard because after it receives the
/// WM_RENDERALLFORMATS message, but before it opens the clipboard, another application may have opened and taken
/// ownership of the clipboard, and that application's data should not be overwritten.
///
///
/// In most cases, the application should not call the EmptyClipboard function before calling SetClipboardData,
/// since doing so will erase the clipboard formats that the application has already rendered.
///
///
/// When the application returns, the system removes any unrendered formats from the list of available clipboard formats. For
/// information about delayed rendering, see Delayed Rendering.
///
///
// https://docs.microsoft.com/en-us/windows/win32/dataxchg/wm-renderallformats
WM_RENDERALLFORMATS = 0x0306,
///
/// Sent to the clipboard owner when a call to the EmptyClipboard function empties the clipboard.
/// A window receives this message through its WindowProc function.
///
/// #define WM_DESTROYCLIPBOARD 0x0307
///
///
/// Parameters
/// wParam
/// This parameter is not used and must be zero.
/// lParam
/// This parameter is not used and must be zero.
/// Returns
/// If an application processes this message, it should return zero.
// https://docs.microsoft.com/en-us/windows/win32/dataxchg/wm-destroyclipboard
WM_DESTROYCLIPBOARD = 0x0307,
///
///
/// Sent to the first window in the clipboard viewer chain when the content of the clipboard changes. This enables a clipboard
/// viewer window to display the new content of the clipboard.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_DRAWCLIPBOARD 0x0308
///
///
/// Parameters
/// wParam
/// This parameter is not used and must be zero.
/// lParam
/// This parameter is not used and must be zero.
///
///
/// Only clipboard viewer windows receive this message. These are windows that have been added to the clipboard viewer chain by
/// using the SetClipboardViewer function.
///
///
/// Each window that receives the WM_DRAWCLIPBOARD message must call the SendMessage function to pass the message
/// on to the next window in the clipboard viewer chain. The handle to the next window in the chain is returned by
/// SetClipboardViewer, and may change in response to a WM_CHANGECBCHAIN message.
///
///
// https://docs.microsoft.com/en-us/windows/win32/dataxchg/wm-drawclipboard
WM_DRAWCLIPBOARD = 0x0308,
///
///
/// Sent to the clipboard owner by a clipboard viewer window when the clipboard contains data in the CF_OWNERDISPLAY
/// format and the clipboard viewer's client area needs repainting.
///
///
/// #define WM_PAINTCLIPBOARD 0x0309
///
///
/// Parameters
/// wParam
/// A handle to the clipboard viewer window.
/// lParam
///
/// A handle to a global memory object that contains a PAINTSTRUCT structure. The structure defines the part of the client
/// area to paint.
///
/// Returns
/// If an application processes this message, it should return zero.
///
///
/// To determine whether the entire client area or just a portion of it needs repainting, the clipboard owner must compare the
/// dimensions of the drawing area given in the rcPaint member of PAINTSTRUCT to the dimensions given in the most
/// recent WM_SIZECLIPBOARD message.
///
///
/// The clipboard owner must use the GlobalLock function to lock the memory that contains the PAINTSTRUCT
/// structure. Before returning, the clipboard owner must unlock that memory by using the GlobalUnlock function.
///
///
// https://docs.microsoft.com/en-us/windows/win32/dataxchg/wm-paintclipboard
WM_PAINTCLIPBOARD = 0x0309,
///
///
/// Sent to the clipboard owner by a clipboard viewer window when the clipboard contains data in the CF_OWNERDISPLAY
/// format and an event occurs in the clipboard viewer's vertical scroll bar. The owner should scroll the clipboard image and
/// update the scroll bar values.
///
///
/// #define WM_VSCROLLCLIPBOARD 0x030A
///
///
/// Parameters
/// wParam
/// A handle to the clipboard viewer window.
/// lParam
/// The low-order word of lParam specifies a scroll bar event. This parameter can be one of the following values.
///
///
/// Value
/// Meaning
///
/// -
/// SB_BOTTOM 7
/// Scroll to lower right.
///
/// -
/// SB_ENDSCROLL 8
/// End scroll.
///
/// -
/// SB_LINEDOWN 1
/// Scroll one line down.
///
/// -
/// SB_LINEUP 0
/// Scroll one line up.
///
/// -
/// SB_PAGEDOWN 3
/// Scroll one page down.
///
/// -
/// SB_PAGEUP 2
/// Scroll one page up.
///
/// -
/// SB_THUMBPOSITION 4
/// Scroll to absolute position. The current position is specified by the high-order word.
///
/// -
/// SB_TOP 6
/// Scroll to upper left.
///
///
///
/// The high-order word of lParam specifies the current position of the scroll box if the low-order word of lParam is
/// SB_THUMBPOSITION; otherwise, the high-order word of lParam is not used.
///
/// Returns
/// If an application processes this message, it should return zero.
///
/// The clipboard owner can use the ScrollWindow function to scroll the image in the clipboard viewer window and
/// invalidate the appropriate region.
///
// https://docs.microsoft.com/en-us/windows/win32/dataxchg/wm-vscrollclipboard
WM_VSCROLLCLIPBOARD = 0x030A,
///
///
/// Sent to the clipboard owner by a clipboard viewer window when the clipboard contains data in the CF_OWNERDISPLAY
/// format and the clipboard viewer's client area has changed size.
///
///
/// #define WM_SIZECLIPBOARD 0x030B
///
///
/// Parameters
/// wParam
/// A handle to the clipboard viewer window.
/// lParam
///
/// A handle to a global memory object that contains a RECT structure. The structure specifies the new dimensions of the
/// clipboard viewer's client area.
///
/// Returns
/// If an application processes this message, it should return zero.
///
///
/// When the clipboard viewer window is about to be destroyed or resized, a WM_SIZECLIPBOARD message is sent with a null
/// rectangle (0, 0, 0, 0) as the new size. This permits the clipboard owner to free its display resources.
///
///
/// The clipboard owner must use the GlobalLock function to lock the memory object that contains RECT. Before
/// returning, the clipboard owner must unlock the object by using the GlobalUnlock function.
///
///
// https://docs.microsoft.com/en-us/windows/win32/dataxchg/wm-sizeclipboard
WM_SIZECLIPBOARD = 0x030B,
///
///
/// Sent to the clipboard owner by a clipboard viewer window to request the name of a CF_OWNERDISPLAY clipboard format.
///
/// A window receives this message through its WindowProc function.
///
/// #define WM_ASKCBFORMATNAME 0x030C
///
///
/// Parameters
/// wParam
/// The size, in characters, of the buffer pointed to by the lParam parameter.
/// lParam
/// A pointer to the buffer that is to receive the clipboard format name.
/// Returns
/// If an application processes this message, it should return zero.
///
///
/// In response to this message, the clipboard owner should copy the name of the owner-display format to the specified buffer,
/// not exceeding the buffer size specified by the wParam parameter.
///
///
/// A clipboard viewer window sends this message to the clipboard owner to determine the name of the CF_OWNERDISPLAY
/// format for example, to initialize a menu listing available formats.
///
///
// https://docs.microsoft.com/en-us/windows/win32/dataxchg/wm-askcbformatname
WM_ASKCBFORMATNAME = 0x030C,
///
/// Sent to the first window in the clipboard viewer chain when a window is being removed from the chain.
/// A window receives this message through its WindowProc function.
///
/// #define WM_CHANGECBCHAIN 0x030D
///
///
/// Parameters
/// wParam
/// A handle to the window being removed from the clipboard viewer chain.
/// lParam
///
/// A handle to the next window in the chain following the window being removed. This parameter is NULL if the window
/// being removed is the last window in the chain.
///
/// Returns
/// If an application processes this message, it should return zero.
///
///
/// Each clipboard viewer window saves the handle to the next window in the clipboard viewer chain. Initially, this handle is the
/// return value of the SetClipboardViewer function.
///
///
/// When a clipboard viewer window receives the WM_CHANGECBCHAIN message, it should call the SendMessage function
/// to pass the message to the next window in the chain, unless the next window is the window being removed. In this case, the
/// clipboard viewer should save the handle specified by the lParam parameter as the next window in the chain.
///
///
// https://docs.microsoft.com/en-us/windows/win32/dataxchg/wm-changecbchain
WM_CHANGECBCHAIN = 0x030D,
///
///
/// Sent to the clipboard owner by a clipboard viewer window. This occurs when the clipboard contains data in the
/// CF_OWNERDISPLAY format and an event occurs in the clipboard viewer's horizontal scroll bar. The owner should scroll
/// the clipboard image and update the scroll bar values.
///
///
/// #define WM_HSCROLLCLIPBOARD 0x030E
///
///
/// Parameters
/// wParam
/// A handle to the clipboard viewer window.
/// lParam
///
/// The low-order word of lParam specifies a scroll bar event. This parameter can be one of the following values. The high-order
/// word of lParam specifies the current position of the scroll box if the low-order word of lParam is SB_THUMBPOSITION;
/// otherwise, the high-order word is not used.
///
///
///
/// Value
/// Meaning
///
/// -
/// SB_ENDSCROLL 8
/// End scroll.
///
/// -
/// SB_LEFT 6
/// Scroll to upper left.
///
/// -
/// SB_RIGHT 7
/// Scroll to lower right.
///
/// -
/// SB_LINELEFT 0
/// Scrolls left by one unit.
///
/// -
/// SB_LINERIGHT 1
/// Scrolls right by one unit.
///
/// -
/// SB_PAGELEFT 2
/// Scrolls left by the width of the window.
///
/// -
/// SB_PAGERIGHT 3
/// Scrolls right by the width of the window.
///
/// -
/// SB_THUMBPOSITION 4
/// Scroll to absolute position. The current position is specified by the high-order word.
///
///
/// Returns
/// If an application processes this message, it should return zero.
///
/// The clipboard owner can use the ScrollWindow function to scroll the image in the clipboard viewer window and
/// invalidate the appropriate region.
///
// https://docs.microsoft.com/en-us/windows/win32/dataxchg/wm-hscrollclipboard
WM_HSCROLLCLIPBOARD = 0x030E,
///
///
/// The WM_QUERYNEWPALETTE message informs a window that it is about to receive the keyboard focus, giving the window the
/// opportunity to realize its logical palette when it receives the focus.
///
/// A window receives this message through its WindowProc function.
///
/// LRESULT CALLBACK WindowProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
///
///
/// Parameters
/// wParam
/// This parameter is not used.
/// lParam
/// This parameter is not used.
/// Returns
/// If the window realizes its logical palette, it must return TRUE; otherwise, it must return FALSE.
// https://docs.microsoft.com/en-us/windows/win32/gdi/wm-querynewpalette
WM_QUERYNEWPALETTE = 0x030F,
///
/// The WM_PALETTEISCHANGING message informs applications that an application is going to realize its logical palette.
/// A window receives this message through its WindowProc function.
///
/// LRESULT CALLBACK WindowProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
///
///
/// Parameters
/// wParam
/// A handle to the window that is going to realize its logical palette.
/// lParam
/// This parameter is not used.
/// Returns
/// If an application processes this message, it should return zero.
///
///
/// The application changing its palette does not wait for acknowledgment of this message before changing the palette and sending
/// the WM_PALETTECHANGED message. As a result, the palette may already be changed by the time an application receives
/// this message.
///
///
/// If the application either ignores or fails to process this message and a second application realizes its palette while the
/// first is using palette indexes, there is a strong possibility that the user will see unexpected colors during subsequent
/// drawing operations.
///
///
// https://docs.microsoft.com/en-us/windows/win32/gdi/wm-paletteischanging
WM_PALETTEISCHANGING = 0x0310,
///
///
/// The WM_PALETTECHANGED message is sent to all top-level and overlapped windows after the window with the keyboard focus
/// has realized its logical palette, thereby changing the system palette. This message enables a window that uses a color
/// palette but does not have the keyboard focus to realize its logical palette and update its client area.
///
/// A window receives this message through its WindowProc function.
///
/// LRESULT CALLBACK WindowProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
///
///
/// Parameters
/// wParam
/// A handle to the window that caused the system palette to change.
/// lParam
/// This parameter is not used.
///
///
/// This message must be sent to all top-level and overlapped windows, including the one that changed the system palette. If any
/// child windows use a color palette, this message must be passed on to them as well.
///
///
/// To avoid creating an infinite loop, a window that receives this message must not realize its palette, unless it determines
/// that wParam does not contain its own window handle.
///
///
// https://docs.microsoft.com/en-us/windows/win32/gdi/wm-palettechanged
WM_PALETTECHANGED = 0x0311,
///
///
/// Posted when the user presses a hot key registered by the RegisterHotKey function. The message is placed at the top of
/// the message queue associated with the thread that registered the hot key.
///
///
/// #define WM_HOTKEY 0x0312
///
///
/// Parameters
/// wParam
///
/// The identifier of the hot key that generated the message. If the message was generated by a system-defined hot key, this
/// parameter will be one of the following values.
///
///
///
/// Value
/// Meaning
///
/// -
/// IDHOT_SNAPDESKTOP -2
/// The "snap desktop" hot key was pressed.
///
/// -
/// IDHOT_SNAPWINDOW -1
/// The "snap window" hot key was pressed.
///
///
/// lParam
///
/// The low-order word specifies the keys that were to be pressed in combination with the key specified by the high-order word to
/// generate the WM_HOTKEY message. This word can be one or more of the following values. The high-order word specifies
/// the virtual key code of the hot key.
///
///
///
/// Value
/// Meaning
///
/// -
/// MOD_ALT 0x0001
/// Either ALT key was held down.
///
/// -
/// MOD_CONTROL 0x0002
/// Either CTRL key was held down.
///
/// -
/// MOD_SHIFT 0x0004
/// Either SHIFT key was held down.
///
/// -
/// MOD_WIN 0x0008
///
/// Either WINDOWS key was held down. These keys are labeled with the Windows logo. Hotkeys that involve the Windows key are
/// reserved for use by the operating system.
///
///
///
///
/// WM_HOTKEY is unrelated to the WM_GETHOTKEY and WM_SETHOTKEY hot keys. The WM_HOTKEY message is
/// sent for generic hot keys while the WM_SETHOTKEY and WM_GETHOTKEY messages relate to window activation hot keys.
///
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-hotkey
WM_HOTKEY = 0x0312,
///
///
/// The WM_PRINT message is sent to a window to request that it draw itself in the specified device context, most commonly
/// in a printer device context.
///
/// A window receives this message through its WindowProc function.
///
/// LRESULT CALLBACK WindowProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
///
///
/// Parameters
/// wParam
/// A handle to the device context to draw in.
/// lParam
/// The drawing options. This parameter can be one or more of the following values.
///
///
/// Value
/// Meaning
///
/// -
/// PRF_CHECKVISIBLE
/// Draws the window only if it is visible.
///
/// -
/// PRF_CHILDREN
/// Draws all visible children windows.
///
/// -
/// PRF_CLIENT
/// Draws the client area of the window.
///
/// -
/// PRF_ERASEBKGND
/// Erases the background before drawing the window.
///
/// -
/// PRF_NONCLIENT
/// Draws the nonclient area of the window.
///
/// -
/// PRF_OWNED
/// Draws all owned windows.
///
///
///
/// The DefWindowProc function processes this message based on which drawing option is specified: if PRF_CHECKVISIBLE is
/// specified and the window is not visible, do nothing, if PRF_NONCLIENT is specified, draw the nonclient area in the specified
/// device context, if PRF_ERASEBKGND is specified, send the window a WM_ERASEBKGND message, if PRF_CLIENT is specified,
/// send the window a WM_PRINTCLIENT message, if PRF_CHILDREN is set, send each visible child window a WM_PRINT
/// message, if PRF_OWNED is set, send each visible owned window a WM_PRINT message.
///
// https://docs.microsoft.com/en-us/windows/win32/gdi/wm-print
WM_PRINT = 0x0317,
///
///
/// The WM_PRINTCLIENT message is sent to a window to request that it draw its client area in the specified device
/// context, most commonly in a printer device context.
///
///
/// Unlike WM_PRINT, WM_PRINTCLIENT is not processed by DefWindowProc. A window should process the
/// WM_PRINTCLIENT message through an application-defined WindowProc function for it to be used properly.
///
///
/// LRESULT CALLBACK WindowProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
///
///
/// Parameters
/// wParam
/// A handle to the device context to draw in.
/// lParam
/// The drawing options. This parameter can be one or more of the following values.
///
///
/// Value
/// Meaning
///
/// -
/// PRF_CHECKVISIBLE
/// Draws the window only if it is visible.
///
/// -
/// PRF_CHILDREN
/// Draws all visible children windows.
///
/// -
/// PRF_CLIENT
/// Draws the client area of the window.
///
/// -
/// PRF_ERASEBKGND
/// Erases the background before drawing the window.
///
/// -
/// PRF_NONCLIENT
/// Draws the nonclient area of the window.
///
/// -
/// PRF_OWNED
/// Draws all owned windows.
///
///
///
///
/// A window can process this message in much the same manner as WM_PAINT, except that BeginPaint and
/// EndPaint need not be called (a device context is provided), and the window should draw its entire client area rather
/// than just the invalid region.
///
///
/// Windows that can be used anywhere in the system, such as controls, should process this message. It is probably worthwhile for
/// other windows to process this message as well because it is relatively easy to implement.
///
/// The AnimateWindow function requires that the window being animated implements the WM_PRINTCLIENT message.
///
// https://docs.microsoft.com/en-us/windows/win32/gdi/wm-printclient
WM_PRINTCLIENT = 0x0318,
///
///
/// Notifies a window that the user generated an application command event, for example, by clicking an application command
/// button using the mouse or typing an application command key on the keyboard.
///
///
/// #define WM_APPCOMMAND 0x0319
///
///
/// Parameters
/// wParam
///
/// A handle to the window where the user clicked the button or pressed the key. This can be a child window of the window
/// receiving the message. For more information about processing this message, see the Remarks section.
///
/// lParam
/// Use the following code to get the information contained in the lParam parameter.
///
/// cmd = GET_APPCOMMAND_LPARAM(lParam); uDevice = GET_DEVICE_LPARAM(lParam); dwKeys = GET_KEYSTATE_LPARAM(lParam);
///
/// The application command is cmd, which can be one of the following values.
///
///
/// Value
/// Meaning
///
/// -
/// APPCOMMAND_BASS_BOOST 20
/// Toggle the bass boost on and off.
///
/// -
/// APPCOMMAND_BASS_DOWN 19
/// Decrease the bass.
///
/// -
/// APPCOMMAND_BASS_UP 21
/// Increase the bass.
///
/// -
/// APPCOMMAND_BROWSER_BACKWARD 1
/// Navigate backward.
///
/// -
/// APPCOMMAND_BROWSER_FAVORITES 6
/// Open favorites.
///
/// -
/// APPCOMMAND_BROWSER_FORWARD 2
/// Navigate forward.
///
/// -
/// APPCOMMAND_BROWSER_HOME 7
/// Navigate home.
///
/// -
/// APPCOMMAND_BROWSER_REFRESH 3
/// Refresh page.
///
/// -
/// APPCOMMAND_BROWSER_SEARCH 5
/// Open search.
///
/// -
/// APPCOMMAND_BROWSER_STOP 4
/// Stop download.
///
/// -
/// APPCOMMAND_CLOSE 31
/// Close the window (not the application).
///
/// -
/// APPCOMMAND_COPY 36
/// Copy the selection.
///
/// -
/// APPCOMMAND_CORRECTION_LIST 45
/// Brings up the correction list when a word is incorrectly identified during speech input.
///
/// -
/// APPCOMMAND_CUT 37
/// Cut the selection.
///
/// -
/// APPCOMMAND_DICTATE_OR_COMMAND_CONTROL_TOGGLE 43
///
/// Toggles between two modes of speech input: dictation and command/control (giving commands to an application or accessing menus).
///
///
/// -
/// APPCOMMAND_FIND 28
/// Open the Find dialog.
///
/// -
/// APPCOMMAND_FORWARD_MAIL 40
/// Forward a mail message.
///
/// -
/// APPCOMMAND_HELP 27
/// Open the Help dialog.
///
/// -
/// APPCOMMAND_LAUNCH_APP1 17
/// Start App1.
///
/// -
/// APPCOMMAND_LAUNCH_APP2 18
/// Start App2.
///
/// -
/// APPCOMMAND_LAUNCH_MAIL 15
/// Open mail.
///
/// -
/// APPCOMMAND_LAUNCH_MEDIA_SELECT 16
/// Go to Media Select mode.
///
/// -
/// APPCOMMAND_MEDIA_CHANNEL_DOWN 52
/// Decrement the channel value, for example, for a TV or radio tuner.
///
/// -
/// APPCOMMAND_MEDIA_CHANNEL_UP 51
/// Increment the channel value, for example, for a TV or radio tuner.
///
/// -
/// APPCOMMAND_MEDIA_FAST_FORWARD 49
///
/// Increase the speed of stream playback. This can be implemented in many ways, for example, using a fixed speed or toggling
/// through a series of increasing speeds.
///
///
/// -
/// APPCOMMAND_MEDIA_NEXTTRACK 11
/// Go to next track.
///
/// -
/// APPCOMMAND_MEDIA_PAUSE 47
///
/// Pause. If already paused, take no further action. This is a direct PAUSE command that has no state. If there are discrete
/// Play and Pause buttons, applications should take action on this command as well as APPCOMMAND_MEDIA_PLAY_PAUSE.
///
///
/// -
/// APPCOMMAND_MEDIA_PLAY 46
///
/// Begin playing at the current position. If already paused, it will resume. This is a direct PLAY command that has no state. If
/// there are discrete Play and Pause buttons, applications should take action on this command as well as APPCOMMAND_MEDIA_PLAY_PAUSE.
///
///
/// -
/// APPCOMMAND_MEDIA_PLAY_PAUSE 14
///
/// Play or pause playback. If there are discrete Play and Pause buttons, applications should take action on this
/// command as well as APPCOMMAND_MEDIA_PLAY and APPCOMMAND_MEDIA_PAUSE.
///
///
/// -
/// APPCOMMAND_MEDIA_PREVIOUSTRACK 12
/// Go to previous track.
///
/// -
/// APPCOMMAND_MEDIA_RECORD 48
/// Begin recording the current stream.
///
/// -
/// APPCOMMAND_MEDIA_REWIND 50
///
/// Go backward in a stream at a higher rate of speed. This can be implemented in many ways, for example, using a fixed speed or
/// toggling through a series of increasing speeds.
///
///
/// -
/// APPCOMMAND_MEDIA_STOP 13
/// Stop playback.
///
/// -
/// APPCOMMAND_MIC_ON_OFF_TOGGLE 44
/// Toggle the microphone.
///
/// -
/// APPCOMMAND_MICROPHONE_VOLUME_DOWN 25
/// Decrease microphone volume.
///
/// -
/// APPCOMMAND_MICROPHONE_VOLUME_MUTE 24
/// Mute the microphone.
///
/// -
/// APPCOMMAND_MICROPHONE_VOLUME_UP 26
/// Increase microphone volume.
///
/// -
/// APPCOMMAND_NEW 29
/// Create a new window.
///
/// -
/// APPCOMMAND_OPEN 30
/// Open a window.
///
/// -
/// APPCOMMAND_PASTE 38
/// Paste
///
/// -
/// APPCOMMAND_PRINT 33
/// Print current document.
///
/// -
/// APPCOMMAND_REDO 35
/// Redo last action.
///
/// -
/// APPCOMMAND_REPLY_TO_MAIL 39
/// Reply to a mail message.
///
/// -
/// APPCOMMAND_SAVE 32
/// Save current document.
///
/// -
/// APPCOMMAND_SEND_MAIL 41
/// Send a mail message.
///
/// -
/// APPCOMMAND_SPELL_CHECK 42
/// Initiate a spell check.
///
/// -
/// APPCOMMAND_TREBLE_DOWN 22
/// Decrease the treble.
///
/// -
/// APPCOMMAND_TREBLE_UP 23
/// Increase the treble.
///
/// -
/// APPCOMMAND_UNDO 34
/// Undo last action.
///
/// -
/// APPCOMMAND_VOLUME_DOWN 9
/// Lower the volume.
///
/// -
/// APPCOMMAND_VOLUME_MUTE 8
/// Mute the volume.
///
/// -
/// APPCOMMAND_VOLUME_UP 10
/// Raise the volume.
///
///
/// The uDevice component indicates the input device that generated the input event, and can be one of the following values.
///
///
/// Value
/// Meaning
///
/// -
/// FAPPCOMMAND_KEY 0
/// User pressed a key.
///
/// -
/// FAPPCOMMAND_MOUSE 0x8000
/// User clicked a mouse button.
///
/// -
/// FAPPCOMMAND_OEM 0x1000
/// An unidentified hardware source generated the event. It could be a mouse or a keyboard event.
///
///
/// The dwKeys component indicates whether various virtual keys are down, and can be one or more of the following values.
///
///
/// Value
/// Meaning
///
/// -
/// MK_CONTROL 0x0008
/// The CTRL key is down.
///
/// -
/// MK_LBUTTON 0x0001
/// The left mouse button is down.
///
/// -
/// MK_MBUTTON 0x0010
/// The middle mouse button is down.
///
/// -
/// MK_RBUTTON 0x0002
/// The right mouse button is down.
///
/// -
/// MK_SHIFT 0x0004
/// The SHIFT key is down.
///
/// -
/// MK_XBUTTON1 0x0020
/// The first X button is down.
///
/// -
/// MK_XBUTTON2 0x0040
/// The second X button is down.
///
///
/// Returns
///
/// If an application processes this message, it should return TRUE. For more information about processing the return
/// value, see the Remarks section.
///
///
///
/// DefWindowProc generates the WM_APPCOMMAND message when it processes the WM_XBUTTONUP or
/// WM_NCXBUTTONUP message, or when the user types an application command key.
///
///
/// If a child window does not process this message and instead calls DefWindowProc, DefWindowProc will send the
/// message to its parent window. If a top level window does not process this message and instead calls DefWindowProc,
/// DefWindowProc will call a shell hook with the hook code equal to HSHELL_APPCOMMAND.
///
///
/// To get the coordinates of the cursor if the message was generated by a mouse click, the application can call
/// GetMessagePos. An application can test whether the message was generated by the mouse by checking whether lParam
/// contains FAPPCOMMAND_MOUSE.
///
///
/// Unlike other windows messages, an application should return TRUE from this message if it processes it. Doing so will
/// allow software that simulates this message on Windows systems earlier than Windows 2000 to determine whether the window
/// procedure processed the message or called DefWindowProc to process it.
///
///
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-appcommand
WM_APPCOMMAND = 0x0319,
///
///
/// Broadcast to every window following a theme change event. Examples of theme change events are the activation of a theme, the
/// deactivation of a theme, or a transition from one theme to another.
///
///
/// #define WM_THEMECHANGED 0x031A
///
///
/// Parameters
/// wParam
/// This parameter is reserved.
/// lParam
/// This parameter is reserved.
/// Returns
/// Type: LRESULT
/// If an application processes this message, it should return zero.
///
/// A window receives this message through its WindowProc function.
///
/// Note
/// This message is posted by the operating system. Applications typically do not send this message.
///
///
/// Themes are specifications for the appearance of controls, so that the visual element of a control is treated separately from
/// its functionality.
///
/// To release an existing theme handle, call CloseThemeData. To acquire a new theme handle, use OpenThemeData.
///
/// Following the WM_THEMECHANGED broadcast, any existing theme handles are invalid. A theme-aware window should release
/// and reopen any of its pre-existing theme handles when it receives the WM_THEMECHANGED message. If the
/// OpenThemeData function returns NULL, the window should paint unthemed.
///
///
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-themechanged
WM_THEMECHANGED = 0x031A,
///
/// Sent when the contents of the clipboard have changed.
///
/// #define WM_CLIPBOARDUPDATE 0x031D
///
///
/// Parameters
/// wParam
/// This parameter is not used and must be zero.
/// lParam
/// This parameter is not used and must be zero.
/// Returns
/// If an application processes this message, it should return zero.
/// To register a window to receive this message, use the AddClipboardFormatListener function.
// https://docs.microsoft.com/en-us/windows/win32/dataxchg/wm-clipboardupdate
WM_CLIPBOARDUPDATE = 0x031D,
///
/// Informs all top-level windows that Desktop Window Manager (DWM) composition has been enabled or disabled.
///
/// Note
/// As of Windows 8, DWM composition is always enabled, so this message is not sent regardless of video mode changes.
///
///
/// Parameters
/// wParam
/// Not used.
/// lParam
/// Not used.
/// Returns
/// If an application processes this message, it should return zero.
///
/// A window receives this message through its WindowProc function.
/// The DwmIsCompositionEnabled function can be used to determine the current composition state.
///
// https://docs.microsoft.com/en-us/windows/win32/dwm/wm-dwmcompositionchanged
WM_DWMCOMPOSITIONCHANGED = 0x031E,
/// Sent when the non-client area rendering policy has changed.
/// Parameters
/// wParam
///
/// Specifies whether DWM rendering is enabled for the non-client area of the window. TRUE if enabled; otherwise, FALSE.
///
/// lParam
/// Not used.
/// Returns
/// If an application processes this message, it should return zero.
///
/// A window receives this message through its WindowProc function.
///
/// The DwmGetWindowAttribute and DwmSetWindowAttribute functions are used to get or set the non-client rendering policy.
///
///
// https://docs.microsoft.com/en-us/windows/win32/dwm/wm-dwmncrenderingchanged
WM_DWMNCRENDERINGCHANGED = 0x031F,
/// Informs all top-level windows that the colorization color has changed.
/// Parameters
/// wParam
/// Specifies the new colorization color. The color format is 0xAARRGGBB.
/// lParam
/// Specifies whether the new color is blended with opacity.
/// Returns
/// If an application processes this message, it should return zero.
///
/// A window receives this message through its WindowProc function.
/// DwmGetColorizationColor is used to determine the current color value.
///
// https://docs.microsoft.com/en-us/windows/win32/dwm/wm-dwmcolorizationcolorchanged
WM_DWMCOLORIZATIONCOLORCHANGED = 0x0320,
/// Sent when a Desktop Window Manager (DWM) composed window is maximized.
/// Parameters
/// wParam
/// Set to true to specify that the window has been maximized.
/// lParam
/// Not used.
/// Returns
/// If an application processes this message, it should return zero.
/// A window receives this message through its WindowProc function.
// https://docs.microsoft.com/en-us/windows/win32/dwm/wm-dwmwindowmaximizedchange
WM_DWMWINDOWMAXIMIZEDCHANGE = 0x0321,
///
/// Sent to request extended title bar information. A window receives this message through its WindowProc function.
///
/// #define WM_GETTITLEBARINFOEX 0x033F
///
///
/// Parameters
/// wParam
/// This parameter is not used and must be 0.
/// lParam
///
/// A pointer to a TITLEBARINFOEX structure. The message sender is responsible for allocating memory for this structure.
/// Set the cbSize member of this structure to
/// sizeof(TITLEBARINFOEX)
/// before passing this structure with the message.
///
///
///
/// The following example shows how the message receiver casts an LPARAM value to retrieve the TITLEBARINFOEX structure.
///
///
/// TITLEBARINFOEX *ptinfo = (TITLEBARINFOEX *)lParam;
///
///
// https://docs.microsoft.com/en-us/windows/win32/menurc/wm-gettitlebarinfoex
WM_GETTITLEBARINFOEX = 0x033F,
///
WM_HANDHELDFIRST = 0x0358,
///
WM_HANDHELDLAST = 0x035F,
///
WM_AFXFIRST = 0x0360,
///
WM_AFXLAST = 0x037F,
///
WM_PENWINFIRST = 0x0380,
///
WM_PENWINLAST = 0x038F,
///
/// Used to define private messages, usually of the form WM_APP+x, where x is an integer value.
///
/// #define WM_APP 0x8000
///
///
///
///
/// The WM_APP constant is used to distinguish between message values that are reserved for use by the system and values
/// that can be used by an application to send messages within a private window class. The following are the ranges of message
/// numbers available.
///
///
///
/// Range
/// Meaning
///
/// -
/// 0 through WM_USER –1
/// Messages reserved for use by the system.
///
/// -
/// WM_USER through 0x7FFF
/// Integer messages for use by private window classes.
///
/// -
/// WM_APP through 0xBFFF
/// Messages available for use by applications.
///
/// -
/// 0xC000 through 0xFFFF
/// String messages for use by applications.
///
/// -
/// Greater than 0xFFFF
/// Reserved by the system.
///
///
///
/// Message numbers in the first range (0 through WM_USER –1) are defined by the system. Values in this range that are not
/// explicitly defined are reserved by the system.
///
///
/// Message numbers in the second range ( WM_USER through 0x7FFF) can be defined and used by an application to send
/// messages within a private window class. These values cannot be used to define messages that are meaningful throughout an
/// application because some predefined window classes already define values in this range. For example, predefined control
/// classes such as BUTTON, EDIT, LISTBOX, and COMBOBOX may use these values. Messages in this range
/// should not be sent to other applications unless the applications have been designed to exchange messages and to attach the
/// same meaning to the message numbers.
///
///
/// Message numbers in the third range (0x8000 through 0xBFFF) are available for applications to use as private messages.
/// Messages in this range do not conflict with system messages.
///
///
/// Message numbers in the fourth range (0xC000 through 0xFFFF) are defined at run time when an application calls the
/// RegisterWindowMessage function to retrieve a message number for a string. All applications that register the same
/// string can use the associated message number for exchanging messages. The actual message number, however, is not a constant
/// and cannot be assumed to be the same between different sessions.
///
/// Message numbers in the fifth range (greater than 0xFFFF) are reserved by the system.
///
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-app
WM_APP = 0x8000,
///
///
/// Used to define private messages for use by private window classes, usually of the form WM_USER+x, where x is an
/// integer value.
///
///
/// #define WM_USER 0x0400
///
///
///
/// The following are the ranges of message numbers.
///
///
/// Range
/// Meaning
///
/// -
/// 0 through WM_USER –1
/// Messages reserved for use by the system.
///
/// -
/// WM_USER through 0x7FFF
/// Integer messages for use by private window classes.
///
/// -
/// WM_APP (0x8000) through 0xBFFF
/// Messages available for use by applications.
///
/// -
/// 0xC000 through 0xFFFF
/// String messages for use by applications.
///
/// -
/// Greater than 0xFFFF
/// Reserved by the system.
///
///
///
/// Message numbers in the first range (0 through WM_USER –1) are defined by the system. Values in this range that are not
/// explicitly defined are reserved by the system.
///
///
/// Message numbers in the second range ( WM_USER through 0x7FFF) can be defined and used by an application to send
/// messages within a private window class. These values cannot be used to define messages that are meaningful throughout an
/// application because some predefined window classes already define values in this range. For example, predefined control
/// classes such as BUTTON, EDIT, LISTBOX, and COMBOBOX may use these values. Messages in this range
/// should not be sent to other applications unless the applications have been designed to exchange messages and to attach the
/// same meaning to the message numbers.
///
///
/// Message numbers in the third range (0x8000 through 0xBFFF) are available for applications to use as private messages.
/// Messages in this range do not conflict with system messages.
///
///
/// Message numbers in the fourth range (0xC000 through 0xFFFF) are defined at run time when an application calls the
/// RegisterWindowMessage function to retrieve a message number for a string. All applications that register the same
/// string can use the associated message number for exchanging messages. The actual message number, however, is not a constant
/// and cannot be assumed to be the same between different sessions.
///
/// Message numbers in the fifth range (greater than 0xFFFF) are reserved by the system.
///
// https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-user
WM_USER = 0x0400,
///
/// An application sends the WM_CPL_LAUNCH message to Windows Control Panel to request that a Control Panel application be started.
///
WM_CPL_LAUNCH = WM_USER + 0x1000,
///
/// The WM_CPL_LAUNCHED message is sent when a Control Panel application, started by the WM_CPL_LAUNCH message, has closed. The
/// WM_CPL_LAUNCHED message is sent to the window identified by the wParam parameter of the WM_CPL_LAUNCH message that started
/// the application.
///
WM_CPL_LAUNCHED = WM_USER + 0x1001,
///
/// Reflects messages back to child controls. Sometimes you want to write a self-contained control based on standard Windows
/// control, typically by using subclassing or superclassing. Unfortunately, most standard controls send interesting
/// notifications to their parents, not to themselves, so your window proc won't normally receive them. A parent window could
/// help by reflecting (sending) those messages back to the child window so that your window proc could process them. By
/// convention, a message WM_X is reflected back as (OCM__BASE + WM_X). This is mainly to avoid conflicts with real notifications
/// coming from the child windows of the control (e.g. a list view control has a header control as its child window, and receives
/// WM_NOTIFY from the header. It would be inconvenient if you had to figure out every time whether WM_NOTIFY came from the
/// header or reflected from your parent).
///
WM_REFLECT = WM_USER + 0x1C00,
///
/// WM_SYSTIMER is a well-known yet still undocumented message. Windows uses WM_SYSTIMER for internal actions like scrolling.
///
WM_SYSTIMER = 0x118,
}
}
}