Código C:
Ver original
#include <windows.h> #include <stdio.h> #include <shlwapi.h> #include <Mmsystem.h> int main() { SetConsoleTitle("Reproductor V1"); SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_GREEN|FOREGROUND_INTENSITY); char path[MAX_PATH]; int eleccion; switch(eleccion){ case 1: if(!PathFileExists(path)) return -1; char command[260]; lstrcatA(command,"play "); lstrcatA(command,path); mciSendStringA(command,0,0,0); break; case 2: break; default: return -1; } }
Ahi tienen el codigo. Gracias!