🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Long question I'm afraid

#16891
From: user
Date: Sat, 19 Apr 2003 14:11
28 lines
2444 bytes
Chris wrote:
> I have an app that registers itself with the shell allowing a user to right
> click a file and then select an option from the Windows pop-up menu.
> 
> All works fine until the user selects a lot of files, at which point this is
> the process the app follows:
> 
> 1 Windows starts a first instance of the app which receives the first file
> name as a command line arg.
> 2. Windows now starts a further instance of the app
> 3. This second instance uses a mutex to detect the first instance and if it
> finds one it sends a usermessage to the first instance and then closes.
> 4.  The first instance has a message loop that receives these usermessages
> and hence receives all further file names
> 
> All works fine but I want to present a message to the user asking whether
> they want to carry out an operation on all X files.  Clearly I cannot
> present this message until I know how many files there are.
> 

There are two ways to add a context menu handler to the Windows shell: 
The standard executable method and the COM shell extension -- 
IContextMenu -- method. The first way, which I assume you are using, is 
by far the easiest to implement, but it has limitations, and I think you 
may have reached them. I hate to suggest it, but because it allows for 
processing a list of files instead of passing them to your program one 
at a time, you may want to bite the bullet and look into writing a COM 
object.
Technical Details
Message-ID: <3EA158F8.7010707@domain.invalid>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail
References: <3ea10f39$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,68473f792caa66
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-04-19 07:21:31 PST
Message-ID: <3EA158F8.7010707@domain.invalid>
Date: Sat, 19 Apr 2003 10:11:04 -0400
From:  user@domain.invalid
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Long question I'm afraid
References: <3ea10f39$1@newsgroups.borland.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 151.201.18.183
X-Trace: newsgroups.borland.com 1050761485 151.201.18.183 (19 Apr 2003 07:11:25 -0700)
Lines: 29
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail