Windows 7 Development: The Wm_touch of multi-point touch

Source: Internet
Author: User
Tags touch win32

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.