Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » How to hide the console windows ?

This thread is locked; no one can reply to it. rss feed Print
How to hide the console windows ?
Chaos Maker
Member #12,260
September 2010

its possible ?
i had tried ShowWindow(GetConsoleWindow(),SW_HIDE);
but dont work D:

LennyLen
Member #5,313
December 2004
avatar

Try using the forum's search feature. This question has been answered many, many times.

Matthew Leverton
Supreme Loser
January 1999
avatar

Chaos Maker
Member #12,260
September 2010

im using allegro5 and Microsoft Visual C++ 2010

Matthew Leverton
Supreme Loser
January 1999
avatar

Use /SUBSYSTEM:WINDOWS, not /SUBSYSTEM:CONSOLE.

North~
Member #12,192
August 2010

In Code::Blocks and Dev-C++ you can just set the application to a GUI App. and the console window will not appear. If you were just trying to make a console that does something that you want to stay hidden, you could do something like this.

#SelectExpand
1HWND hidden_window; 2AllocConsole(); 3hidden_window=FindWindowA("ConsoleWindowClass",NULL); 4ShowWindow(hidden_window,NULL);

EDIT:: Visual C++. ew.

--------------------------------------------------
http://blog.wolfire.com/2009/04/always-initialize-your-memory/

If this is possible if you don't correctly initialize memory, it should be a priority of the highest order.

23yrold3yrold
Member #1,134
March 2001
avatar

There's also a check box for it somewhere in VC++'s preferences IINM.

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

Oscar Giner
Member #2,207
April 2002
avatar

In Project properties:
Configuration properties -> Linker -> System
Change Subsystem to Windows.

Names may not be 100% exact since I have MSVC in Spanish and I'm translating to English myself.

Mark Oates
Member #1,146
March 2001
avatar

Configuration properties -> Linker -> System

That's correct. More thoroughly:

Project -> [project name] Properties -> Configuration properties -> Linker -> System -> SubSystem

--
Visit CLUBCATT.com for cat shirts, cat mugs, puzzles, art and more <-- coupon code ALLEGRO4LIFE at checkout and get $3 off any order of 3 or more items!

AllegroFlareAllegroFlare DocsAllegroFlare GitHub

Chaos Maker
Member #12,260
September 2010

THANK YOU VERY MUCH!
:D
the solution
Windows (/SUBSYSTEM:WINDOWS)

Go to: