| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | Newsletters | VB Forums | Developer.com |
|
|||||||
| Visual C++ Programming Ask questions about Windows programming with Visual C++ and help others by answering their questions. |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
[RESOLVED] Output text into console window from GUI app
Say, if my GUI Win32 app is started from a Command Prompt, can I output text into that console window? FYI, at that point in time I haven't yet created a window, nor done any of the GUI app calls (RegisterClass, etc.)
I'm pretty much asking for a command like this: Code:
_tprintf(_T("Hello"));
|
|
#2
|
||||
|
||||
|
Re: Output text into console window from GUI app
You could try AttachConsole(ATTACH_PARENT_PROCESS).
Then you just have to hook up stdout, stdin, and stderr. http://support.microsoft.com/kb/105305 http://www.halcyon.com/~ast/dload/guicon.htm gg |
|
#3
|
|||
|
|||
|
Re: Output text into console window from GUI app
Thanks!
|
![]() |
| Bookmarks |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|