Jump to content

The Touch/Gesture Demo code seems impossible to work


Recommended Posts

I'm trying to code up a relatively simple application that relies on Microsoft's WM_TOUCH and WM_GESTURE messages and APIs. All my machines are desktops, so I bought an external touchpad device. I was thrilled when I just found a demo thread that used exactly those features! Here it is: [demo] How to handle WM_GESTURE and WM_TOUCH message:). And there's a YouTube video showing it working.

So I downloaded the code, with three separate demo applications, built them and ran them with excitement! Alas, although they all launched and presented their respected GUIs, every single touch and gesture was totally commandeered by the OS! None of them ever reached the applications! Windows 7 and 10 treat the touchpad as just another mouse.

I've been posting in quite a few fora asking how to resolve that utterly hopeless situation, but no one has been willing or able to provide any assistance whatsoever. Recently, it occurred to me that the problem might possibly be related to the fact that I'm using an external touchpad -- the Demo video may have been performed on a system with a built-in touchpad.  But that's just a hypothesis. Who knows?

And that's exactly why I've decided to ask you brilliant folks here -- I'm confident that I'll at least get a reply, unlike everywhere else!  Does anyone have any idea how I could successfully work around this problem? The only thing I can think of to at least get started would be to have my code intercept ALL mouse outputs, say after a hotkey or when the mouse is moved to a certain pre-defined area on the screen. But I have no idea if that would actually allow the WM_TOUCH and WM_GESTURE messages to get through to my app.

What do you think?

 

THANKS!

 

Edited by Mbee
Link to comment
Share on other sites

@Mbee

WM_TOUCH should work indipendently from the device source (internal or external), as it is stated in the Microsoft documentation.

9 hours ago, Mbee said:

every single touch and gesture was totally commandeered by the OS! None of them ever reached the applications!

So, when you "tap" on the area in the first sample GUI, what is the behaviour? :)

Click here to see my signature:

Spoiler

ALWAYS GOOD TO READ:

 

Link to comment
Share on other sites

Hi, and thanks very much for your reply! When I try any of the three GUIs, nothing happens at all.

ETA:  Just to be sure, I've now tried them under both Windows 7 and Windows 10. Nothing happens under both.

Edited by Mbee
Add additional info
Link to comment
Share on other sites

I think it more seems like WM_TOUCH and WM_GESTURE messages are simply not received by the operating system and therefore not forwarded to your AutoIt application.

Are you sure your external touchpad generates WM_TOUCH and WM_GESTURE messages at all? Maybe it only generates mouse messages. When you bought the device, did you also receive driver software and demo program to verify that the touchpad works? Have you verified that the touchpad works before you try to make it work with your AutoIt scripts?

If you don't know if it works, you'll need to test as described in the Microsoft documentation in the link in the post above that your touchpad supports Multi-input.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...