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

Windows ®phones rely on stylus or touch input rather than mouse input to enhance portability. Applications, however, process stylus events as a click of the left mouse button, so adding support for mouse input to your OS design can provide broader capabilities through the support of the additional buttons and mouse wheel.

An application can determine whether the system includes a mouse by calling the GetClipCursorfunction. A return value of TRUE indicates that a mouse is connected; FALSE indicates that a mouse is not connected.

When the user moves the mouse, the OS moves a bitmap on the screen called the mouse cursor. The mouse cursor contains a single–pixel point called the hot spot, which is a point that the OS tracks and recognizes as the position of the cursor. When a mouse event occurs, the window that contains the hot spot typically receives the mouse message resulting from the event. The window does not have to be active or have the keyboard focus to receive a mouse message.

The OS maintains a variable that controls mouse speed, which is the distance the cursor moves when the user moves the mouse. You can use the SystemParametersInfofunction with the SPI_GETMOUSE or SPI_SETMOUSE flag to retrieve or set mouse speed.

In This Section

Capturing Mouse Input

Describes the methods that can be used to capture mouse input.

Receiving Mouse Messages

Provides an overview of the messages that convey mouse input. Explains how double-clicks are recognized, and how to override the default application behavior to make it recognize and react to a double–click.

Related Sections

Mouse

Provides an overview of the mouse support available.