News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Why a Dos window appeares when i run my win32 Gui program?

Started by facat, February 10, 2010, 03:33:43 PM

Previous topic - Next topic

facat

i write a win32 GUI program in C::B, build and run it. However, a Dos window appears with my GUI window. when i close that Dos window, my GUI window also closes.
i complie my program in VC6 and i do not see a Dos window.
Could anybody tell me why?

oBFusCATed

Have you setup your C::B project as GUI (Project -> properties -> second tab)?

(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

MortenMacFly

Quote from: facat on February 10, 2010, 03:33:43 PM
Could anybody tell me why?
Unless you setup the project type to "GUI" the console will be shown to allow you to see debug messages you UI app prints into the console. This is useful for debugging, but only for that. A "GUI" based application does not show the console (hence there might be messages piped into the "virtual" console but you won't see them).
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

facat

Originally i set the project to console. now how could i change it to GUI?

oBFusCATed

Project -> properties -> second tab -> there you should see "Console", change it to GUI
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

facat

Quote from: oBFusCATed on February 11, 2010, 09:38:43 AM
Project -> properties -> second tab -> there you should see "Console", change it to GUI
i changed it to GUI, but the Dos windows still appears.

MortenMacFly

Quote from: facat on February 11, 2010, 12:47:32 PM
i changed it to GUI, but the Dos windows still appears.
in that case either really part of your code (which you might want to post for inspection) or you are not using the "play" symbol for running the project or run a a different (wrong) target or... hard to tell with such less information. It's best if you strip your project to a minimal example and post it here, including project file and code file(s).
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

facat

ok. i solved the problem. i just changed it to GUI for both Debug and Release  .