🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Intercepting a CD Change Broadcast

#13931
From: dcent
Date: Tue, 09 Sep 2003 07:16
20 lines
1905 bytes
I have an application that I would like to intercept and handle the 
messages for inserting an Audio CD. If my application is running I don't 
want to have Windows to launch any other application (i.e. CD Player) 
that may be associated with a CDA file.

I already have a MESSAGE_MAP for the WM_DEVICECHANGE message that seems 
to work, but on my XP Home machine the 'What do you want do?' window 
still pops up. What do I need to do to stop the message going on the 
Windows?

1) Is a VCL_MESSAGE_HANDLER() in the MainForm the best place for this? 
If not, where?
2) Is WM_DEVICECHANGE the only message that I need to trap? What else?
3) How do I tell Windows that I have taken care of the message and that 
it does need to?

I am fairly new to Message Handling and am using BCB5ent SP1 on XP Home. 
Thanks in advance.

Jeff.
Technical Details
Message-ID: <3F5D7E54.1090006@NetScape.net>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,ffb1cc1cc23a2ae9,start
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-09-09 01:21:30 PST
Message-ID: <3F5D7E54.1090006@NetScape.net>
Date: Tue, 09 Sep 2003 02:16:36 -0500
From: dcent <DcentJ8@NetScape.net>
Reply-To:  DcentJ8@NetScape.net
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; 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: Intercepting a CD Change Broadcast
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 65.80.162.249
X-Trace: newsgroups.borland.com 1063091798 65.80.162.249 (9 Sep 2003 00:16:38 -0700)
Lines: 21
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail