🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.multimedia
Article #1225

Wierd Program (or Brain) Bug...

#1225
From: Nicholas Gessler
Date: Wed, 01 Aug 2001 05:35
47 lines
2851 bytes
This one has me stumped:
I wrote a stupid little program.  There is one form, two edit boxes, and a
MouseOver event handler.  In the handler is the code:

void __fastcall TForm1::FormMouseMove(TObject *Sender, TShiftState Shift,
      int X, int Y)
{
        EditX->Text = "       " + X;
        EditY->Text = "       " + Y;
        // Jungle Sounds
        if (X == 10) PlaySound("c:\\windows\\media\\jungle asterisk.wav",
"", SND_ASYNC);
        if (X == 20) PlaySound("c:\\windows\\media\\jungle close.wav", "",
SND_ASYNC);
        if (X == 30) PlaySound("c:\\windows\\media\\jungle critical
stop.wav", "", SND_ASYNC);
        // and so on
        // Musica Sounds
        if (Y == 10) PlaySound("c:\\windows\\media\\musica asterisk.wav",
"", SND_ASYNC);
        if (Y == 20) PlaySound("c:\\windows\\media\\musica close.wav", "",
SND_ASYNC);
        if (Y == 30) PlaySound("c:\\windows\\media\\musica critical
stop.wav", "", SND_ASYNC);
        if (Y == 40) PlaySound("c:\\windows\\media\\musica default.wav", "",
SND_ASYNC);
        // and so with Utopia and Robotz on up to 370 for all 68 Media
sounds
        // and the window is at least 400 by 400 in size.
}

So, OK, this is supposed to operate like a harp with strings in the
horizontal and vertical directions that are each attached to a sound and are
plucked when the cursor passes over them.  And the sounds work OK.

What is puzzling is what appears in the EditX and EditY boxes.  I was hoping
that the X and Y coordinates would appear.  NOPE!
As you move the cursor in the X direction, what scrolls through the Edit Box
are the names of the paths to the first 9 jungle sounds.
As you move the cursor in the Y direction, what scrolls through the Edit Box
are the names of the paths to the first 11 jungle sounds.
And I do mean "scroll" as in an LED message board.

Can anyone tell me what is going on here?  I am mystified.

Thanks,
Nick
Technical Details
Message-ID: <3b6794e8$1_2@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!news.tele.dk!194.25.134.62!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10d0fc,4c584af82a6d7286,start
X-Google-Attributes: gid10d0fc,public
X-Google-ArrivalTime: 2001-07-31 22:39:28 PST
Reply-To: "Nicholas Gessler" <gessler@ucla.edu>
From: "Nicholas Gessler" <gessler@ucla.edu>
Newsgroups: borland.public.cppbuilder.multimedia
Subject: Wierd Program (or Brain) Bug...
Date: Tue, 31 Jul 2001 22:35:58 -0700
Lines: 49
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: <3b6794e8$1_2@dnews>
X-Trace: dnews 996644072 4.40.56.105 (31 Jul 2001 22:34:32 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!news.tele.dk!194.25.134.62!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews