🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #13164

Re: Displaying stdout in dos box

#13164
From: Bob Gonder
Date: Wed, 29 Oct 2003 17:14
20 lines
1745 bytes
Denville Longhurst wrote:

>Running a gui app from a command box, I need to display stdout in the cmd
>box (in case the app fails to start, then the status messages remain visible
>in the cmd box).
>
>  I have tried APP >CON which does nothing, 

 Isn't it  CON:

>Running a console from within the app using AllocConsole() is no good
>because the console is destroyed when the app terminates.

You could use MessageBox() to show your errors.

You could also write a console app that starts the gui, with the
stdout redirected to itself (as shown in many recent messages).
The gui app could return non-zero on any error conditions, zero on
success. Then if the gui app returns 0, the console app quits.
Otherwise, it waits for the user to read the messages. 
Technical Details
Message-ID: <cgsvpvcqp2dmnpk9p7l66ofbvnsc2np4iq@4ax.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.tpinternet.pl!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3f9fe982@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,e00744b422e64f48
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-10-29 09:40:55 PST
From: Bob Gonder <notbg@notmindspring.invalid>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Displaying stdout in dos box
Date: Wed, 29 Oct 2003 09:14:52 -0800
Organization: MindSpring Enterprises, Inc.
Reply-To: notbg@notmindspring.invalid
Message-ID: <cgsvpvcqp2dmnpk9p7l66ofbvnsc2np4iq@4ax.com>
References: <3f9fe982@newsgroups.borland.com>
X-Newsreader: Forte Agent 1.91/32.564
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 67.31.165.56
X-Trace: newsgroups.borland.com 1067447693 67.31.165.56 (29 Oct 2003 09:14:53 -0700)
Lines: 22
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.tpinternet.pl!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail