莫名其妙的bug啊,求解中

[复制链接]
查看11 | 回复6 | 2021-1-27 05:48:18 | 显示全部楼层 |阅读模式
我刚接触WM,想参考下SDK中的wmSample,结果在build的时候出现6个错,并且全是一个在一个头文件中,实在找不出来了,求解啊~~
#pragmaonce
#include"stdafx.h"
#include"wmp.h"
classCMainWindow
{
public:
//RequiredtoforwardmessagestotheWMPcontrol
BOOLTranslateAccelerator(MSG*pMsg);
public:
//handleoftheWIN32window.ItisusedtocontaintheWMPcontrol
HWNDm_hwndAppWindow
//thecontrol'sinterface
CComPtr[I]m_spWMPPlayer;
//connectionpoint
CComPtr[I]m_spConnectionPoint;
DWORDm_dwAdviseCookie;
//mainmenubarforapplication
CWindowm_menuBar;
//CAxWindowm_wmplayer;
CAxWindowm_wmplayer;
};

上面是源码,下面为错误信息:
1>f:\visualstudio2008\projects\uilayout\MainWindow.h(48):errorC2143:syntaxerror:missing';'before'f:\visualstudio2008\projects\uilayout\MainWindow.h(48):errorC2238:unexpectedtoken(s)preceding';'
1>f:\visualstudio2008\projects\uilayout\MainWindow.h(51):errorC2143:syntaxerror:missing';'before'f:\visualstudio2008\projects\uilayout\MainWindow.h(51):errorC2238:unexpectedtoken(s)preceding';'
1>f:\visualstudio2008\projects\uilayout\MainWindow.h(55):errorC2146:syntaxerror:missing';'beforeidentifier'm_menuBar'
1>f:\visualstudio2008\projects\uilayout\MainWindow.h(58):errorC2146:syntaxerror:missing';'beforeidentifier'm_wmplayer'
分 -->
回复

使用道具 举报

千问 | 2021-1-27 05:48:18 | 显示全部楼层
CComPtr不认吧
回复

使用道具 举报

千问 | 2021-1-27 05:48:18 | 显示全部楼层
我在include"atlbase.h"和"atlwin.h"之后,还是有一个错,
syntaxerror:missing';'beforeidentifier'm_wmplayer'
很是奇怪啊这个
回复

使用道具 举报

千问 | 2021-1-27 05:48:18 | 显示全部楼层
厄自己搞定了。。。结贴
回复

使用道具 举报

千问 | 2021-1-27 05:48:18 | 显示全部楼层
搞定了怎么不说原因?
这个哪叫bug啊,害我进来看了一下
回复

使用道具 举报

千问 | 2021-1-27 05:48:18 | 显示全部楼层
好像少了很多分号``!
回复

使用道具 举报

千问 | 2021-1-27 05:48:18 | 显示全部楼层
楼主赶快结贴吧。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行