Alteridem.WinTouch.NativeMethods.CloseGestureInfoHandle C# (CSharp) Метод

CloseGestureInfoHandle() публичный статический Метод

Closes the gesture info handle.
public static CloseGestureInfoHandle ( IntPtr gestureInfoHandle ) : bool
gestureInfoHandle System.IntPtr The gesture info handle.
Результат bool
        public static bool CloseGestureInfoHandle( IntPtr gestureInfoHandle )
        {
            if ( _pCloseGestureInfoHandle == null )
                return false;

            return _pCloseGestureInfoHandle( gestureInfoHandle );
        }

Usage Example

Пример #1
0
        protected override void WndProc(ref Message m)
        {
            bool handled = false;

            // Listen for operating system messages
            switch (m.Msg)
            {
            case WindowMessage.WM_GESTURE:
                GestureInfo info;
                if (NativeMethods.GetGestureInfo(m.LParam, out info))
                {
                    switch ((GestureId)info.id)
                    {
                    case GestureId.Pan:
                        handled = OnPan(info);
                        break;

                    case GestureId.PressAndTap:
                        handled = OnPressAndTap(info);
                        break;

                    case GestureId.Rotate:
                        handled = OnRotate(info);
                        break;

                    case GestureId.TwoFingerTap:
                        handled = OnTwoFingerTap(info);
                        break;

                    case GestureId.Zoom:
                        handled = OnZoom(info);
                        break;
                    }
                    if (handled)
                    {
                        NativeMethods.CloseGestureInfoHandle(m.LParam);
                    }
                }
                break;
            }
            if (!handled)
            {
                base.WndProc(ref m);
            }
        }