问题是这样的:
最近看了Charlse Pezold的《Windows程序设计》第三章,看到作者的例子可以朗读,觉得很是好晚,于是就在自己读《深入浅出 MFC》时用的例子,在CMainFrame
类的OnCreate函数中加如了:
::PlaySound("Scribble.wav", NULL, SND_FILENAME | SND_ASYNC);
然后我想设定连接选项,但是当我打开Project->Setting对话框后,并没有发现Link选项卡。不知如何是好!
直接进行连接,又出现如下4个错误:
E:\VC\Scribble\MainFrm.cpp(53) : error C2039: 'PlaySound' : is not a member of '`global namespace''
E:\VC\Scribble\MainFrm.cpp(53) : error C2065: 'PlaySound' : undeclared identifier
E:\VC\Scribble\MainFrm.cpp(53) : error C2065: 'SND_FILENAME' : undeclared identifier
E:\VC\Scribble\MainFrm.cpp(53) : error C2065: 'SND_ASYNC' : undeclared identifier名字空间对我来说是个新东西,请各位指教,我该怎么做,谢谢!另外,.wav音频文件是如何得到的?
自己如何制作一个这样的音频文件?
需要什么硬件或软件上的工具吗?
谢谢!!!!!!!!!
最近看了Charlse Pezold的《Windows程序设计》第三章,看到作者的例子可以朗读,觉得很是好晚,于是就在自己读《深入浅出 MFC》时用的例子,在CMainFrame
类的OnCreate函数中加如了:
::PlaySound("Scribble.wav", NULL, SND_FILENAME | SND_ASYNC);
然后我想设定连接选项,但是当我打开Project->Setting对话框后,并没有发现Link选项卡。不知如何是好!
直接进行连接,又出现如下4个错误:
E:\VC\Scribble\MainFrm.cpp(53) : error C2039: 'PlaySound' : is not a member of '`global namespace''
E:\VC\Scribble\MainFrm.cpp(53) : error C2065: 'PlaySound' : undeclared identifier
E:\VC\Scribble\MainFrm.cpp(53) : error C2065: 'SND_FILENAME' : undeclared identifier
E:\VC\Scribble\MainFrm.cpp(53) : error C2065: 'SND_ASYNC' : undeclared identifier名字空间对我来说是个新东西,请各位指教,我该怎么做,谢谢!另外,.wav音频文件是如何得到的?
自己如何制作一个这样的音频文件?
需要什么硬件或软件上的工具吗?
谢谢!!!!!!!!!
#include <mmsystem.h>在settting->link->object/library moudle 里真入winmm.lib
#include <mciavi.h>
#include <digitalv.h>
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#include <MMSystem.h>
#pragma comment(lib, "winmm.lib")
#include <vfw.h>
#pragma comment(lib,"vfw32.lib")
#include <mmsystem.h>
#pragma comment(lib,"Winmm.lib")
谢谢!
The comment pragma allows the user to insert comments into an object file or executable file. The lib specifier allows the user to pass this comment to the linker to specify additional libraries to link when using the object module.
并不是所有的API都要调用库和包含头文件的
象涉及到音频,视频,socket之类的一般都要调用
而窗口类,画图类的就不必要包含了