X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f From: Hans-Bernhard Broeker Newsgroups: comp.os.msdos.djgpp Subject: Re: scanf & 320*200 Date: 14 Jan 2002 13:23:09 GMT Organization: Aachen University of Technology (RWTH) Lines: 25 Message-ID: References: NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de X-Trace: nets3.rz.RWTH-Aachen.DE 1011014589 26881 137.226.32.75 (14 Jan 2002 13:23:09 GMT) X-Complaints-To: abuse AT rwth-aachen DOT de NNTP-Posting-Date: 14 Jan 2002 13:23:09 GMT Originator: broeker@ To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com charlie wrote: > i know i'm missing important info but not sure what - > if it's possible to printf, or sprintf, with textout or textout_centre etc > in (320 * 200), why not scanf, possibly using FILE to set the stream > pointer? Because scanf reads the *keyboard*, not the screen. The screen isn't modelled as a readable file, so you can't read it like one. Only text screens can be read out (using ScreenGetChar() from the package) directly. In graphics mode, there is no explicit representation of a single displayed character that you could read out: it's just an arbitrary collection of pixels. So, in a nutshell: graphical display mode means you can only read pixels, not characters from video memory. Characters can be converted into graphical pixels for output, but the reverse operation is beyond the scope of both the BIOS and the vast majority of graphics libraries: only OCR software for scanners usually does that. -- Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.