Goal
In this hands-on experiment, we'll learn how to manage gesture events, including:
• Understand the meaning of manipulating objects using gesture events
• Check the presence and readiness of multi-touch hardware
• Extract information from the gesture Windows message
System Requirements
To complete this experiment, you must have the following tools:
Microsoft Visual Studio 2008 SP1
windows 7
Windows 7 SDK
• A multi-point touch hardware Device
Introduction
To create a multi-touch-driven application, there are 3 ways to choose: "Good", "excellent", or "best" approach.
The "good" method is the simplest of these methods. The touch capability should be taken into account when designing the application user interface. A natural interface can be built using a number of simple tools based on Win32 to provide a better user experience. Scrolling and other touch capabilities come from the Win32 control, no extra work is required. For example, now try scrolling through the document you are reading with your finger! This is the "good" method. The "excellent" method allows the system to receive a variety of low-level touch events and to get the system to explore the results of these events. For example, if a user makes a rotation on the screen, the system emits a rotation gesture with a rotation angle. Although the "good" approach is easy to use, it has its own limitations. You cannot rotate, pan, and zoom at the same time using gestures. You also cannot handle multiple operations based on different touch modes at the same time. For example, two users manipulate different areas of the window.
The "best" approach is to read the low-level touch events as input to the application. Applications such as "Piano" or complex controls, such as multiple sliders for users to manipulate at the same time, are good examples. Run MS Paint, select a drawing tool from the toolbox, and then draw with your 4 fingers (if supported by hardware):
This hands-on experiment will mimic the new MS Paint multi-touch painting feature. We will use the "best" method, that is, to read and use the original touch event for low-level wm_touch multi-touch message decoding.