1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
for (int j = 0; j <= Listing_courbe->RowCount; j++) // On créé une ligne de texte avec toutes les lignes
Data = Data + Listing_courbe->Cells[1][j] + "\t" + Listing_courbe->Cells[2][j] + "\r\n";
size_t len = strlen(Data.c_str());
HWND hwnd = GetDesktopWindow();
OpenClipboard(hwnd);
EmptyClipboard();
GLOBAL hg = GlobalAlloc(GMEM_MOVEABLE,s.Length() + 1);
if (!hg)
{
CloseClipboard();
return;
}
memcpy(GlobalLock(hg), s.c_str(), s.Length()+1);
GlobalUnlock(hg);
SetClipboardData(CF_TEXT,hg);
CloseClipboard(); |
Partager