Picking up gesture messages in MinGW

Anyone else trying to build Win32 touch screen applications with Codeblocks/MinGW? I'm having some difficulties getting it to compile. The mingw libraries have no mention of WM_GESTURE or GetGestureInfo. In fact, "Find In Files" can't even find the word gesture. I'm about ready to give it a gesture of another kind.

The MS API documentation tells me I need only to include windows.h. Does MinGW not support the current touch interface?

In the Windows SDK, WM_GESTURE and GetGestureInfo are both defined in WinUser.h. But it's not there in my MinGW installation (version 4.8.1, 32-bit), so it looks like it hasn't made it to the MinGW version of the headers. (Unless it's just appeared.)

Andy
Last edited on
Actually, it looks like it might be available in the 64-bit version, going by this commit from 2013...

[Mingw-w64-svn] SF.net SVN: mingw-w64:[6392] trunk/mingw-w64-headers/include/winuser.h
http://sourceforge.net/p/mingw-w64/mailman/message/31717375/

Can see WM_GESTURE and GetGestureInfo in this version of WinUser.h

Andy
Last edited on
Interesting, thank you for the insight. I'm actually developing for a 32-bit tablet, but then again, M64 claims to be "for 32- and 64-bit Windows," so perhaps it would work. I'll give it a shot.
The alternative would be to use LoadLibrary, etc. along with private defs of the required structs, etc?

Andy
Using w64 seems to cause compatibility issues with the plugin API that I'm trying to use, so the custom definitions are probably the way to go. Copied them from w64 and eliminated all but one of my build errors. Specifically, the most important one...

obj\Release\main.o:main.cpp|| undefined reference to `GetGestureInfo(HGESTUREINFO__*, tagGESTUREINFO*)@8'|

Any idea what library I can find it in? There's no libwinuser.a, and tried static linking libuser32.a to no avail.
user32.lib would be the right lib if MinGW knew what GetGestureInfo was!

But you'll need to dynamically link to it (LoadLibrary + GetProcAddress)

Andy
Well, dynamically linking seemed to work. I have other issues to iron out but not this one. You also solved another linking-related problem I had in a personal project, and for that I am very grateful!
Topic archived. No new replies allowed.