I have recently started a tutorial to learn how to code GUI using Windows API and I have come upon an unexpected question which I think is kind of silly. I am using Code::Blocks with OpenWatcom compiler as default and I have created a simple GUI program compiling and linking well. The problem is when I try to launch the program, even from the release version something like the command line shows up behind the window of my program, like I tried to run it through the compile & run option of the Code::Blocks. Is there any way to remove the command line from showing up?
EDIT: It is not a problem with my main definition. This is my main definition: |
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow)
In Windows, the PE executable format has a flag that indicates whether the executable mode is “console mode” or “GUI mode”. If “console mode”, then the OS will attach a console window (opening a new one if necessary) whenever the program is run.
There will be a linker setting somewhere in your build environment that controls whether the EXE you generate is marked as console or GUI.