简体   繁体   中英

Win32 API Console Programming in C

I am stuck with the problems like, reading text from a specific location (x=10, y=5) on the console window.

Where can I find a detail tutorial on Win32 API Console mode programming in C?

On MSDN, see the section on Character Mode Applications .

You can read text from the screen using the ReadConsoleOutputCharacter function.

You'd need to use ReadConsoleOutput(). Beware of the ambiguity in a coordinate like (10, 5). It could be relative from the console window upper-left corner. Or from the screen buffer. You'd probably need to make the buffer size the same as the window size to avoid this. SetConsoleScreenBufferSize().

These console functions are not wrapped by the C-runtime. The SDK documentation is quite decent, start here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM