C#에서 Managed Gesture API 이용.
안녕하세요,
applying this patch should fix the problem.
--- GestureRecognizer.cs 2009-08-26 11:53:24.000000000 -0000
+++ GestureRecognizer.cs 2010-02-26 09:46:33.000000000 -0000
@@ -30,12 +30,13 @@
private static readonly object EndEvent = new object();
private static readonly object SelectEvent = new object();
private static readonly object DoubleSelectEvent = new object();
private static readonly object HoldEvent = new object();
private static readonly object PanEvent = new object();
private static readonly object ScrollEvent = new object();
+ private WndProcHook wndProcHook = null;
private Control targetControl;
///
/// Initializes a new instance of the GestureRecognizer class
///
@@ -36,27 +37,31 @@
private Control targetControl;
///
/// Initializes a new instance of the GestureRecognizer class
///
{
if (value != this.targetControl)
{
if (this.targetControl != null)
{
// remove the WndProc hook for the previous targetControl
- Hook.RemoveHook(this.targetControl, WndProc);
+ if (wndProcHook != null)
+ {
+ Hook.RemoveHook(this.targetControl, wndProcHook);
+ }
this.targetControl = null;
}
if (value != null)
{
// add the WndProc hook for the current targetControl
this.targetControl = value;
- Hook.AddHook(this.targetControl, WndProc);
+ wndProcHook = new WndProcHook(WndProc);
+ Hook.AddHook(this.targetControl, wndProcHook);
}
}
}