c++ - How to retrive text that was copied (with the CTRL + C command) -
i have windows application written in c++. want add paste option, on request application can retrieve whatever text user copied (i.e., control-c command).
is there way this?
you need use functions openclipboard(), getclipboarddata() , closeclipboard().
from msdn:
open clipboard calling openclipboard function.
determine of available clipboard formats retrieve.
retrieve handle data in selected format calling getclipboarddata function.
insert copy of data document.
the handle returned getclipboarddata still owned clipboard, application must not free or leave locked.
close clipboard calling closeclipboard function.
Comments
Post a Comment