Go to the first, previous, next, last section, table of contents.


ScreenGetChar

Syntax

#include <pc.h>

void  ScreenGetChar(int *ch, int *attr, int col, int row);

Description

This function stores the character and attribute of the current primary screen at row given by row and column given by col (these are zero-based) into the integers whose address is specified by ch and attr. It does so by directly accessing the video memory, so it will only work when the screen is in text mode. You can pass the value NULL in each of the pointers if you do not want to retrieve the the corresponding information.

Warning: note that both the variables ch and attr are pointers to an int, not to a char! You must pass a pointer to an int there, or your program will crash or work erratically.

Return Value

None.

Portability

not ANSI, not POSIX

Example

int ch, attr;

ScreenGetChar(&ch, &attr, 0, 0);


Go to the first, previous, next, last section, table of contents.