Article View: borland.public.cppbuilder.nativeapi
Article #12270Re: redirecting stdout to a windows control
From: Ed Mulroy [TeamB]
Date: Sat, 13 Dec 2003 18:45
Date: Sat, 13 Dec 2003 18:45
30 lines
2188 bytes
2188 bytes
You cannot redirect stdout to an edit control. You can only redirect to something which has a Windows file handle and controls do not have that. If what you are looking to redirect is a program which you start from within another program which itself has the control then you could try creating an anonymous pipe and when you start the other program arrange for it stdout for the program you started. You should then be able to read from the pipe and place what you read into the edit control. If a buffer size of one is used then you should be able to read a char at a time instead of waiting for the buffer to fill. For how to create an anonymous pipe look up CreatePipe in the help. I have not done this in years and have no code samples to offer, sorry. . Ed > mike wrote in message > news:3fdb560f$1@newsgroups.borland.com... > > i also wanted to know how to redirect stdout to an edit > control. the only way i could think of was to redirect stdout > to a file then display the file in the edit control. however this > is not real time and i need it to be. > > i am not using borland c++ builder, but rather the win32 api > to do things. i am compiling it with the free command line > compiler. > > any examples appreciated.
Technical Details
Message-ID:
<3fdb5e5a$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3fdb560f$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,543b6d19d57ccf61 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-12-13 10:52:57 PST From: "Ed Mulroy [TeamB]" <dont_email_me@bitbuc.ket> Newsgroups: borland.public.cppbuilder.nativeapi References: <3fdb560f$1@newsgroups.borland.com> Subject: Re: redirecting stdout to a windows control Date: Sat, 13 Dec 2003 13:45:42 -0500 Lines: 32 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 24.74.175.102 Message-ID: <3fdb5e5a$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1071341146 24.74.175.102 (13 Dec 2003 10:45:46 -0700) X-Authenticated-User: edmulroy Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail