From: "Paul Ranson"
This is a multi-part message in MIME format.
------=_NextPart_000_0011_01C4BDB7.3C8FAC10
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
You'll have to look deeper into the Win32 API, which is where 'cout' or =
'printf' will end up anyway. Try this for example,
#include
int main()
{
HANDLE hC =3D ::GetStdHandle ( STD_OUTPUT_HANDLE ) ;
if ( hC =3D=3D INVALID_HANDLE_VALUE )
return 1;
COORD c ;
c.X =3D 10 ;
c.Y =3D 10 ;
DWORD dw ;
::FillConsoleOutputAttribute ( hC,
FOREGROUND_GREEN | FOREGROUND_INTENSITY |
BACKGROUND_RED | BACKGROUND_INTENSITY,
10,
c,
&dw ) ;
::WriteConsoleOutputCharacter ( hC,
"Hello Geo.",
10,
c,
&dw ) ;
::Sleep ( 5000 ) ;
return 0;
}
etc.
Paul
"Geo" wrote in message
news:4180c3a9$1{at}w3.nls.net...
> "Paul Ranson" wrote in message =
news:417fac9f{at}w3.nls.net...
>=20
>> Poking bytes into screen memory isn't going to help you on a modern
> Windows
>> machine. With today's technology the display overhead is very small =
for
> text
>> and normal stuff in relation to how much you can absorb as a user.
>=20
> Is there a way when writing a command window to cout text to a =
specific
> location in the command window? Like 3 characters over and 2 rows down =
or
> something along those lines? I find that when you just print a line =
each
> time and it forces the whole screen to scroll up one line it is very =
slow.
>=20
------=_NextPart_000_0011_01C4BDB7.3C8FAC10
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
You'll have to look deeper into the Win32
API, which =
is where=20
'cout' or 'printf' will end up anyway. Try this for =
example,
#include=20
<windows.h>
int=20
main(){ HANDLE hC =3D
::GetStdHandle ( = STD_OUTPUT_HANDLE )=20
; if ( hC =3D=3D INVALID_HANDLE_VALUE
) =
return=20
1; COORD c ; c.X =3D 10 =
; c.Y =3D 10=20
; DWORD dw ; =
::FillConsoleOutputAttribute=20
( =
hC, =20
FOREGROUND_GREEN | FOREGROUND_INTENSITY=20
| &n=
bsp;=20
BACKGROUND_RED |=20
BACKGROUND_INTENSITY, =
&=
nbsp; &n=
bsp; &nb=
sp; =20
10, =
&=
nbsp; &n=
bsp; &nb=
sp; =20
c, &=
nbsp; &n=
bsp; &nb=
sp; =20
&dw ) ;
=20
::WriteConsoleOutputCharacter (=20
hC, =
&=
nbsp; &n=
bsp; =20
"Hello=20
Geo.", &nb=
sp; &nbs=
p;  =
; =20
10, =
&=
nbsp; &n=
bsp; &nb=
sp;=20
=20
c, &=
nbsp; &n=
bsp; &nb=
sp;=20
&dw )=20
;
=
::Sleep ( 5000 )=20
;
=
return=20
0;}
etc.
Paul
"Geo" <mailto:georger{at}nls.net">
size=3D2>georger{at}nls.net> wrote in message =
news:4180c3a9$1{at}w3.nls.net...> "Paul Ranson" <mailto:paul{at}barkto.com">
size=3D2>paul{at}barkto.com> wrote in message =
news:417fac9f{at}w3.nls.net...> =
>>=20
Poking bytes into screen memory isn't going to help you on a =
modern>=20
Windows>> machine. With today's technology the
display = overhead is=20
very small for> text>> and normal
stuff in relation to = how much=20
you can absorb as a user.> > Is there a
way when writing a = command=20
window to cout text to a specific> location in the command
= window? Like 3=20
characters over and 2 rows down or> something along those
lines? = I find=20
that when you just print a line each> time and it forces
the = whole screen=20
to scroll up one line it is very slow.>
------=_NextPart_000_0011_01C4BDB7.3C8FAC10--
--- BBBS/NT v4.01 Flag-5
* Origin: Barktopia BBS Site http://HarborWebs.com:8081 (1:379/45)
SEEN-BY: 633/267 270 5030/786
@PATH: 379/45 1 396/45 106/2000 633/267
|