public WindowSubclassingMessageFilter(IntPtr hWnd)
{
if (!Win32.IsWindow(hWnd)) { throw new ArgumentException(); }
this.procs = new Dictionary<int, MessageProc>();
this.hWnd = hWnd;
this.newWndProcDelegate = this.WndProc;
this.newWndProc = Marshal.GetFunctionPointerForDelegate(newWndProcDelegate);
this.oldWndProc = Win32.GetWindowLong(hWnd, -4);
Win32.SetWindowLong(hWnd, -4, newWndProc);
}