Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1528 connectés 

  FORUM HardWare.fr
  Programmation
  C++

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

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

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

n°2142218
Esselami
Posté le 13-05-2012 à 21:23:25  profilanswer
 

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.  

mood
Publicité
Posté le 13-05-2012 à 21:23:25  profilanswer
 

n°2142320
breizhbugs
Posté le 14-05-2012 à 14:37:03  profilanswer
 


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...
n°2142385
Esselami
Posté le 14-05-2012 à 21:12:21  profilanswer
 

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.    

n°2142388
breizhbugs
Posté le 14-05-2012 à 22:05:21  profilanswer
 

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...
n°2142391
Esselami
Posté le 14-05-2012 à 22:46:23  profilanswer
 

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


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  C++

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

 

Sujets relatifs
[C] retourner un tableau de string[VB] problème de timer
Probleme OpenGL[C] Remplir un tableau 2 dimensions avec un fichier
Problème d'insertion de donnée ODB dans un QTableView[resolu] Nettoyer du code html pour enlever certaines balise inutiles
Renvoyer l'adresse d'un tableau en C[C] random sur un enum
Plus de sujets relatifs à : C++ Builder répertoire problème !!


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR