🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Long question I'm afraid

#16889
From: Chris
Date: Sat, 19 Apr 2003 08:56
39 lines
2623 bytes
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.

Currently I use a TTimer set to 300ms.  When a filename is received  I
disable the Timer and re-enable it when the app has finished
counting/storing the file name for later use.

Most of the time 300ms is long enough but sometimes it isn't, for example I
select 200 files, right click and select the menu option, and most of the
time the app displays the correct message, sometimes (when Windows is busy
doing what ever it does) I might get only 100 files before the Timer fires.

I do not want to extend the timer interval if at all possible and instead
wondered:

(At last the actual question)
Is there a system message that I can check to find whether Windows is
reacting to the right click menu?

Thanks

Chris

PS I hope this is the correct group.
Technical Details
Message-ID: <3ea10f39$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!216.166.71.118.MISMATCH!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,68473f792caa66,start
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-04-19 02:29:56 PST
From: "Chris" <chris@chrischfmouseyREMOVE.karoo.co.uk>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Long question I'm afraid
Date: Sat, 19 Apr 2003 09:56:29 +0100
Lines: 41
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 212.50.172.231
Message-ID: <3ea10f39$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1050742585 212.50.172.231 (19 Apr 2003 01:56:25 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!216.166.71.118.MISMATCH!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail