Article View: borland.public.cppbuilder.multimedia
Article #1235Changing a PlaySound path name on the fly...
From: Nicholas Gessler
Date: Fri, 10 Aug 2001 05:16
Date: Fri, 10 Aug 2001 05:16
19 lines
1651 bytes
1651 bytes
Hi,
In the "Weird Program" application I had some questions about a while ago,
I've been trying to change the "media" directory path name on the fly to
accommodate both Win98 and WinNT, each having the "media" folder in a
different directory (windows, and winnt). I have been trying different
combinations of the AnsiString( ) function but none of the ones I've tried
seem to please the compiler. Can anyone give me a nudge in the right
direction? The code looks like:
if (X == 10) PlaySound("c:\\WINNT\\media\\jungle asterisk.wav", "",
SND_ASYNC);
if (X == 20) PlaySound("c:\\WINNT\\media\\jungle close.wav", "",
SND_ASYNC);
And I want to be able to switch the string "WINNT" with "windows."
Cheers,
Nick
Technical Details
Message-ID:
<3b736dcb$1_2@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!hub.org!hub.org!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnewsShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d0fc,c5d6b1e2caa77662,start X-Google-Attributes: gid10d0fc,public X-Google-ArrivalTime: 2001-08-09 22:16:58 PST Reply-To: "Nicholas Gessler" <gessler@ucla.edu> From: "Nicholas Gessler" <gessler@ucla.edu> Newsgroups: borland.public.cppbuilder.multimedia Subject: Changing a PlaySound path name on the fly... Date: Thu, 9 Aug 2001 22:16:32 -0700 Lines: 21 Organization: UCLA - Geography X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2615.200 X-MIMEOLE: Produced By Microsoft MimeOLE V5.00.2615.200 NNTP-Posting-Host: 4.40.56.105 Message-ID: <3b736dcb$1_2@dnews> X-Trace: dnews 997420491 4.40.56.105 (9 Aug 2001 22:14:51 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!hub.org!hub.org!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews