获取粘贴板内容

    //2 Get Clipboard Data
    CString strClipboard;
    if (OpenClipboard())
    {
        HANDLE hData = GetClipboardData(CF_TEXT);
        CHAR* buffer = (CHAR*)GlobalLock(hData);
        strClipboard = buffer;
        GlobalUnlock(hData);
        CloseClipboard();
    }

你可能感兴趣的:(获取)