How Multitouch Works in Windows 7


New hardware and API elements in the Windows 7 operating system provide applications the ability to receive and handle touch and multitouch input. This capability enables applications to detect and respond to multiple simultaneous touch points. Multitouch is defined as two or more touch points. The reason we also address single touch is that there are some singlefinger (single-touch-point) gestures that the multitouch API surfaces. Multitouch functionality in Windows 7 is provided by a new set of dedicated Windows messages. Let’s review how these messages are generated and what you need to do to consume and work with multitouch messages.

Architecture Overview: Messages Data Flow

It all starts with touch-sensitive hardware that can detect touch input. We usually refer to such hardware as a touch screen, which can be either embedded in the computer screen itself or mounted as an overlay on top of the screen. There are several technologies that can detect multiple touch points: cameras on the top of the screen, an array of Infrared (IR) emitting units and an array of IR receiving units, and capacity touch digitizers that change the electromagnetic field in response to touch. Regardless of the technology employed, the touch-sensitive hardware needs to support the Windows 7 multitouch platform, which usually means it needs to have a Windows 7–compatible multitouch driver.

The Tablet WISPTIS process is the heart of the Windows 7 multitouch platform, receiving as input the data from the driver and then generating Windows messages in response. It can generate either raw touch input messages in the form of WM_TOUCH messages or gesture messages in the form of WM_GESTURE. This means that the Tablet WISPTIS processes the input from the driver and recognizes when the user performs specific gestures, such as zooming, panning, or rotating. The Tablet WISPTIS is the Microsoft gesture-recognition engine.

Note Keep in mind that applications receive multitouch gesture messages by default. This means Tablet WISPTIS sends gesture messages to the application whenever it detects a gesture unless you specifically request to receive raw touch messages. Raw touch messages (WM_TOUCH) and gesture messages (WM_GESTURE) are mutually exclusive, and an application can’t receive both at the same time. Dedicated API functions encapsulate the details for the creation and consumption of WM_GESTURE messages. This is done because the information associated with the message can change in the future without breaking applications that already consume this message, and it is always a good practice to use the API.

There are several ways you can handle the touch messages that are sent to your application. If you’re using Win32, you can check for the WM_GESTURE message in your application’s WndProc function. WPF developers don’t have to worry about handling such low-level Windows messages because the .NET Framework takes good care of that for them. We’ll cover the WPF multitouch programming model in the following articles and the native programming model in both this article and the next one. But before we start addressing the new APIs, let’s talk about the Good model, which is the default multitouch support you can expect from Windows 7 for legacy applications.

Working with Gestures

Whenever the user touches a touch-sensitive device that is connected to the computer and that touch activity translates to a gesture, the Windows 7 multitouch platform sends gesture messages (WM_GESTURE) to your application by default. This is the free, out-of-the-box behavior. But if you’re reading this, it is safe to assume that you want to learn how to work with gestures.

Gestures are one-finger or two-finger input that translates into some kind of action that the user wants to perform. When the gesture is detected (by the operating system, which is doing all the work for you), the operating system sends gesture messages to your application. Windows 7 supports the following gestures:

Legal Disclaimer

Our website is not responsible for the information contained by this article. Webworldarticles.com is a free articles resource thus practically any visitor can submit an article. However if you notice any copyrighted material, please contact us and we will remove the article(s) in discussion right away.


This article was sent to us by: Ulmer O. at 01282010

Related Articles

1. Performance of Windows 7 and Notebooks
Rediscover the Fundamentals: It’s All About Performance The single most important request customers have had about the next release of the Microsoft Win...

2. Use the Pan Gesture to Move an Object
With the pan gesture, you can control the scrolling of content in a scrollable area. Or you can apply the pan gesture to a specific object, moving it in any direction by ...

3. Handling the WM GESTURE Message
To work with gestures, you’ll need to handle the WM_GESTURE messages that are sent to your application. If you are a Win32 programmer, you can check for WM_GESTURE ...

4. Organize My Data Libraries in Windows 7
This article details the new functionality offered by Windows 7 Libraries. We’ll review the Windows Explorer changes that promote the new user experience that Libra...

5. Changes Made to Windows Explorer in Windows 7
Changes Made to Windows Explorer in Windows 7 In Windows 7, Libraries address the problem of users’ data being stored all over the PC by allowing users to...

6. Make Your Windows 7 Application Library Aware
Libraries under the Hood Now that we have a better understanding of what libraries represent and how users as well as developers can benefit from them, let&rsqu...

7. Working with the Shell Namespace in Windows 7
Working with the Shell Namespace Before we dive into the Shell Libraries programming model, we need to understand how the Windows Shell works. The Windows Shell...

8. Windows 7 Multitouch Programming Models
Windows 7 Multitouch Programming Models The Windows 7 multitouch platform enables you to build touch-aware applications. Keep in mind that with time, the amount...