Download the new for windows Multitouch1/18/2024 Private void OnUnregister(object sender, EventArgs e)Īnd that worked out reasonably well for me in that I can run my application with the CodePlex driver, click the button that calls OnRegister in the code-behind above and then do a bit of “touch” input and get some debug tracing dumped into a TextBox MessageBox.Show("No multi touch input detected") MessageBox.Show("Failed to register for touch input") Return(String::Format(L"Touch Id ", input.ToString(), Using namespace System::Collections::Generic So, having asked whether I’m on a touch-enabled device or not, maybe I can capture some touch events? I wrote a little Panel-derived class ( Windows Forms Panel that is ) to try and pick some up – you need to call RegisterTouchWindow only if you want the lower level touch messages rather than the gesture messages Inertia support – there’s not much in the docs here so I think a bit of experimentation would be called for.Manipulation support – from a set of ( from manipulations.idl ) translateX, translateY, scale, rotate.New windows messages (WM_GESTURE) representing multi-touch gesture messages.New windows messages (WM_TOUCH) representing touch up/down/move with identification of multiple touch points.Ok…maybe this gets me somewhere? When you look at the SDK there’s a few sides to the touch capabilities Then when I run my application I see a decent return value from my TouchCapabilities.HasMultiTouch property. I also added in a second mouse to use as my second touch input. So things were looking a little “tricky” until Paul pointed me at a CodePlex project that helps out with a virtual driver so I downloaded those bits, watched the installation video and installed the bits and rebooted. I dropped that into a Windows Forms application, called it and came up with the somewhat-expected response of false. Private static extern int GetSystemMetrics(int nIndex) Windows 7 SDK says that a failure here ( 0 ) will not set LastError. (((TouchMetrics)GetSystemMetrics(SM_DIGITIZER)) & Taken from the Windows 7 SDK, possible transcription errors. I pretty soon realised that my Windows 7 SDK was out of date ( the previous link is ok though ) and so I flicked through the online docs instead whilst downloading the updated ISO image for the RC rather than the beta.įrom what I could tell, there’s a new parameter value for GetSystemMetrics which can tell you what kind of touch capabilities the device you are on has and so I figured I’d write a little class to surface that I’ll return to those too in a subsequent post but, initially, I just wanted to have a glance at the underlying API’s a little first and that’s what follows here and on the next post. The right way to go is either to look at WPF V4.0 which I’ll return to or to head to Īnd there you can download a whole bunch of interop wrappers that’ll make your life a lot easier. So, I fired up the Windows 7 SDK and wrote a little code in order to experiment.īIG NOTE: this is not really the right way to go. Neither of which I own and neither of which is Microsoft about to buy me □ I’ve seen 2 multi-touch-enabled machines, the HP TouchSmart So, that was easy enough but what about Multi-Touch? Well, the first “problem” I have is that I don’t have any multi-touch-enabled hardware. I’ve done some work with the Tablet PC in my time and that wasn’t too tricky and I gave an example of that at DevDays the other week in that I used a simple WPF application that handles basic ink gestures Īnd that’s just using a WPF InkCanvas with its gesture mode set to GestureOnly and a little code behind it ( download the source here if you like ). ( I’ve captured this on video and will share at a later point as I’m not able to just at the moment ).īut this got me thinking about Multi-Touch in Windows 7 and wondering how easy/hard it is. I was down in the Microsoft Technology Centre at Reading the other week where I got a chance to take a look at a piece of proof-of-concept work that one of our customers is doing around using touch in Windows 7 to improve the user experience of one of their applications.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |