[Dev-C++] Clipboard copy/paste detection
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Scott B. <doo...@ya...> - 2005-06-07 02:59:49
|
Hello everybody,
I am currently writing a program to detect clipboard copy/pastes.
The copy detection part works fine - all I need to do for that is add a clipboard viewer to the clipboard viewer chain like this:
hNextView = SetClipboardViewer(hwnd);
SendMessage(hNextView,WM_DRAWCLIPBOARD,0,0);
Then, when I get a WM_DRAWCLIPBOARD message in WindowProcedure(),
I can call GetClipboardOwner(). This gives me a handle to the window which does the copying to the clipboard.
However I now need to find a way of detecting paste events and getting a handle to the program that the clipboard pastes to, in the way that GetClipboardOwner() returns a handle to the program which copies to the clipboard.
Does anybody have any ideas as to how this could be done ?
Any help would be greatly appreciated.
Scott
Send instant messages to your online friends http://au.messenger.yahoo.com |