Код: Выделить всё
// 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);
< /code>
something.txtКод: Выделить всё
C l i c k Почему у него есть пробелы между символами?
Подробнее здесь: https://stackoverflow.com/questions/797 ... n-the-file
Мобильная версия