winapi - Windows 8 Getting Absolute X Y Coordinates of Touchscreen (regardless of window) -


i've scowered msdn/google past few days , i've been unable find answer question.

i'm looking x y coordinates of touch/multiple touches on touchscreen device powered windows 8. there tons of guides on how add touch handle specific window, create app relies on touch input, regardless of window/app 1 in focus/being touched.

basically, i'm looking lowest level touch api out there. got ideas? thanks!

the easy way use "legacy" (windows 7) api. this, receive touch input wm_touch message.

you use lparam of message in call gettouchinputinfo.

that returns array of touchinput structures, each of includes x , y coordinate (which, in seems may record useless/illusory precision, given precision of one-hundredth of pixel).

for new apps, microsoft recommends using pointer input api. this, you'd receive messages wm_pointerdown, wm_pointerup, , wm_pointerupdate. these, lparam of message contains single x/y point input. more complete information location, you'd call getpointerinfo retrieve coordinates of input in pointer_info structures.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -