剪贴板上的数据多种多样,我想把它以某种格式保存起来(如二进制)在以后以原格式恢复到剪贴板上,有办法么?

解决方案 »

  1.   

    store the clipboard format and content in a structure, restore it when needed.
    there is some code snippet "Example of a Clipboard Viewer" in MSDN
    http://msdn.microsoft.com/library/en-us/winui/winui/windowsuserinterface/dataexchange/clipboard/usingtheclipboard.asp
      

  2.   

    主要函数有几个
    static CWnd* PASCAL GetClipboardOwner()//获得系统剪贴板所有者相关窗口指针
    SetClipboardViewer 
    GetOpenClipboardWindow
    GetClipboardViewer 
    OpenClipoard
    SetClipboardData(UNIT Format,HANDLE hMem)
    大概用到这几个函数
    你自己去查MSDN吧