🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Foreground another application

#2163
From: Bob Gonder
Date: Wed, 18 Apr 2007 13:56
15 lines
1361 bytes
Andreas Osswald wrote:

>I want to bring another app (ext_app) to foreground. I do it like this:
>
>ExtHandle = FindWindow("CalssName","Caption");
>PostMessage(ExtHandle,WM_SYSCOMMAND,SC_RESTORE,0);
>SetForegroundWindow(ExtHandle);

Try it this way:

                  if( IsIconic( h ) )
                  {       ShowWindow( h, SW_RESTORE );
                  }else{
                          SetForegroundWindow( h );
                  };
Technical Details
Message-ID: <sm8c235a13e21geu4lp54r7rorcgee163e@4ax.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <4625ec79$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,25ea57fd64e945c2
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Bob Gonder <notbg@notmindspring.invalid>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Foreground another application
Date: Wed, 18 Apr 2007 06:56:09 -0700
Organization: MindSpring Enterprises, Inc.
Reply-To: notbg@notmindspring.invalid
Message-ID: <sm8c235a13e21geu4lp54r7rorcgee163e@4ax.com>
References: <4625ec79$1@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: 69.69.80.210
X-Trace: newsgroups.borland.com 1176904566 69.69.80.210 (18 Apr 2007 06:56:06 -0800)
Lines: 17
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail