POV-Ray : Newsgroups : povray.programming : A question about windows programming (C++) Server Time
26 Dec 2024 10:53:38 EST (-0500)
  A question about windows programming (C++) (Message 1 to 4 of 4)  
From: Nieminen Mika
Subject: A question about windows programming (C++)
Date: 5 Jun 1999 10:26:43
Message: <375933a3@netplex.aussie.org>
Not directly related to povray, but it's for an utility program that
I'm making.

  How do I redirect stdout and stderr to a text window inside my
application (just like povray seems to do)?
  I'm using borland C++ builder.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Ronald L  Parker
Subject: Re: A question about windows programming (C++)
Date: 5 Jun 1999 14:10:48
Message: <375a66f2.39667702@news.povray.org>
On 5 Jun 1999 10:26:43 -0400, Nieminen Mika <war### [at] cctutfi> wrote:

>  Not directly related to povray, but it's for an utility program that
>I'm making.
>
>  How do I redirect stdout and stderr to a text window inside my
>application (just like povray seems to do)?
>  I'm using borland C++ builder.

I don't think POV does, exactly.  It uses a set of macros for all text
output.  If you look at the windows config.h, you'll see that it
points those macros at a series of WIN_* functions that send the
output to the message window.

In win32, you might be able to get away with pointing stdout and
stderr at an anonymous pipe, and having another thread emptying the
other end of the pipe into a window of some kind.


Post a reply to this message

From: Nieminen Mika
Subject: Re: A question about windows programming (C++)
Date: 6 Jun 1999 10:37:35
Message: <375a87af@netplex.aussie.org>
Ronald L. Parker <par### [at] mailfwicom> wrote:
: In win32, you might be able to get away with pointing stdout and
: stderr at an anonymous pipe, and having another thread emptying the
: other end of the pipe into a window of some kind.

  How do I do that?

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Ronald L  Parker
Subject: Re: A question about windows programming (C++)
Date: 6 Jun 1999 14:07:52
Message: <375cb620.32158921@news.povray.org>
On 6 Jun 1999 10:37:35 -0400, Nieminen Mika <war### [at] cctutfi> wrote:

>Ronald L. Parker <par### [at] mailfwicom> wrote:
>: In win32, you might be able to get away with pointing stdout and
>: stderr at an anonymous pipe, and having another thread emptying the
>: other end of the pipe into a window of some kind.
>
>  How do I do that?

I guess you start by reading up on threads and pipes.  I think the way
you create pipes is with CreatePipe.  Threads, of course, are a huge
subject.  

Documentation on CreatePipe and other functions can be found at
http://msdn.microsoft.com/library/default.htm .

You'll have to use MSIE, though, because Embrace and Extend is alive
and well in the world of Java. 

CreatePipe is under "Platform SDK > Base Services > Interprocess
Communication > Pipes" and the threading stuff us also under Base
Services, under "DLLs, Processes, and Threads"


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.