警告如下: G:\?ú·?\wzq\wzqDlg.cpp(718) : error C2039: 'PlaySound' : is not a member of '`global namespace'' G:\?ú·?\wzq\wzqDlg.cpp(718) : error C2065: 'PlaySound' : undeclared identifier
Header: Declared in mmsystem.h. Import Library: Use winmm.lib. 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 );
Return Values Returns TRUE if successful or FALSE otherwise.Res 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.
G:\?ú·?\wzq\wzqDlg.cpp(718) : error C2039: 'PlaySound' : is not a member of '`global namespace''
G:\?ú·?\wzq\wzqDlg.cpp(718) : error C2065: 'PlaySound' : undeclared identifier
Header: Declared in mmsystem.h.
Import Library: Use winmm.lib.
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
);
Return Values
Returns TRUE if successful or FALSE otherwise.Res
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.
可是我在WIN32工程里就不用加,那里只是用加上WINMM.lib就可以了阿,不过那里有windows.h文件,我像可能是这的原因,可是在MFC里我加上windows.h就不行。
再来我就给你分了~~~