Example #1
0
        public ClipboardTests(ITestOutputHelper testOutputHelper)
        {
            LogSettings.RegisterDefaultLogger <XUnitLogger>(LogLevels.Verbose, testOutputHelper);
            HwndSourceHook winProcHandler = (IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) =>
            {
                // We can use the GetClipboardFormatName to get the string for the windows message... weird but it works
                Log.Verbose().WriteLine("WinProc {0}, {1}", hwnd, WindowsMessage.GetWindowsMessage((uint)msg));
                return(IntPtr.Zero);
            };

            WinProcHandler.Instance.Subscribe(winProcHandler);
        }
Example #2
0
 static IntPtr WinProcClipboardHandler(IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled)
 {
     // We can use the GetClipboardFormatName to get the string for the windows message... weird but it works
     Log.Verbose().WriteLine("WinProc {0}, {1}", hWnd, WindowsMessage.GetWindowsMessage((uint)msg));
     return(IntPtr.Zero);
 }