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

Applications process touch events as a click of the left mouse button, so support for mouse input can be important to your OS design.

The OS usually posts a mouse message to the window that contains the hot spot of the cursor when the mouse event occurs. An application can change this behavior by using the SetCapturefunction to route mouse messages to a specific window. The specified window receives all of the mouse messages until the application calls the ReleaseCapturefunction or calls the SetCapturefunction to specify another capture window, or until the user clicks on a window that another thread created.

When the mouse capture changes, the OS sends a WM_CAPTURECHANGEDmessage to the window that is losing the mouse capture. The lParamparameter of this message specifies a handle to the window that is gaining the mouse capture.

Only the foreground window can capture mouse input. When a background window attempts to capture mouse input, the background window receives messages only for mouse events that occur when the hot spot of the cursor is located within the visible portion of the window.

Capturing mouse input is useful if a window must receive all mouse input, even when the cursor moves outside the window. For example, an application typically tracks the cursor position after the user presses a mouse button down and follows the cursor until the user releases the mouse button. If an application has not captured mouse input and the user releases the mouse button outside the window, the window does not receive the message that indicates that the user released the button.

A thread can use the GetCapturefunction to determine whether one of the windows that the thread created has captured the mouse. If one of the windows that the thread created has captured the mouse, GetCaptureretrieves a handle to the window.

See Also

500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at webmaster@systemmanager.forsenergy.ru to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.