问问题

qiyanchao qiyanchao 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
vc中怎样使用API函数
直接用不行啊
比如这样,就会说你没有声明
void CWwwwDlg::OnButton1()
{
// TODO: Add your control notification handler code here
::mciExecute("open c:\aa.wma alias wma");
::mciExecute("play wma");

}

我在MSDN中查到这个函数要求的头文件如下
Windows 95/98/Me: Included in Windows 95 and later.
Header: Declared in Mmsystem.h; include Windows.h.
Library: Use Winmm.lib.
我加进去了,还是不行啊
我在StdAfx.h中加入
#include <Windows.h>
#include <Mmsystem.h>
又把Winmm.lib考到VC文件的根目录下和DEBUG目录下
然后在link选项中加入Debug\Winmm.lib
还是不行

...全文

相关推荐

评论 3
收藏 已收藏
分享
返回顶部
qiyanchao
VC/MFC 16,550 成员 421,606 内容