昔懐かしい方式でのウィンドウサブクラス化。
Inheritance: IDisposable
コード例 #1
0
        public void UnregisterTouchWindow()
        {
            try
            {
                if (filter != null)
                {
                    filter.Dispose();
                    filter = null;
                }

                if (!control.IsDisposed && !Win32.UnregisterTouchWindow(control.Handle))
                {
                    Debug.WriteLine("ERROR: Could not unregister window for multi-touch");
                }
            }
            catch (Exception)
            {
                Debug.WriteLine("ERROR: Touch APIs aren't supported.");
            }
        }
コード例 #2
0
 public void RegisterWindow(bool subclassing)
 {
     try
     {
         if (!Win32.RegisterTouchWindow(control.Handle, 0))
         {
             Debug.WriteLine("ERROR: Could not register window for multi-touch");
         }
         if (subclassing)
         {
             if (filter == null)
             {
                 filter = new WindowSubclassingMessageFilter(control.Handle);
                 filter.RegisterProc(Win32.WM_TOUCH, this.DecodeTouch);
             }
         }
     }
     catch (Exception)
     {
         Debug.WriteLine("ERROR: Touch APIs aren't supported.");
     }
 }
コード例 #3
0
ファイル: TouchDevice.cs プロジェクト: ttsuki/ttsuki
        public void UnregisterTouchWindow()
        {
            try
            {
                if (filter != null)
                {
                    filter.Dispose();
                    filter = null;
                }

                if (!control.IsDisposed && !Win32.UnregisterTouchWindow(control.Handle))
                {
                    Debug.WriteLine("ERROR: Could not unregister window for multi-touch");
                }
            }
            catch (Exception)
            {
                Debug.WriteLine("ERROR: Touch APIs aren't supported.");
            }
        }
コード例 #4
0
ファイル: TouchDevice.cs プロジェクト: ttsuki/ttsuki
 public void RegisterWindow(bool subclassing)
 {
     try
     {
         if (!Win32.RegisterTouchWindow(control.Handle, 0))
         {
             Debug.WriteLine("ERROR: Could not register window for multi-touch");
         }
         if (subclassing)
         {
             if (filter == null)
             {
                 filter = new WindowSubclassingMessageFilter(control.Handle);
                 filter.RegisterProc(Win32.WM_TOUCH, this.DecodeTouch);
             }
         }
     }
     catch (Exception)
     {
         Debug.WriteLine("ERROR: Touch APIs aren't supported.");
     }
 }