views:

85

answers:

2

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?

+3  A: 

On MSDN, see the section on Character Mode Applications.

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

Tim Robinson
A: 

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.

Hans Passant