开发者

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 d开发者_JAVA百科etail tutorial on Win32 API Console mode programming in C?


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.


On MSDN, see the section on Character Mode Applications.

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜