View Single Post
Old 10-09-2002, 10:55 PM   #5
InFix
Registered User
 
Join Date: May 2002
Location: Gorge of eternal peril
Posts: 134
Glad to help. If you want winamp to play a file, you have to do this:

Code:
WinExec("C:\\Program Files\\Winamp\\winampa.exe \"d:\\music\\file.mp3\"", SW_SHOWMINIMIZED);

Notice the \", thats the escape sequence for the ". So if you were to run winamp on the command line you would type:

winamp "myfile.mp3"

So to get that effect you do the \"myfile.mp3\" as the paramater

Also, I would recommend NOT hardcoding that in, so you could do this:

Code:
CString path; path.Format("%s \"%s\"", "C:\\Program Files\\Winamp\\winamp.exe ", someFunction()); WinExec(path, SW_SHOWMINIMIZED);

where someFunction() will return either a char* or CString with the file name that you want in it.

Anyway, let me know how that turns out, sounds very intresting! :P
__________________
'03 BMW M3 6 spd.
Black/Imola Red
19's

Shuttle XPC w/ AMD 1800+
Opus 150w
Lilliput 7"
Wireless internet through my P900 and bluetooth
InFix is offline   Reply With Quote