Search Wiki:
The following resources are available for developers of applications using Windows Touch technology:

Note When you try to download a resource, Code Gallery requires you to accept an End User License Agreement (EULA). If you have a popup blocker turned on, the EULA may not appear and the download may fail. If this happens, turn off your popup blocker and try again.

Hands-on Labs (located on the Downloads tab of this resource page)

Multitouch Gestures (http://code.msdn.microsoft.com/Project/Download/FileDownload.aspx?ProjectName=WindowsTouch&DownloadId=4525). This lab (written in C++) demonstrates how applications can respond to multitouch gestures. In the lab you use gestures to interact with a colored rectangle.
Enhanced Multitouch Gestures (http://code.msdn.microsoft.com/Project/Download/FileDownload.aspx?ProjectName=WindowsTouch&DownloadId=4526). This lab (written in C++) is similar to the Multitouch Gestures lab but employs enhanced gestures and rendering.
Multitouch Scratchpad (http://code.msdn.microsoft.com/Project/Download/FileDownload.aspx?ProjectName=WindowsTouch&DownloadId=4527). This lab (written in C#) demonstrates how an application can read and respond to multitouch input by drawing lines in a window at the touch points. The lines are color-coded to reflect which point provides input.

Code Samples

Windows 7 Multitouch .NET Interop Sample Library (http://code.msdn.microsoft.com/Project/Download/FileDownload.aspx?ProjectName=WindowsTouch&DownloadId=5038). The Windows 7 multitouch APIs are native, Win32-based. While the next release of Windows Presentation Foundation (WPF) will contain support for multitouch, the Multitouch Sample .NET Interop Library provides developers with full multitouch functionality for both managed WinForms and WPF 3.5 SP1, today. This library contains a few demos for reference, including detailed samples showcasing multitouch gesture support, as well as manipulation and inertia for both managed WinForms and WPF.
Last edited Apr 10 at 6:52 PM  by Eliot, version 15
Comments
hyoga wrote  Apr 17 at 4:49 AM  
What the sample means I can use some native function to operate some controls offered by win7 API just like flip,rotate,stretch,etc directly in WPF project.no concern that I have got a multi-touch screen before doing that.

evanr2 wrote  May 19 at 3:14 AM  
This example failed to work for me. I received several link errors:
1>------ Build started: Project: mtgest, Configuration: Debug Win32 ------
1>Linking...
1>GestureEngine.obj : error LNK2019: unresolved external symbol __imp__CloseGestureInfoHandle@4 referenced in function "public: virtual long __thiscall CGestureEngine::WndProc(struct HWND__ *,unsigned int,long)" (?WndProc@CGestureEngine@@UAEJPAUHWND__@@IJ@Z)
1>GestureEngine.obj : error LNK2019: unresolved external symbol __imp__GetGestureInfo@8 referenced in function "public: virtual long __thiscall CGestureEngine::WndProc(struct HWND__ *,unsigned int,long)" (?WndProc@CGestureEngine@@UAEJPAUHWND__@@IJ@Z)
1>mtgest.obj : error LNK2019: unresolved external symbol __imp__SetGestureConfig@20 referenced in function "int __cdecl InitInstance(struct HINSTANCE__ *,int)" (?InitInstance@@YAHPAUHINSTANCE__@@H@Z)
1>C:\Users\Admin\Desktop\Multitouch\Examples\Multitouch Gestures Hands-On Lab\Exercise1\Debug\mtgest.exe : fatal error LNK1120: 3 unresolved externals
1>Build log was saved at "file://c:\Users\Admin\Desktop\Multitouch\Examples\Multitouch Gestures Hands-On Lab\Exercise1\Debug\BuildLog.htm"
1>mtgest - 4 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

tommygr wrote  May 22 at 6:59 PM  
At one point I understood that you might be adding support for camera and web cam motion gesture recognition. Limited environment of course. I'm wondering if MS is still developing this or if they just don’t have any plans at all for developing this. If not then I’m wondering if someone could take advantage of this gesture eng to develop this. Google has been working on this for a while but I would rather not pay a subscription fee for there server and eng.

MOSAIQQ wrote  Jul 21 at 4:00 PM  
I tried to compile the Multitouch Scratchpad example on my Windows 7 32bit system using Visual Studio 2008 with .NET 3.5 SP1. I am getting two warnings from the compiler
Warning 1 Assembly generation -- Referenced assembly 'System.Data.dll' targets a different processor MTScratchpadWMTouch
Warning 2 Assembly generation -- Referenced assembly 'mscorlib.dll' targets a different processor MTScratchpadWMTouch
and the application can not execute at all. Any ideas what I need to do?

dannydwarren wrote  Jul 21 at 11:37 PM  
I had similar building problems. But after creating my own sample app I have the gestures working in WPF. The only catch is they only work if I perform them on the Window title bar or border. Any ideas or suggestions?

abrown wrote  Aug 19 at 3:16 PM  
single finger pan: I cannot get this to work in wpf. It seems the event only and always gets fired when touching on a window border or titlebar. In addition, it blocks the mouse simulation, so you cannot drag or resize a window using touch. I modified a copy of the interop library to block the single finger pan messages and this allows the window to be dragged and resized (look for the GESTURECONFIG argument). Two finger pan works fine.

aikoven wrote  Aug 24 at 6:35 AM  
When using WinForms, I can't control several Controls simultaneously, because events are sent only to one control, which was pressed by first finger; So I cant get several buttons pressed at the same time.
Sending all events to the parent form and then distribution them to corresponding controls looks too uneffective.
Any solution?

aractnido wrote  Sep 14 at 3:51 PM  
Could the owner of the C++ labs remove the *.ncb files (Intellisense) and perhaps the Debug folders from the ZIP file, that will make the ZIP file size go from a 8MB download to 330 KB (Multitouch Gestures HOL); remember that no everybody has a high speed Internet connection

benstang wrote  Fri at 10:48 AM  
Hi, I had download " Windows 7 Multitouch .NET Interop Sample Library ", and compiled in VS2008.
When I run applications, I got a "ArgumentException was unhandle" message while I touch on the touch device, it's shows "StylusPointDescription must contain at least X, Y and NormalPressure in that order." Parameter name: stylusPointPropertyInfos.
And the application stops working. Is there any bugs when the touch digitizer supports pressure feature?
Because when I remove the pressure feature from the digitizer device, the application works normally.

Updating...
Page view tracker