MFC基于对话框怎样添加背景音乐,如使用Playsound具体如何用,添加的位置,请详细说明。很急感谢!
MFC基于对话框怎样添加背景音乐,如使用Playsound具体怎么用,添加的位置,请详细说明。很急,感谢!!!
还有音乐文件的类型是否有要求,还有音乐存放的位置,最好能详细的举个简单的例子。我用的VS05,感谢!
------解决方案--------------------
PlaySound
The PlaySound function plays a sound specified by the given filename, resource, or system event. (A system event may be associated with a sound in the registry or in the WIN.INI file.)
BOOL PlaySound(
LPCSTR pszSound,
HMODULE hmod,
DWORD fdwSound
);
The sound specified by pszSound must fit into available physical memory and be playable by an installed waveform-audio device driver. PlaySound searches the following directories for sound files: the current directory; the Windows directory; the Windows system directory; directories listed in the PATH environment variable; and the list of directories mapped in a network. For more information about the directory search order, see the documentation for the OpenFile function.
If it cannot find the specified sound, PlaySound uses the default system event sound entry instead. If the function can find neither the system default entry nor the default sound, it makes no sound and returns FALSE.
要学会使用MSDN
------解决方案--------------------
http://baike.baidu.com/view/1014003.htm
这个网址不光有详细解释,还有例子
------解决方案--------------------
整个线程 使用
BOOL PlaySound(
LPCSTR pszSound,
HMODULE hmod,
DWORD fdwSound
);
学会使用搜索引擎。
还有音乐文件的类型是否有要求,还有音乐存放的位置,最好能详细的举个简单的例子。我用的VS05,感谢!
------解决方案--------------------
PlaySound
The PlaySound function plays a sound specified by the given filename, resource, or system event. (A system event may be associated with a sound in the registry or in the WIN.INI file.)
BOOL PlaySound(
LPCSTR pszSound,
HMODULE hmod,
DWORD fdwSound
);
The sound specified by pszSound must fit into available physical memory and be playable by an installed waveform-audio device driver. PlaySound searches the following directories for sound files: the current directory; the Windows directory; the Windows system directory; directories listed in the PATH environment variable; and the list of directories mapped in a network. For more information about the directory search order, see the documentation for the OpenFile function.
If it cannot find the specified sound, PlaySound uses the default system event sound entry instead. If the function can find neither the system default entry nor the default sound, it makes no sound and returns FALSE.
要学会使用MSDN
------解决方案--------------------
http://baike.baidu.com/view/1014003.htm
这个网址不光有详细解释,还有例子
------解决方案--------------------
整个线程 使用
BOOL PlaySound(
LPCSTR pszSound,
HMODULE hmod,
DWORD fdwSound
);
学会使用搜索引擎。