Win32 executables must be either a command line application or a GUI application.
If your EXE is a command line application and it is executed from a command line then no extra window is created.
If your EXE is a command line application and it is executed from a GUI application then a new console window will be created for it.
If your EXE is a GUI application then it's up to you to create whatever window(s) you want.
Check how your application is being compiled and then make the right decision for your app. In Visual Studio follow these steps:
- In Solution Explorer right-click on the VC++ project node and choose Properties
- Navigate to: Configuration Properties / Linker / System
- Check the value of the "SubSystem" property
Two of the SubSystem options are Windows and Console, and these describe the two settings I mention earlier.
More information about this GUI vs. Command Line behavior is available on these links:
- How do I write a program that can be run either as a console or a GUI application?
- Program both as Console and GUI