Article View: borland.public.cppbuilder.nativeapi
Article #10015Re: Run Once
From: JD
Date: Mon, 31 May 2004 00:14
Date: Mon, 31 May 2004 00:14
37 lines
2178 bytes
2178 bytes
Bob Gonder <notbg@notmindspring.invalid> wrote: > If you can post a message to the original instance, then > what's the problem? As I said in my original post, I can't determine the window state - be it from within the WinMain of the second instance or from within the WndProc of the first instance. I have to know if I need to restore the window or just bring it to front. > Have the original instance (which knows it's current display > attributes) As I said in my original post, be it in the WinMain of the second instance or from within the WndProc of the first instance, the WindowState evaluates to the last state before it was minimized. > restore itself (when it receives that message) As I said in my original post, no matter how I restored the window, the minimize button didn't work. > and display the passed filename. No need. As I stated in mt original post, I already know that it's the correct HWND. > Or you could also throw in a named pipe that the mutex owner > is reading, and the second instance then writes it's commandline > to the pipe before exiting. The original instance sees data > on the pipe and restores itself and processes the commandline. That's a good way to pass stuff to the first instance but for this application it's not needed. Just stopping multiple lauches and bring it to front is enough. ~ JD
Technical Details
Message-ID:
<40ba78cc$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!controlnews3.google.com!news1.google.com!news.glorb.com!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<40b9cff4$1@newsgroups.borland.com> <k5ikb0dppip15jep979bhuf7g148fsp3lj@4ax.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,55fa8aeaf57fcad1 X-Google-Attributes: gid10cc67,public From: "JD" <nospam@nospam.com> Sender: "JD" <nospam@nospam.com> Reply-To: "JD" <nospam@nospam.com> Subject: Re: Run Once Newsgroups: borland.public.cppbuilder.nativeapi X-User-Info: 172.169.97.211 References: <40b9cff4$1@newsgroups.borland.com> <k5ikb0dppip15jep979bhuf7g148fsp3lj@4ax.com> NNTP-Posting-Host: 207.105.83.66 Message-ID: <40ba78cc$1@newsgroups.borland.com> Date: 30 May 2004 17:14:04 -0700 X-Trace: newsgroups.borland.com 1085962444 207.105.83.66 (30 May 2004 17:14:04 -0700) Lines: 38 Path: arc1-ca.pugleaf.net!controlnews3.google.com!news1.google.com!news.glorb.com!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail