Touch Input Messages - HP TouchSmart 9100 - Business PC Application Manual

Resources for developing touch-friendly applications for hp business touch-enabled desktops
Hide thumbs Also See for TouchSmart 9100 - Business PC:
Table of Contents

Advertisement

ullArguments shows more information about the gesture (for example, the
distance between the two points of a zoom)
You can configure the gesture messages sent from Windows by calling
SetGestureConfig. Typical usages are disabling/enabling gestures,
blocking/receiving vertical/horizontal and gutter and inertia for single finger
panning.
A few things to consider when handling WM_GESTURE:
Do not call RegisterTouchWindow. Your application will stop receiving
WM_GESTURE messages.
Ignore the gesture starting and ending messages (GID_BEGIN and GID_END).
The default gesture handler uses these. Application behavior is undefined if
your application consumes these.
Pass unconsumed messages to DefWindowProc to ensure all messages are
handled appropriately.
Call CloseGestureInfoHandle to close the gesture input handle for messages
that your application handles.
Note that compound gestures are coalesced. For example, a touch gesture
starting as a zoom then changing to panning will result in only a zoom gesture
message. If you want to respond exactly to zooming then panning, you need to
handle WM_TOUCH instead of WM_GESTURE and detect the gesture change
yourself.
More details about touch support in Windows 7® are available on MSDN at
http://msdn.microsoft.com/en-us/library/dd562197(VS.85).aspx.

Touch Input Messages

Touch input messages gives you the raw touch data and all the freedom to
interpret it. Associate the raw touch points to the target objects and figure out what
action a user or users intend to do. The following unmanaged MSDN code
excerpts show the different steps to getting touch input messages: test the
capabilities of the input digitizer, register to receive touch input messages and
handle the messages.Test the capability of the touchscreen:
#include <windows.h>
. . .
// test for touch
int value = GetSystemMetrics(SM_DIGITIZER);
if (value & NID_READY){ /* stack ready */}
if (value
& NID_MULTI_INPUT){
/* digitizer is multitouch */
MessageBoxW(hWnd, L"Multitouch found", L"IsMulti!", MB_OK);
}
if (value & NID_INTEGRATED_TOUCH){ /* Integrated touch */}
17

Advertisement

Table of Contents
loading

This manual is also suitable for:

Touchsmart dx9000Touchsmart 9100

Table of Contents