Beispiel #1
0
 private void SetHook(IHwndSource targetWindow)
 {
     const int WM_DRAWCLIPBOARD = 0x308;
     const int WM_CHANGECBCHAIN = 0x030D;
     targetWindow[WM_DRAWCLIPBOARD] += OnDrawClipboardMessageReceived;
     targetWindow[WM_CHANGECBCHAIN] += OnChangeCbChainMessageReceived;
     _nextClipboardViewer = (IntPtr)SetClipboardViewer(targetWindow.Handle.ToInt32());
 }
Beispiel #2
0
 public ClipboardHook(IHwndSource targetWindow)
 {
     _targetWindow = targetWindow;
     SetHook(targetWindow);
 }
Beispiel #3
0
 public KeyboardHook(IHwndSource window)
 {
     _window             = window;
     _window[WM_HOTKEY] += OnHotkeyMessageReceived;
 }