#re:streams in C++
3 messages in this thread
I am curious if there is anyway to setup a stream to get input from and
output to a custom screen and/or window. I can't find anyway of re-directing
the address for the streams to do this.
I am using SAS C 6.51. Thanx.
James,
Is this the kind of thing you had in mind:
/* First open your window: */
Window = OpenWindow(… etc …) or OpenWindowTagList( … etc…)
/* Now attach a console to it:
sprintf(Buffer,"CON://///WINDOW%lx", Window);
if(! (Con_FileHandle = Open( Buffer, MODE_OLDFILE)) )
printf("Can't open Console handler.");
/* Now you can use Con_FileHandle like any other file handle */
(This doesn't work with WB 1.3 or earlier, unless you use ConMan or
similar.)
Regards,
Shraddhan (via AP from Hertfordshire, England)
I will try this, but I am using WB 1.3. I will be going to 3.1 in the near
future, but am waiting, to see if 3.2 comes out, as I won't have the money
until March, anyway.
What I want to do is use something similar to cout/cin to write to a custom
window, rather than using my own routines, as it might be shorter code and I am
just curious.
Thanx and later.