Hi,
I want to show some information of an application.
Anyone knows how to dump a console while the major MFC application is
running?
Thanks in advance
Jack

Re: How to create a console while running MFC by Alex

Alex
Thu Sep 21 05:51:25 CDT 2006

"Jacky Luk" wrote:
> I want to show some information of an application.
> Anyone knows how to dump a console while the major MFC
> application is running?


KB105305 - "INFO: Calling CRT Output Routines from a GUI
Application"
http://support.microsoft.com/kb/105305/en-us

HTH
Alex



Re: How to create a console while running MFC by adebaene

adebaene
Thu Sep 21 06:55:32 CDT 2006


Jacky Luk wrote:
> Hi,
> I want to show some information of an application.
> Anyone knows how to dump a console while the major MFC application is
> running?
> Thanks in advance
> Jack

AllocConsole

Arnaud
MVP - VC


Re: How to create a console while running MFC by Jacky

Jacky
Fri Sep 22 03:43:17 CDT 2006

Hi,
Could you please take me a little bit further?
cos _O_TEXT is not recognised and besides

c:\Documents and Settings\luckie\app1\app1\app1.cpp(97): error C2065:
'_open_osfhandle' : undeclared identifier

while I place the MS code into InitInstance() of my Application module
Thanks
Jack


"Jacky Luk" <jl@knight.com> ¼¶¼g©ó¶l¥ó·s»D:eXdkIiV3GHA.4588@TK2MSFTNGP04.phx.gbl...
> Hi,
> I want to show some information of an application.
> Anyone knows how to dump a console while the major MFC application is
> running?
> Thanks in advance
> Jack
>



Re: How to create a console while running MFC by Alex

Alex
Fri Sep 22 05:06:28 CDT 2006

"Jacky Luk" wrote:
> Could you please take me a little bit further?
> cos _O_TEXT is not recognised and besides
>
> c:\Documents and Settings\luckie\app1\app1\app1.cpp(97):
> error C2065: '_open_osfhandle' : undeclared identifier
>
> while I place the MS code into InitInstance() of my
> Application module


#include <io.h>



Re: How to create a console while running MFC by Alan

Alan
Fri Sep 22 13:07:50 CDT 2006

Trivial:

AllocConsole ();
freopen ("CON", "w", stdout);

Then just use printf or puts or whatever.

- Alan Carre

"Jacky Luk" <jl@knight.com> wrote in message
news:eXdkIiV3GHA.4588@TK2MSFTNGP04.phx.gbl...
> Hi,
> I want to show some information of an application.
> Anyone knows how to dump a console while the major MFC application is
> running?
> Thanks in advance
> Jack
>



Re: How to create a console while running MFC by Tim

Tim
Sat Sep 23 00:08:08 CDT 2006

"Jacky Luk" <jl@knight.com> wrote:

>Hi,
>Could you please take me a little bit further?
>cos _O_TEXT is not recognised and besides
>
>c:\Documents and Settings\luckie\app1\app1\app1.cpp(97): error C2065:
>'_open_osfhandle' : undeclared identifier
>
>while I place the MS code into InitInstance() of my Application module

You MUST learn, Jacky: As nice as we all are, Google is much, much faster
than this newsgroup.
--
- Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.