Article View: borland.public.cppbuilder.nativeapi
Article #6678Re: Activating the first instance of a program when it's started multiple times
From: Remy Lebeau (TeamB)
Date: Fri, 22 Apr 2005 17:10
Date: Fri, 22 Apr 2005 17:10
18 lines
1951 bytes
1951 bytes
"SubZero" <g_ates@hotmail.com> wrote in message news:4268c454@newsgroups.borland.com... > But the title of the main window changes during run-time. The class name should not change, though. FindWindow() can look for class names as well as window titles. Just make sure to give your form class a unique name. Alternative, you can register a custom message via RegisterWindowMessage() and then broadcast it to all windows. Only your application will know how to respond to the message, and can then activate itself rather than having the requesting instance do the activating (which in itself actually has known problems, so it is better for the first instance to activate itself anyway). Gambit
Technical Details
Message-ID:
<42692f91$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!newshub.sdsu.edu!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!feed5.newsreader.com!newsreader.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!news-in.nuthinbutnews.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<42688891@newsgroups.borland.com> <1mg2vb4nfnxtd.1d6dylzi167fk.dlg@40tude.net> <4268b171@newsgroups.borland.com> <4268bba1@newsgroups.borland.com> <4268c454@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,3c4287e4044a862e X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <42688891@newsgroups.borland.com> <1mg2vb4nfnxtd.1d6dylzi167fk.dlg@40tude.net> <4268b171@newsgroups.borland.com> <4268bba1@newsgroups.borland.com> <4268c454@newsgroups.borland.com> Subject: Re: Activating the first instance of a program when it's started multiple times Date: Fri, 22 Apr 2005 10:10:49 -0700 Lines: 20 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 68.69.17.41 Message-ID: <42692f91$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1114189713 68.69.17.41 (22 Apr 2005 10:08:33 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!newshub.sdsu.edu!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!feed5.newsreader.com!newsreader.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!news-in.nuthinbutnews.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail