Код: Выделить всё
// Saves the text in blahwnd to a file called something.txt
FILE* clickfile;
fopen_s(&clickfile, "something.txt", "w+");
int textlen;
textlen = GetWindowTextLength(blahwnd);
textlen++;
WCHAR* buf;
buf = new WCHAR[textlen];
GetWindowText(blahwnd, buf, textlen);
fwrite(buf, sizeof(WCHAR), textlen, clickfile);
delete[] buf;
fclose(clickfile);
c l i c k
Почему у него есть пробелы между символами?
Подробнее здесь: https://stackoverflow.com/questions/797 ... n-the-file