I've tried GetMessageExtraInfo() mentioned here:
Detect if WM_MOUSEMOVE is caused by touch/pen
but it does not work - GetMessageExtraInfo() returns 0 for all mouse events generated by touch pad.
Tried it on notebook with integral touchpad and on desktop PC with external touch pad attached.
I also tried to use WM_TOUCH event with RegisterTouchWindow() and WM_GESTURE but they do not work either - I am not receiving neither WM_TOUCH nor WM_GESTURE events on the window.
Essentially what I need is to detect when finger is on and off touch pad. But it seems that WM_TOUCH or WM_GESTURE work only for touch displays but not for touch pads, for unknown reasons.
Any advice?