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()); }
public ClipboardHook(IHwndSource targetWindow) { _targetWindow = targetWindow; SetHook(targetWindow); }
public KeyboardHook(IHwndSource window) { _window = window; _window[WM_HOTKEY] += OnHotkeyMessageReceived; }