Цитата(Djaconda @ 8.6.2008, 18:48 ) | | по секрету сказали что 3,1 ничего не может а Borland C++ 5,2 может вопрос остаеться как. |
Можно все и везде 
PlaySound Example
PlaySound("SoundName", hInst, SND_RESOURCE | SND_ASYNC);
sndPlaySound Example
The SND_MEMORY flag indicates that the lpszSoundName parameter is a pointer to an in-memory image of the WAVE file. To include a WAVE file as a resource in an application, add the following entry to the application's resource script (.RC) file.
soundName WAVE c:\sounds\bells.wav
| Код | BOOL PlayResource(LPSTR lpName) { BOOL bRtn; LPSTR lpRes; HANDLE hResInfo, hRes; // Find the WAVE resource. hResInfo = FindResource(hInst, lpName, "WAVE"); if (hResInfo == NULL) return FALSE; // Load the WAVE resource. hRes = LoadResource(hInst, hResInfo); if (hRes == NULL) return FALSE; // Lock the WAVE resource and play it. lpRes = LockResource(hRes); if (lpRes != NULL) {
bRtn = sndPlaySound(lpRes, SND_MEMORY | SND_SYNC | SND_NODEFAULT); UnlockResource(hRes); } else bRtn = 0; // Free the WAVE resource and return success or failure. FreeResource(hRes); return bRtn;
|
and further:
| Код | PlayResource("soundName");
|
Вообщем все описано в WinSDK! + есть бесплатные библиотеки (OpenAl, FMOD) |