c++ - How do you copy/paste image data? -


using c++ , winapi, how copy image data pre-loaded image clipboard?

you need create object implements idataobject, , place on clipboard using olesetclipboard.

when place data in clipboard have ability specify multiple formats. application reading clipboard can enumerate formats , decide 1 use.

there quite few "standard" clipboard formats (with known constant values), e.g.:

  • cf_bitmap: handle bitmap (hbitmap).
  • cf_dib: memory object containing bitmapinfo structure followed bitmap bits.
  • cf_dibv5: memory object containing bitmapv5header structure followed bitmap color space information , bitmap bits.

you can register custom formats using registerclipboardformat. office exposes images number of different formats they've registered, e.g.:

dword cf_png = registerclipboardformat("png"); dword cf_jfif = registerclipboardformat("jfif"); dword cf_gif = registerclipboardformat("gif"); dword cf_enhmetafile = registerclipboardformat("cf_enhmetafile"); dword cf_metafilepict = registerclipboardformat("cf_metafilepict "); 

Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -