Hello, there is such a task that I do not solve: you need to copy any selected text (maybe text from notepad, Word, file name) to the clipboard, and then display it on the console screen. Tell me, what functions does all this implement?
Thank.
Hello, there is such a task that I do not solve: you need to copy any selected text (maybe text from notepad, Word, file name) to the clipboard, and then display it on the console screen. Tell me, what functions does all this implement?
Thank.
For example:
if( OpenClipboard(NULL) ) { char* data = (char*)GetClipboardData(CF_TEXT); if(data) ;//делай что хочешь с данными, например - выводи на консоль CloseClipboard(); }
If it is necessary not just to deduce that it is ALREADY copied, but to find the edith window (in general it is probably not edith in the Word) and take the text from there, then this task is more complicated, but also completely solvable. You can use FindWindow and FindWindowEx and remove the text using GetWindowText, but then copy to the buffer and not necessarily, you can directly from there to the console
Source: https://ru.stackoverflow.com/questions/80830/
All Articles