private IntPtr WinProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) { switch (msg) { case Win32.WmChangecbchain: if (wParam == _hWndNextViewer) { // clipboard viewer chain changed, need to fix it. _hWndNextViewer = lParam; } else if (_hWndNextViewer != IntPtr.Zero) { // pass the message to the next viewer. Win32.SendMessage(_hWndNextViewer, msg, wParam, lParam); } break; case Win32.WmDrawclipboard: // clipboard content changed CopyPasteItem itm = CreateNewCopyPasteItem(); itm.AddToCopyPasteItemsList(_list); // pass the message to the next viewer. Win32.SendMessage(_hWndNextViewer, msg, wParam, lParam); break; } return(IntPtr.Zero); }
public CopyItemFromListCommand(bool canExecute, CopyPasteItem cpi) { _cpi = cpi; _canExecute = canExecute; }
public CopyPasteItem CreateNewCopyPasteItem() { CopyPasteItem itm = new CopyPasteItem(this); return(itm); }