<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.microsoft.co.il/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>class Alon : public CPP, public Architecture : S&amp;amp;L, Multitouch</title><link>http://blogs.microsoft.co.il/blogs/alon/archive/tags/S_2600_amp_3B00_L/Multitouch/default.aspx</link><description>Tags: S&amp;amp;L, Multitouch</description><dc:language>en</dc:language><generator>CommunityServer 2007.1 (Build: 20917.1142)</generator><item><title>Make your application runs and shines on Windows 7</title><link>http://blogs.microsoft.co.il/blogs/alon/archive/2009/08/07/make-your-application-runs-and-shines-on-windows-7.aspx</link><pubDate>Fri, 07 Aug 2009 10:21:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:374269</guid><dc:creator>Alon Fliess</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/alon/rsscomments.aspx?PostID=374269</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/alon/commentapi.aspx?PostID=374269</wfw:comment><comments>http://blogs.microsoft.co.il/blogs/alon/archive/2009/08/07/make-your-application-runs-and-shines-on-windows-7.aspx#comments</comments><description>&lt;p&gt;Moving applications to new platform is not an easy decision to make. Sometimes you have no choice, new desktops and laptops run the new operating system and you have to support your clients. Sometimes you do have a choice, you install your application with the system and you can choose the operating system that your code will run on. There are two factors in this dilemma: first is the investment effort on making the application compatible with the new O/S comparing to the benefit (ROI). Second is that the application will probably need to continue running on the old operating system. In the case of Windows 7, if you have moved to Windows Vista, compatibility is almost not an issue, but if your application is still running on Windows XP than you have to invest a little to move it to the new platform. To help you moving to a new platform Microsoft DPE has contracted us (&lt;a href="http://www.sela.co.il/?CategoryID=563" target="_blank"&gt;Sela&lt;/a&gt;) to develop Compatibility Labs (Part of the &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=1C333F06-FADB-4D93-9C80-402621C600E7&amp;amp;displaylang=en" target="_blank"&gt;Windows 7 Training kit&lt;/a&gt;) that guide you through the common compatibility issues that you may encounter moving your application from Windows XP to Windows 7. The labs provide two levels of information on each of the problems. The first level is based on few slides that describe the problem and the way to solve it, and a deeper level that gives you much more details as well as a code sample of the problem and the solution, both in native (C++) code and managed (C#) code.&lt;/p&gt;
&lt;p&gt;So, you have moved your application and it now can run on both platforms, now it is the time to make it Windows 7 friendly. Here you have another dilemma, most of the new features are Windows 7 only features, some are Vista based and other will be downgrade also to Windows XP. If you will use a Windows 7 only feature, your application will not run on Windows XP. &lt;/p&gt;
&lt;p&gt;To solve this problem I like to divide the new features to two groups. The first group is the group of features that you based your application core implementation on. For example, if you decide to use the .NET framework 3.0 as your runtime, you cannot install your application on Windows 2000. For the most of us, this is not an issue, for others it is a show stopper. So if you need I/O priority and Transactional File System for your application implementation, you need Windows NT 6.0 (Vista, Server 2008) as your minimum bar. In 4-5 years, for most of us it may be not an issue. &lt;/p&gt;
&lt;p&gt;The second group is the group of features that make your application shines on the new platform, or at least looks new and modern like the new platform does. For Windows 7, the Ribbon, the Taskbar, Multi-touch support and Restart Manager are good samples of such features. With good design you can add these features to your application as add-ons making it compatible to Windows XP and great on Windows 7. &lt;/p&gt;
&lt;p&gt;To learn how to use these new features we have made with Redmond DPE two projects. The first one is the &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=1C333F06-FADB-4D93-9C80-402621C600E7&amp;amp;displaylang=en" target="_blank"&gt;Windows 7 Training Kit&lt;/a&gt; it contains slides, demos and Hands on Labs for the new Windows 7 features. You will find .NET (C#) labs and demos as well as many native (C++) labs and demos. If you have downloaded the RC Kit in the past, download again. We have added new labs for the RTM. &lt;/p&gt;
&lt;p&gt;The second way to learn how to use new features in Windows NT 6.0 and Windows NT 6.1 is to download the &lt;a href="http://code.msdn.microsoft.com/XP2Win7" target="_blank"&gt;XP2Win7&lt;/a&gt; project. The project is still in its beta phase and we are working hard to fix bugs, simplify it and add some more features. &lt;a href="http://code.msdn.microsoft.com/XP2Win7" target="_blank"&gt;XP2Win7&lt;/a&gt; is an application that can be installed and runs on 9 different platforms (only 8 have been tested). The platforms are Windows XP, Windows Vista x86, Windows Vista x64, Windows Vista WOW 64 (x86 on x64 machine), Windows 7 x86, Windows 7 x64 and Windows 7 WOW64. Of course it should run also on the server platforms, but we have not tested this scenario. &lt;/p&gt;
&lt;p&gt;When you install the application on Windows XP, you get a simple picture album viewer. Installing it on Windows vista enables new features such as Aero Glass, Restart Manager, NT service is moved to be a Scheduler Task, A preview handler for the album is installed, Transactional NTFS is used with SQL server. Moving to Windows 7 enables another set of features such as Shell Library support, Taskbar integration, Multi-touch, Sensor and Location and Trigger Start Service. &lt;/p&gt;
&lt;p&gt;The installation kit also installs the source code. To build the application you need Windows 7, Visual Studio 2008 SP1, Windows 7 SDK (most of the code is managed and can be built and “single-step debug” without the need for the SDK). To build the native x64 project you need to install the x64 compiler tools that are not installed by default by the VS 2008 setup program. To run the application you also need SQL Server express edition. We are planning to lower the bar and remove the SQL Server dependency from the code. So if you want to see how to do a distributed transaction of TxNTFS and SQL Server, download the beta code, it will not be there in the release. &lt;/p&gt;
&lt;p&gt;This is also the place to thanks &lt;a href="http://windowsteamblog.com/blogs/developers/default.aspx" target="_blank"&gt;Yochay Kiriaty&lt;/a&gt; from Redmond DPE that gave us the chance to be part of such great projects and to David Bassa the CEO of &lt;a href="http://www.sela.co.il/?CategoryID=563" target="_blank"&gt;Sela&lt;/a&gt; that made it possible. Also thanks to Dima Zurbalev, &lt;a href="http://blogs.microsoft.co.il/blogs/sasha" target="_blank"&gt;Sasha Goldshtein&lt;/a&gt;, and Noam Sheffer that spent (and still) nights (daytime at Redmond) and days in the last few months and to Josh Reuben, &lt;a href="http://blogs.microsoft.co.il/blogs/arielbh/" target="_blank"&gt;Ariel Ben Horesh&lt;/a&gt;, Ram Dayan, &lt;a href="http://www.linkedin.com/pub/konstantin-triger/0/837/2a" target="_blank"&gt;Konstantin Triger&lt;/a&gt;, &lt;a href="http://blogs.microsoft.co.il/blogs/tomershamam/" target="_blank"&gt;Tomer Shamam&lt;/a&gt; and Pavel Yosifovich that also took part in the projects.&lt;/p&gt;
&lt;p&gt;Stay tune, more projects are coming! &lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=374269" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/alon/archive/tags/C_2B002B002F00_CLI/default.aspx">C++/CLI</category><category domain="http://blogs.microsoft.co.il/blogs/alon/archive/tags/C_2B002B00_/default.aspx">C++</category><category domain="http://blogs.microsoft.co.il/blogs/alon/archive/tags/Vista/default.aspx">Vista</category><category domain="http://blogs.microsoft.co.il/blogs/alon/archive/tags/Win32/default.aspx">Win32</category><category domain="http://blogs.microsoft.co.il/blogs/alon/archive/tags/Interop/default.aspx">Interop</category><category domain="http://blogs.microsoft.co.il/blogs/alon/archive/tags/WPF/default.aspx">WPF</category><category domain="http://blogs.microsoft.co.il/blogs/alon/archive/tags/Sela/default.aspx">Sela</category><category domain="http://blogs.microsoft.co.il/blogs/alon/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://blogs.microsoft.co.il/blogs/alon/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/alon/archive/tags/Windows+7/default.aspx">Windows 7</category><category domain="http://blogs.microsoft.co.il/blogs/alon/archive/tags/Multitouch/default.aspx">Multitouch</category><category domain="http://blogs.microsoft.co.il/blogs/alon/archive/tags/Multi-touch/default.aspx">Multi-touch</category><category domain="http://blogs.microsoft.co.il/blogs/alon/archive/tags/Library/default.aspx">Library</category><category domain="http://blogs.microsoft.co.il/blogs/alon/archive/tags/Taskbar/default.aspx">Taskbar</category><category domain="http://blogs.microsoft.co.il/blogs/alon/archive/tags/Shell+Libraries/default.aspx">Shell Libraries</category><category domain="http://blogs.microsoft.co.il/blogs/alon/archive/tags/Sensor+and+Location/default.aspx">Sensor and Location</category><category domain="http://blogs.microsoft.co.il/blogs/alon/archive/tags/Ribbon/default.aspx">Ribbon</category><category domain="http://blogs.microsoft.co.il/blogs/alon/archive/tags/XP2Win7/default.aspx">XP2Win7</category><category domain="http://blogs.microsoft.co.il/blogs/alon/archive/tags/S_2600_amp_3B00_L/default.aspx">S&amp;amp;L</category></item><item><title>Finally – Our Windows 7 .NET Wrappers are out</title><link>http://blogs.microsoft.co.il/blogs/alon/archive/2009/03/14/finally-our-windows-7-net-wrappers-are-out.aspx</link><pubDate>Sat, 14 Mar 2009 08:45:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:247923</guid><dc:creator>Alon Fliess</dc:creator><slash:comments>45</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/alon/rsscomments.aspx?PostID=247923</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/alon/commentapi.aspx?PostID=247923</wfw:comment><comments>http://blogs.microsoft.co.il/blogs/alon/archive/2009/03/14/finally-our-windows-7-net-wrappers-are-out.aspx#comments</comments><description>&lt;p&gt;During the last few months a small team from &lt;a href="http://www.sela.co.il/" target="_blank"&gt;Sela&lt;/a&gt;, has developed course materials, exercises and demos for the DPE Metro Program, that show how to develop with the new features of Windows 7. As you may know, all of the new feature of the system are exposed to native developer, using Win32 API and COM. To use C# and .NET we developed set of wrappers. &lt;a href="http://blogs.microsoft.co.il/blogs/sasha/" target="_blank"&gt;Sasha&lt;/a&gt; developed the Taskbar wrappers, and also &lt;a href="http://blogs.microsoft.co.il/blogs/sasha/archive/2009/03/06/windows-7-taskbar-thumbnail-clip-and-custom-previews.aspx" target="_blank"&gt;wrote&lt;/a&gt; about it in his blog. Dima developed the Sensor &amp;amp; Location Platform wrappers and I developed the Shell Libraries wrapper and the Multi-touch wrappers. &lt;/p&gt;
&lt;p&gt;You can download these wrappers from here:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://code.msdn.microsoft.com/Windows7Taskbar" target="_blank"&gt;Taskbar &amp;amp; Libraries&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://code.msdn.microsoft.com/SensorsAndLocation" target="_blank"&gt;Sensor &amp;amp; Location Platform&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://code.msdn.microsoft.com/WindowsTouch" target="_blank"&gt;Multi-touch&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;For the Taskbar &amp;amp; Libraries we have used the Vista Bridge project with few modifications. The other wrappers don’t depend on the Vista Bridge. Currently the Windows Bridge team is looking at our wrappers as a prototype for the next version of the bridge, and they are in contact with us.&lt;/p&gt;
&lt;h2&gt;So, what is in there for you?&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/sasha/" target="_blank"&gt;Sasha&lt;/a&gt; has wrote a lot about the Taskbar. I will talk briefly about the other wrappers and in future posts I will dive into the gory details.&lt;/p&gt;
&lt;h3&gt;Sensor &amp;amp; Location Platform&lt;/h3&gt;
&lt;p&gt;The Sensor API is designed for working with sensors (light, accelerometer, buttons, temperature, etc.) in a vendor-independent manner. In previous Windows versions you had to learn and target each vendor&amp;#39;s specific API.&lt;/p&gt;
&lt;p&gt;The Location API builds upon the Sensor API and provides location information for location-aware application. The location information may be provided from many different sources: GPS, WiFi hotspot or GSM cell triangulation. Windows 7 Sensors and Location platform selects for you the best source automatically with no need to even understand the different providers. For the developer, this new set of APIs provides an abstraction of the underline infrastructure freeing the developer to handle the high level of application logic. &lt;/p&gt;
&lt;p&gt;The API has many benefits (a partial list):&lt;/p&gt;
&lt;p&gt;1. Frees you from the burden of interpreting various protocols used by GPS receivers (NMEA +non-standard extensions, NMEA2000 and others.&lt;/p&gt;
&lt;p&gt;2. Not bound to any particular technology or vendor. No need for serial port/emulation.&lt;/p&gt;
&lt;p&gt;3. Multiple applications may use the information simultaneously.&lt;/p&gt;
&lt;p&gt;The S&amp;amp;L (Sensor &amp;amp; Location) wrapper is a framework that provide a managed access to the S&amp;amp;L Platform. It is a framework, because the design allows hardware vendor to extend the wrapper to support new .NET sensor types.&lt;/p&gt;
&lt;p&gt;As opposed to the native API that are based on COM GUID for any type information the .NET wrapper is based on strong type design. This means that the developer knows the sensor type that she uses, and the exact report that she gets. For example for ambient light sensor, a specific data report will be generated with a strong type property telling the light intensity reading in LUX. In future post I will talk more about the wrapper. &lt;/p&gt;
&lt;h3&gt;Shell Library&lt;/h3&gt;
&lt;p&gt;Windows 7 introduces a new concept of Libraries as destinations where users can use their files as collections of items that may span multiple locations across computers. Libraries supersede the functionality of previous Windows versions known folders (e.g. Documents, Pictures, Music) and replace them as a main “storage” destination. Applications have a straightforward method for interacting with Libraries programmatically with the Library API. They can create, interact with and support Libraries as first-class items in their experiences.&lt;/p&gt;
&lt;p&gt;In previous versions of Windows, each application had its own proprietary library. For example, Windows Media Player had a different set of scopes than iTunes and neither was consistent with your Music Folder. With the Library API applications can define and consume a consistent set of user-defined scopes.&lt;/p&gt;
&lt;p&gt;Libraries may also contain network folders. This enables a better user experience at work and at home. Whenever the user opens a common file dialog he or she gets an aggregation view of all of the library locations that are available. &lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/alon/image_0F0D21B0.png"&gt;&lt;img style="BORDER-RIGHT-WIDTH:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;" title="image" border="0" alt="image" src="http://blogs.microsoft.co.il/blogs/alon/image_thumb_00524FFE.png" width="532" height="379" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The Shell managed wrapper can be found under the &lt;b&gt;Windows7.DesktopIntegration.dll&lt;/b&gt;. It contains wrappers for the new Windows Shell Taskbar and the new Windows Shell Libraries which in turn depends on the Windows Vista Bridge. The Vista Bridge that comes with this project is based on version 1.4, and it is slightly modified to support some of the new Windows 7 features.&lt;/p&gt;
&lt;p&gt;To support the Windows Shell Libraries operations, the Windows 7 Integration Library contains the &lt;b&gt;ShellLibrary&lt;/b&gt; class. The class has few static functions to create, load or delete a library and many other instance methods to work on the library instance itself.&lt;/p&gt;
&lt;p&gt;Using the class is just a matter of using one of the static functions to get a &lt;b&gt;ShellLibrary&lt;/b&gt; instance and then calling a method on that instance. The following code opens an existing library and adds new folder location to it:&lt;/p&gt;
&lt;p&gt;&lt;font size="3"&gt;&lt;b&gt;&lt;span style="FONT-FAMILY:consolas;FONT-SIZE:9pt;mso-bidi-font-family:arial;mso-bidi-theme-font:minor-bidi;"&gt;&lt;/span&gt;&lt;/b&gt;&lt;/font&gt;&lt;/p&gt;&lt;b&gt;&lt;span style="FONT-FAMILY:consolas;COLOR:blue;FONT-SIZE:9pt;mso-bidi-font-family:arial;mso-bidi-theme-font:minor-bidi;mso-no-proof:yes;"&gt;public&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style="FONT-FAMILY:consolas;FONT-SIZE:9pt;mso-bidi-font-family:arial;mso-bidi-theme-font:minor-bidi;mso-no-proof:yes;"&gt; &lt;span style="COLOR:blue;"&gt;static&lt;/span&gt; &lt;span style="COLOR:blue;"&gt;void&lt;/span&gt; AddFolder(&lt;span style="COLOR:blue;"&gt;string&lt;/span&gt; name, &lt;span style="COLOR:blue;"&gt;string&lt;/span&gt; folderPath) &lt;/span&gt;&lt;/b&gt;&lt;b&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/b&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;b&gt;&lt;span style="FONT-FAMILY:consolas;FONT-SIZE:9pt;mso-bidi-font-family:arial;mso-bidi-theme-font:minor-bidi;mso-no-proof:yes;"&gt;{ &lt;/span&gt;&lt;/b&gt;&lt;b&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/b&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;b&gt;&lt;span style="FONT-FAMILY:consolas;COLOR:blue;FONT-SIZE:9pt;mso-bidi-font-family:arial;mso-bidi-theme-font:minor-bidi;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;using&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style="FONT-FAMILY:consolas;FONT-SIZE:9pt;mso-bidi-font-family:arial;mso-bidi-theme-font:minor-bidi;mso-no-proof:yes;"&gt; (&lt;span style="COLOR:#2b91af;"&gt;ShellLibrary&lt;/span&gt; library = &lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="mso-tab-count:2;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR:#2b91af;"&gt;ShellLibrary&lt;/span&gt;.Load(&lt;span style="COLOR:#2b91af;"&gt;ShellLibrary&lt;/span&gt;.CreateLibraryFullName(name), &lt;span style="COLOR:blue;"&gt;true&lt;/span&gt;)) &lt;/span&gt;&lt;/b&gt;&lt;b&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/b&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;b&gt;&lt;span style="FONT-FAMILY:consolas;FONT-SIZE:9pt;mso-bidi-font-family:arial;mso-bidi-theme-font:minor-bidi;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{ &lt;/span&gt;&lt;/b&gt;&lt;b&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/b&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;b&gt;&lt;span style="FONT-FAMILY:consolas;FONT-SIZE:9pt;mso-bidi-font-family:arial;mso-bidi-theme-font:minor-bidi;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;library.AddFolder(folderPath); &lt;/span&gt;&lt;/b&gt;&lt;b&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/b&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;b&gt;&lt;span style="FONT-FAMILY:consolas;FONT-SIZE:9pt;mso-bidi-font-family:arial;mso-bidi-theme-font:minor-bidi;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;} &lt;/span&gt;&lt;/b&gt;&lt;b&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/b&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;b&gt;&lt;span style="FONT-FAMILY:consolas;FONT-SIZE:9pt;mso-bidi-font-family:&amp;#39;Courier New&amp;#39;;mso-no-proof:yes;"&gt;}&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style="FONT-FAMILY:consolas;FONT-SIZE:9pt;mso-bidi-font-family:arial;mso-bidi-theme-font:minor-bidi;"&gt; &lt;/span&gt;&lt;/b&gt;&lt;b&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/b&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;More on Shell Libraries in future posts.&lt;/p&gt;
&lt;h3&gt;Multi-touch&lt;/h3&gt;
&lt;p&gt;One of the more exiting features of Windows 7 is the multi-touch support. First I have to admit that I had so much fun writing code and cool demos for multi-touch. I have two multi-touch machines, one is the &lt;a href="http://www.hp.com/united-states/campaigns/touchsmart/#" target="_blank"&gt;HP Touchsmart&lt;/a&gt;, a 25.5” dual touch all-in-one computer which runs the Windows 7 beta 64 bit version, and another &lt;a href="http://www.dell.com/content/products/productdetails.aspx/latit_xt?c=us&amp;amp;cs=04&amp;amp;l=en&amp;amp;s=bsd"&gt;Dell latitude XT&lt;/a&gt; machine, that has a true multi-touch support from &lt;a href="http://www.n-trig.com/"&gt;N-Trig&lt;/a&gt; which runs the 32bit version of Windows 7. &lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.hp.com/united-states/campaigns/touchsmart/#"&gt;&lt;img style="BORDER-RIGHT-WIDTH:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;" title="TouchSmart" border="0" alt="TouchSmart" src="http://blogs.microsoft.co.il/blogs/alon/image_4652E744.png" width="298" height="250" /&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href="http://www.dell.com/content/products/productdetails.aspx/latit_xt?c=us&amp;amp;cs=04&amp;amp;l=en&amp;amp;s=bsd"&gt;&lt;img style="BORDER-RIGHT-WIDTH:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;" title="Dell Latitude XT" border="0" alt="Dell Latitude XT" src="http://blogs.microsoft.co.il/blogs/alon/image_086629FB.png" width="219" height="200" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Windows application can target one of 3 levels of touch integration:&lt;/p&gt;
&lt;p&gt;&lt;font color="#ffff00"&gt;Good&lt;/font&gt;: No specific touch APIs are used but the application UI is appropriately sized and &lt;br /&gt;works well with the built-in gestures&lt;/p&gt;
&lt;p&gt;&lt;font color="#ffff00"&gt;Better&lt;/font&gt;: The gesture APIs are supported to give &lt;br /&gt;smooth natural interactions&lt;/p&gt;
&lt;p&gt;&lt;font color="#ffff00"&gt;Best&lt;/font&gt;: Deep touch focused experiences designed &lt;br /&gt;to take advantage of Multi-touch&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Windows 7 User32 controls have built-in support for multi-touch, for example you can scroll text in a Window using your fingers.&lt;/p&gt;
&lt;p&gt;When you want to add touch support to your application you need to get touch information from Windows. There are two different approaches to choose from. The easiest approach is to let Windows understand the user intent. The user uses her fingers to take actions like rotate, translate, scale, double finger tap, and so on. You can ask Windows to interprets these actions to a simple Windows message called gesture, that informs your application about the specific action with the related data. For example the user did scaling operation with 2.5 scaling factor. There are two main problems with this simple approach. The first is that you get only one interpretation for the user action. If the user rotate and scale in the same time, you will get only one gesture, not both. The second problem is that is the user needs to manipulate more then one object in the screen, let say by using her two hands, or another user’s hand, you will not get the correct interpretation at all. &lt;/p&gt;
&lt;p&gt;To overcome these problems you should register to get the low level Windows Message, which is the WM_TOUCH message. This gives you the row touch information. You need to decode the message, there is a good chance that this one message contains many different touch messages from each and any of the fingers that simultaneously touch the screen. The next action is to decide which message is belong to which item. Suppose you have many pictures on the screen, you need to correlate the touch message to the target picture. This can be done by doing hit-test using the location information of the touch event. Now you have to figure out what is the user intent. This is a hard task if you need to do it yourself, but don’t worry, Windows 7 provides a Manipulation Processor that does it for you. All you need to do is to pass the row touch message to the Manipulation Processor, and to get the Manipulation Delta event from it, which in turn is very similar to the gesture information, but include all the actions together. If you also want to have an inertia on each of the object you can use the Inertia Processor. This Processor is a little bit complicated and I will write about it in a future post.&lt;/p&gt;
&lt;p&gt;All of those messages and API are native Win32 and COM based. WPF 4.0 will have a full support for touch enabled applications, including Manipulation and Inertia. If you don’t want to wait to WPF 4.0 or you need to crate WinForms base touch enabled applications, you can use our wrapper. The wrapper lets you create a touch handler for WinForm, or WPF (or even for any User32 Windows Handle). This handler can be GestureHandler or TouchHandler. After creating the handler you should register for the gesture or touch events. If you use the TouchHandler you will probably create at least one instance of ManipulationProcessor or ManipulationInertiaProcessor which wrapps the native COM based processors.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/alon/image_6B9C8F18.png"&gt;&lt;img style="BORDER-RIGHT-WIDTH:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;" title="image" border="0" alt="image" src="http://blogs.microsoft.co.il/blogs/alon/image_thumb_1E3C2426.png" width="644" height="417" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;If you have a WPF 3.5 application you can use the stylus events as touch events, just use the WPF handler to enable WPF touch events.&lt;/p&gt;
&lt;p&gt;To get better understanding of how to use the touch wrapper we created many demos, for WinForm, WPF and even a C++/CLI Win32 application that uses the wrapper. I will write a future post with more details.&lt;/p&gt;
&lt;h2&gt;Summary&lt;/h2&gt;
&lt;p&gt;Windows 7 is a cool operating system. The end-user gets a better experience when using the Shell and the built-in applications, but it is our task to use the cool features in our own applications. For the .NET developer, we will get better support in the future, whether in .NET 4.0 or from the Windows Bridge team, but for now you can enjoy using the wrappers that we developed for DPE.&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=247923" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/alon/archive/tags/C_2B002B002F00_CLI/default.aspx">C++/CLI</category><category domain="http://blogs.microsoft.co.il/blogs/alon/archive/tags/C_2B002B00_/default.aspx">C++</category><category domain="http://blogs.microsoft.co.il/blogs/alon/archive/tags/MVP/default.aspx">MVP</category><category domain="http://blogs.microsoft.co.il/blogs/alon/archive/tags/Win32/default.aspx">Win32</category><category domain="http://blogs.microsoft.co.il/blogs/alon/archive/tags/C_2300_+3.0/default.aspx">C# 3.0</category><category domain="http://blogs.microsoft.co.il/blogs/alon/archive/tags/COM/default.aspx">COM</category><category domain="http://blogs.microsoft.co.il/blogs/alon/archive/tags/Interop/default.aspx">Interop</category><category domain="http://blogs.microsoft.co.il/blogs/alon/archive/tags/WPF/default.aspx">WPF</category><category domain="http://blogs.microsoft.co.il/blogs/alon/archive/tags/Sela/default.aspx">Sela</category><category domain="http://blogs.microsoft.co.il/blogs/alon/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://blogs.microsoft.co.il/blogs/alon/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/alon/archive/tags/Server+2008+R2/default.aspx">Server 2008 R2</category><category domain="http://blogs.microsoft.co.il/blogs/alon/archive/tags/Windows+7/default.aspx">Windows 7</category><category domain="http://blogs.microsoft.co.il/blogs/alon/archive/tags/Multitouch/default.aspx">Multitouch</category><category domain="http://blogs.microsoft.co.il/blogs/alon/archive/tags/Multi-touch/default.aspx">Multi-touch</category><category domain="http://blogs.microsoft.co.il/blogs/alon/archive/tags/Library/default.aspx">Library</category><category domain="http://blogs.microsoft.co.il/blogs/alon/archive/tags/Taskbar/default.aspx">Taskbar</category><category domain="http://blogs.microsoft.co.il/blogs/alon/archive/tags/Shell+Libraries/default.aspx">Shell Libraries</category><category domain="http://blogs.microsoft.co.il/blogs/alon/archive/tags/Sensor+and+Location/default.aspx">Sensor and Location</category><category domain="http://blogs.microsoft.co.il/blogs/alon/archive/tags/S_2600_amp_3B00_L/default.aspx">S&amp;amp;L</category></item></channel></rss>