Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

The following table shows the windows messages, with a description of the purpose of each.

Programming element Description

WM_CANCELMODE

This message is sent to the focus window when a dialog box or message box is displayed; this enables the focus window to cancel modes, such as stylus capture.

WM_CLOSE

This message is sent as a signal that a window or an application should terminate.

WM_CREATE

This message is sent when an application requests that a window be created by calling the CreateWindowExor CreateWindowfunction.

WM_DESTROY

This message is sent when a window is being destroyed.

WM_ENABLE

This message is sent when an application changes the enabled state of a window.

WM_ERASEBKGND

This message is sent by an application when the window background must be erased, for example, when a window is resized.

WM_GETTEXT

This message is sent by an application to copy the text that corresponds to a window into a buffer provided by the caller.

WM_GETTEXTLENGTH

This message is sent by an application to determine the length, in characters, of the text associated with a window.

WM_MOVE

This message is sent after a window has been moved.

WM_QUIT

This message indicates a request to terminate an application and is generated when the application calls the PostQuitMessagefunction.

WM_SETTEXT

This message is sent by an application to set the window text.

WM_SIZE

This message is sent to a window after its size has changed.

WM_STYLECHANGED

This message is sent to a window after the SetWindowLongfunction has changed one or more of the window's styles.

WM_WINDOWPOSCHANGED

This message is sent to a window whose size, position, or place in the z-order has changed as a result of a call to the SetWindowPosfunction or another window-management function.

See Also

Reference

Windows Reference