C++ Builder répertoire problème !!

C++ Builder répertoire problème !! - C++ - Programmation

Marsh Posté le 13-05-2012 à 21:23:25    

Bonjour à tous ,
j'ai une question concernant c++ builder, i made a program which plays mp3 and wav files but in FileName propriety i have to type the full path is there any function or a modification which allows me to play songs from the Exe (project) Directory the same as Delphi which uses ('\\YourSong.mp3');  
thanks.  

Reply

Marsh Posté le 13-05-2012 à 21:23:25   

Reply

Marsh Posté le 14-05-2012 à 14:37:03    


U mean you have kind of an openfiledialog and you want it to open at your exe location?
You just have to initialize your dialog with your exe path!


---------------
Seul Google le sait...
Reply

Marsh Posté le 14-05-2012 à 21:12:21    

no its not like that okay let me explain better:
http://i49.tinypic.com/34r8xh0.jpg
 
u see those buttons i made, i wanna make them play sounds when user clicks them, so i created a MediaPlayer(visible=false) and the problem Was in MediaPlayer->FileName  it doesn't support \\Sounds\Music.mp3 (Sounds Folder contains music and sounds) which is included with the project.exe Because when i finish this program I'll use Install-shield to Copy Folders (music ..) with The Exe program to C:\Programs\MyProgram......(for Example) and create a shortcut in desktop.
So is there are any way to do that !
thanks.    

Reply

Marsh Posté le 14-05-2012 à 22:05:21    

something like
MediaPlayer->FileName ="Sound\\music.mp3";
or
MediaPlayer->FileName =".\\sound\\music.mp3";
but that suppose the current working directory si the exe directory...


---------------
Seul Google le sait...
Reply

Marsh Posté le 14-05-2012 à 22:46:23    

tried it but it doesn't work Error bla bla bla...

Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed