πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Starting an app in the background

#8637
From: JF Jolin
Date: Thu, 30 Sep 2004 22:41
37 lines
2145 bytes
To make the visible window running in background, do
 sStartUpInfo.wShowWindow = SW_HIDE;

JF Jolin



"Peter Rees" <peter@NOOSPAMMrees.co.nz> a οΏ½crit dans le message de
news:4133938c@newsgroups.borland.com...
> Hi all,
>
> I am using the following code to start another process ( exe file ). I
want
> the application that I am starting ( child ) to go into the background and
> this application ( parent ) to remain in the foreground.
>
> Can someone advise what I need to do to accomplish this
>
> TIA
>
> Peter
>
>
> // --- snip ----
>
>       memset(&sStartUpInfo,0, sizeof(sStartUpInfo)) ;
>       sStartUpInfo.cb = sizeof(sStartUpInfo) ;
>       sStartUpInfo.dwFlags = STARTF_USESHOWWINDOW | STARTF_USESTDHANDLES ;
>       sStartUpInfo.hStdInput = GetStdHandle( STD_INPUT_HANDLE ) ;
>       sStartUpInfo.hStdOutput= GetStdHandle( STD_OUTPUT_HANDLE );
>       sStartUpInfo.hStdError = GetStdHandle( STD_ERROR_HANDLE );
>       sStartUpInfo.wShowWindow = SW_SHOWDEFAULT ;
>       nExitCode =CreateProcess(NULL, cParam, NULL, NULL, FALSE,
> CREATE_NEW_CONSOLE |
>         NORMAL_PRIORITY_CLASS,NULL,NULL, &sStartUpInfo, &sProcessInfo) ;
>
>
Technical Details
Message-ID: <415c8bd7$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <4133938c@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,227ce0fabfae12c2
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII
From: "JF Jolin" <jolin.jeanfrancois@b2b2c.ca>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <4133938c@newsgroups.borland.com>
Subject: Re: Starting an app in the background
Date: Thu, 30 Sep 2004 18:41:59 -0400
Lines: 38
MIME-Version: 1.0
Content-Type: text/plain;
 charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
NNTP-Posting-Host: 66.158.145.167
Message-ID: <415c8bd7$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1096584151 66.158.145.167 (30 Sep 2004 15:42:31 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail