g4tools  5.4.0
Classes | Functions
tools::Windows Namespace Reference

Classes

class  glarea
 
class  session
 
class  sg_viewer
 
class  window
 

Functions

bool is_message_touch_event ()
 

Function Documentation

◆ is_message_touch_event()

bool tools::Windows::is_message_touch_event ( )
inline

Definition at line 26 of file glarea.

26  {
27  // from https://stackoverflow.com/questions/29857587/detect-if-wm-mousemove-is-caused-by-touch-pen.
28  static const LONG_PTR c_SIGNATURE_MASK = 0xFFFFFF00;
29  static const LONG_PTR c_MOUSEEVENTF_FROMTOUCH = 0xFF515700;
30  LONG_PTR extraInfo = ::GetMessageExtraInfo();
31  return ( ( extraInfo & c_SIGNATURE_MASK ) == c_MOUSEEVENTF_FROMTOUCH );
32 }