Article View: comp.os.ms-windows.programmer.tools.owl
Article #38Re: Creating a console window
From: Ari Lukumies
Date: Fri, 12 Apr 1996 09:59
Date: Fri, 12 Apr 1996 09:59
22 lines
1195 bytes
1195 bytes
Thaddeus L. Olczyk wrote:
>
> Does anyone know how I can open a console window in a Win95 GUI app?
> I want to dump some data for debugging purposes.
> Richter's Advanced Windows says that it is possible, but does not say how, and
> I have not been able to find a description anywhere else.
Check out the API AllocConsole. If you want to make use of stdout (for printf
etc), you can then use something like this:
HANDLE hStdout;
FILE *fp;
hStdout = GetStdHandle(STD_OUTPUT_HANDLE);
*fp = _fdopen(_open_osfhandle(hStdout, _O_TEXT), "w");
*stdout = *fp;
printf("Hello!\n");
Later,
AriL
--
All my opinions are mine and mine alone.
Technical Details
Message-ID:
<316E297E.463C@cmt.lpr.mail.carel.fi>Path:
arc1-ca.pugleaf.net!news.lpr.carel.fi!usenetReferences:
<316C4760.4C@interaccess.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!news.lpr.carel.fi!usenet From: Ari Lukumies <aril@cmt.lpr.mail.carel.fi> Newsgroups: comp.os.ms-windows.programmer.tools.owl,comp.lang.c++ Subject: Re: Creating a console window Date: Fri, 12 Apr 1996 12:59:26 +0300 Organization: Carelcomp Products Message-ID: <316E297E.463C@cmt.lpr.mail.carel.fi> References: <316C4760.4C@interaccess.com> NNTP-Posting-Host: renoir.cclahti.carel.fi Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 2.0 (WinNT; I)