Is there a way to show a Window and CMD in combination? I would like to use the cmd as a debugging info logger in my Window application.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There are two approaches.
You can continue to link your application as a windowed application, and use
AllocConsoleto create a console window in which you can output your debugging information. Note that this only opens kernel handles, so you would need to use_open_osfhandleand_fdopento connect stdout/stderr to your console.You can link your application as a console application, not forgetting that it now starts with
_tmaininstead of_tWinMain().