Receiving Double-Tap Messages (Windows Embedded CE 6.0)
1/6/2010
The operating system (OS) generates a double-tap message when the user taps the stylus on the touch screen twice in quick succession. When the user taps the stylus on the touch screen, the OS establishes a rectangle centered on the point at which the user tapped the screen. The OS also marks the time at which the tap occurred. When the user taps the touch screen a second time, the OS determines whether the location of the second tap is still within the rectangle and calculates the time elapsed since the first tap. If the second tap occurs within the rectangle and the elapsed time does not exceed the time-out value for a double-tap, the OS generates a double-tap message. An application can retrieve the time-out value for a double-tap by using the GetDoubleClickTime function.
An application-defined window does not, by default, receive double-tap messages. Because of the system overhead involved in generating double-tap messages, these messages are generated only for windows that belong to classes that have the CS_DBLCLKS class style. Your application must set this style when registering the window class.
A double-tap message is always the third message in a series of four messages. The first two messages are the stylus-press and stylus-release messages generated by the first tap. The second tap generates the double-tap message followed by another stylus-release message. For example, double-tapping the touch screen generates the following message sequence:
Because a window always receives a stylus-press message before receiving a double-tap message, an application typically uses a double-tap message to extend a task that the application began during a stylus-press message.
See Also
Concepts
Capturing Touch Screen (Stylus) Input