Programación General > C++ Builder
Problema con PlaySound
(1/1)
ruben14:
Al poner
--- Citar --- PlaySound(ExtractFilePath(Application->ExeName)+"\Sound\tap.mp3"),NULL,SND_RESOURCE || SND_ASYNC)
--- Fin de la cita ---
me da el siguiente error:
Cannot Convert 'AnsiString' to 'Const char *'
Alguna Idea
Gracias
softevolutions:
PlaySound( (ExtractFilePath(Application->ExeName)+"\Sound\tap.mp3").c_str() ),NULL,SND_RESOURCE || SND_ASYNC)
ruben14:
Gracias por contestar...
Me sigue dando error ahora este:
Too Few parameter in call to '__stdcall PlaySound(const char*,void*,unsigned long)'
Gracias otra vez
softevolutions:
Al responderte no me di cuenta de que te sobraba un paréntesis de cierre:
PlaySound( (ExtractFilePath(Application->ExeName)+"\Sound\tap.mp3").c_str() ),NULL,SND_RESOURCE || SND_ASYNC)
Sería así:
PlaySound( (ExtractFilePath(Application->ExeName)+"\Sound\tap.mp3").c_str(), NULL, SND_RESOURCE || SND_ASYNC)
ruben14:
Perfecto...
Muchas Gracias
Navegación
Ir a la versión completa