On Tue, 29 May 2012 08:15:00 -0400, Bob Tennent wrote:
> Thanks for the link. But I'm not trying to convert a Linux CLI
> application into a Windows GUI application. I just want the Linux
> application to behave in the same way in the msys shell. Maybe the
> easiest approach would be to create a Qt4 wrapper; in Qt4, mouse events
> and the clipboard are easily acessible.
> Bob T.
This message is in my Sent folder, but after several hours it has
not appeared on the list so I am sending it again.
Well, OpenClipboard and friends should work whether you are in the
MSYS shell or not, so:
1) Call SetWindowsHookEx to register a callback function that is
called whenever there is a mouse event.
2) In your handler, when you detect a middle-button-click, call
OpenClipboard and friends to copy, paste or whatever.
There is no need to create any windows or controls.