Re: clipboard local copy



Janwillem van Dijk wrote:
Hello,

I have a simple application that tries to do things with the clipboard contents like saving to file, printing and viewing. This works all rather well. However, I want to make, e.g. when pressing a button, a local copy of a snapshot of the clipboard such that later changes to the clipboard do not interfere. Things I tried until now give all kinds of violations or just do not work.

Must be simple but I cannot find it, please help,
Janwillem
You must use the SetClipBoardViewer API  which will
connect a window of yours in the viewer change.
 the return value is the next window in the chain
which you must call passing along the same info using
SendMessage and not PostMessage.
  etc..
  you can also alter the chain window order but i
would be carefully there because other windows
maybe monitoring the WM_CHANGECBCHAIN message and then
simply put the order back to where it wants it in which
 case, if your app tries to do the same thing, you may
end up with a message looping issue..
 so one should try to avoid fighting over who is going
to be first in the list.



--
Real Programmers Do things like this.
http://webpages.charter.net/jamie_5

.


Quantcast