Console window in Windows
-
Hello, I have created a Win32 Windows application that uses a WinMain() and WndProc(). Currently, my application runs within the application Window. I want to see the output of variables, but not inside my application window. Instead, I want to use the console window. Basically, I want to run my application and then if the programs debug flag is on then I want to open up a console window and start printing variables. How do I do this, because if I choose a console application there is no WinMain? In addition, how do I call an .exe from within my Win32 windows program. Like the cmd.exe and then another custom.exe within that console window? I do not wish to use MFC at this time. Thanks.
-
Hello, I have created a Win32 Windows application that uses a WinMain() and WndProc(). Currently, my application runs within the application Window. I want to see the output of variables, but not inside my application window. Instead, I want to use the console window. Basically, I want to run my application and then if the programs debug flag is on then I want to open up a console window and start printing variables. How do I do this, because if I choose a console application there is no WinMain? In addition, how do I call an .exe from within my Win32 windows program. Like the cmd.exe and then another custom.exe within that console window? I do not wish to use MFC at this time. Thanks.
its better if u go for a console based application. why do u need WinMain- its better to use main(). but, if u need a win32 application, then u have to start a win32 application project. i u wish to see the current values of various variables, add a listbox and print then all... but, i suggest to use the DEBUGGING procedures inside the IDE... use Ctrl-F10 for running to cursor, etc... u can set WATCHES, etc.... for calling an EXE from inside ur win32 application, use the WinExec or ShellExecute API... or u can go for the CreateProcess API... my suggestion is to use the ShellExecute API.. its very simple and powerfull... one more thing, its better not to use MFC , if ur more into SYstem Side Programming.....
-
its better if u go for a console based application. why do u need WinMain- its better to use main(). but, if u need a win32 application, then u have to start a win32 application project. i u wish to see the current values of various variables, add a listbox and print then all... but, i suggest to use the DEBUGGING procedures inside the IDE... use Ctrl-F10 for running to cursor, etc... u can set WATCHES, etc.... for calling an EXE from inside ur win32 application, use the WinExec or ShellExecute API... or u can go for the CreateProcess API... my suggestion is to use the ShellExecute API.. its very simple and powerfull... one more thing, its better not to use MFC , if ur more into SYstem Side Programming.....
Thanks for the response. I will look at ShellExecute. I need to create a win32 window for my graphics application. Can I still create a window with a console application. Currently I am using winmain, but I want to simultaneously launch a console. How do I do this? Can I use a console based application with a main and then create a win32 window? Thanks
-
Thanks for the response. I will look at ShellExecute. I need to create a win32 window for my graphics application. Can I still create a window with a console application. Currently I am using winmain, but I want to simultaneously launch a console. How do I do this? Can I use a console based application with a main and then create a win32 window? Thanks
-
Thanks for the response. I will look at ShellExecute. I need to create a win32 window for my graphics application. Can I still create a window with a console application. Currently I am using winmain, but I want to simultaneously launch a console. How do I do this? Can I use a console based application with a main and then create a win32 window? Thanks
nope, u cannot use the console based application project and then create a win32 application... i guess u can, but u will have to change the compiler setting and other linker options.... some other person gave u a reply on using allocconsole() api, go for that, search it in MSDN... or google it....
-
Hello, I have created a Win32 Windows application that uses a WinMain() and WndProc(). Currently, my application runs within the application Window. I want to see the output of variables, but not inside my application window. Instead, I want to use the console window. Basically, I want to run my application and then if the programs debug flag is on then I want to open up a console window and start printing variables. How do I do this, because if I choose a console application there is no WinMain? In addition, how do I call an .exe from within my Win32 windows program. Like the cmd.exe and then another custom.exe within that console window? I do not wish to use MFC at this time. Thanks.
i think the TRACE(...) may be what you want; used like printf, and output to the IDE's output-window only when debugging; hope this helps ;)
-
Hello, I have created a Win32 Windows application that uses a WinMain() and WndProc(). Currently, my application runs within the application Window. I want to see the output of variables, but not inside my application window. Instead, I want to use the console window. Basically, I want to run my application and then if the programs debug flag is on then I want to open up a console window and start printing variables. How do I do this, because if I choose a console application there is no WinMain? In addition, how do I call an .exe from within my Win32 windows program. Like the cmd.exe and then another custom.exe within that console window? I do not wish to use MFC at this time. Thanks.
check out debugview from sysinternals.com Sonork 100.41263:Anthony_Yio Life is about experiencing ...