if(OpenClipboard())
 {     
     CString sPrjPath="wwwww";  //复制到剪切板的内容
        EmptyClipboard();
        HGLOBAL hClipboardData;
        hClipboardData = GlobalAlloc(GMEM_DDESHARE, sPrjPath.GetLength() + 1);
                char* pchData;
        pchData = (char*)GlobalLock(hClipboardData);

        strcpy(pchData, LPCSTR(sPrjPath));
        GlobalUnlock(hClipboardData);
        SetClipboardData(CF_TEXT, hClipboardData);
        CloseClipboard();
    }

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-05-21
  • 2021-09-07
  • 2022-12-23
  • 2021-12-19
  • 2021-06-07
  • 2022-12-23
猜你喜欢
  • 2021-12-19
  • 2021-10-29
  • 2022-01-24
  • 2022-12-23
  • 2021-12-19
  • 2022-02-01
  • 2022-12-23
相关资源
相似解决方案