🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #10695

Re: Hiding a console app

#10695
From: Bob Gonder
Date: Thu, 25 Mar 2004 19:12
18 lines
1734 bytes
p Anders wrote:

>I'm not sure about this, but I've just been trying to do some of the same
>stuff.  I was able to use "FreeConsole()" to detach the process from the
>console.  The process seems to keep running but the console goes away.

If you have no need for the console (no screen writes, stdin/stdout )
then you could just substitute WinMain() for main(), and change your
compiler/linker options.  There's nothing that says that WinMain
*must* create a window.

If you _do_ need the console for i/o, then you would need the Handle
for the Console Window, then you could SW_HIDE it.
You can use
	SetConsoleTitle()
to give your console a unique name, then
	EnumWindows()
 to find the window with that name.
Technical Details
Message-ID: <s5b660h3pl7is79n09c9sbnr4vjfs75cq1@4ax.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <4062a188@newsgroups.borland.com> <4062dc4f@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,e0aab47c69c9995e
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2004-03-25 11:40:14 PST
From: Bob Gonder <notbg@notmindspring.invalid>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Hiding a console app
Date: Thu, 25 Mar 2004 11:12:52 -0800
Organization: MindSpring Enterprises, Inc.
Reply-To: notbg@notmindspring.invalid
Message-ID: <s5b660h3pl7is79n09c9sbnr4vjfs75cq1@4ax.com>
References: <4062a188@newsgroups.borland.com> <4062dc4f@newsgroups.borland.com>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 67.31.165.121
X-Trace: newsgroups.borland.com 1080241976 67.31.165.121 (25 Mar 2004 11:12:56 -0800)
Lines: 21
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail