Link to home
Start Free TrialLog in
Avatar of google_man
google_man

asked on

Display in commnad window

Hi experts,
          I am currently in a project of incorporating comman dline interface in to  adilaogue based program in vc++.I am able to parse the commands, But there is one problem. I can't show the output to the command line window.I used setwindowhandle, getwindowhandle almost all functions related to getting command window handle.But in vain. Please anyone suggest me a way to get the output get buffered to command line window.I heard using a pipe to route will help. Please provide me help on this (code snippet preferred), or any other way through which I can accomplish this.

GM    
Avatar of AlexFM
AlexFM

In existing dialog based application open Project - Settings, Link tab, and make change in Project Options edit box.
Intead of:
/subsystem:windows
type:
/subsystem:console /entry:"WinMainCRTStartup"

Now program is opened with console window, and any printf line is shown in it.
ASKER CERTIFIED SOLUTION
Avatar of Computer101
Computer101
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial