Tsukikage.WindowsUtil.WindowSubclassingMessageFilter.RegisterProc C# (CSharp) Метод

RegisterProc() публичный Метод

public RegisterProc ( int msg, MessageProc proc ) : void
msg int
proc MessageProc
Результат void
        public void RegisterProc(int msg, MessageProc proc)
        {
            if (procs.ContainsKey(msg))
            {
                procs[msg] += proc;
            }
            else
            {
                procs[msg] = proc;
            }
        }

Usage Example

Пример #1
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.");
     }
 }
All Usage Examples Of Tsukikage.WindowsUtil.WindowSubclassingMessageFilter::RegisterProc