ftp.delorie.com/djgpp/doc/libc/libc_675.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

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

ANSI/ISO C No
POSIX No

Example

 
int ch, attr;

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


  webmaster     delorie software   privacy  
  Copyright © 2004     Updated Apr 2004