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:

pasting information clipboard

  1. open clipboard calling openclipboard function.

  2. determine of available clipboard formats retrieve.

  3. retrieve handle data in selected format calling getclipboarddata function.

  4. insert copy of data document.

    the handle returned getclipboarddata still owned clipboard, application must not free or leave locked.

  5. close clipboard calling closeclipboard function.


Comments

Popular posts from this blog

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

json - Gson().fromJson(jsonResult, Myobject.class) return values in 0's -