在VC的MFC的对话框中建立ClassWizard时,提示Parsing error: Expected "=".Input Line:……
2010-12-21 09:45
525 查看
今天早上编辑程序时,出现了一个小小的问题,觉得自己还没有发过文章,所以在这就写了一小点,在网上也有相关的。当我在VC 的MFC的对话框中建立ClassWizard时,提示Parsing error: Expected "=".Input Line:"m_brush.CreateSolidBrush(RGB(0,0,255));"的对话框,
如图:
当按确定时在MFC ClassWizard的对话框出现如图:,
按OK关掉,当再次双击按钮时出现如图:
的错误提示对话框。我在对话框类的构造函数里是这样写的:
//{{AFX_DATA_INIT(CSetttingDlg)
m_nLineWidth = 0;
m_nLineStyle = -1;
m_clr=RGB(255,0,0);
m_brush.CreateSolidBrush(RGB(0,0,255));
m_font.CreatePointFont(200,"华文行楷");
//}}AFX_DATA_INIT
最后我写成这样就可以建立类向导:
//{{AFX_DATA_INIT(CSetttingDlg)
//}}AFX_DATA_INIT
m_nLineWidth = 0;
m_nLineStyle = -1;
m_clr=RGB(255,0,0);
m_brush.CreateSolidBrush(RGB(0,0,255));
m_font.CreatePointFont(200,"华文行楷");
但还是出现第2个图片,这就要关掉工程重新打开,要是还不行就要在文件夹里删掉.clw文件,再建立类向导加刚才删除的文件名进去就行啦!
这些主要是//{{AFX_DATA_INIT(CSetttingDlg)是一个注释宏,而重新添加的成员变量并不是与之相关联的变量所以不能放在里面,在里面是识别不了的,放在外面就可以了 。
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/hongzhanrun/archive/2010/09/02/5859129.aspx
如图:
当按确定时在MFC ClassWizard的对话框出现如图:,
按OK关掉,当再次双击按钮时出现如图:
的错误提示对话框。我在对话框类的构造函数里是这样写的:
//{{AFX_DATA_INIT(CSetttingDlg)
m_nLineWidth = 0;
m_nLineStyle = -1;
m_clr=RGB(255,0,0);
m_brush.CreateSolidBrush(RGB(0,0,255));
m_font.CreatePointFont(200,"华文行楷");
//}}AFX_DATA_INIT
最后我写成这样就可以建立类向导:
//{{AFX_DATA_INIT(CSetttingDlg)
//}}AFX_DATA_INIT
m_nLineWidth = 0;
m_nLineStyle = -1;
m_clr=RGB(255,0,0);
m_brush.CreateSolidBrush(RGB(0,0,255));
m_font.CreatePointFont(200,"华文行楷");
但还是出现第2个图片,这就要关掉工程重新打开,要是还不行就要在文件夹里删掉.clw文件,再建立类向导加刚才删除的文件名进去就行啦!
这些主要是//{{AFX_DATA_INIT(CSetttingDlg)是一个注释宏,而重新添加的成员变量并不是与之相关联的变量所以不能放在里面,在里面是识别不了的,放在外面就可以了 。
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/hongzhanrun/archive/2010/09/02/5859129.aspx
相关文章推荐
- 在VC的MFC的对话框中建立ClassWizard时,提示Parsing error: Expected "=".Input Line:……
- VC++ 当我在界面上使用classwizard时,会弹出 Parsing error对话框,提示:Parsing error:Expected ")" input lin
- VC建立类向导(class wizard)错误提示Parsing error: Expected =.Input Line:
- VC++ 6.0 建立类向导(class wizard)错误提示Parsing error: Expected =.Input Line:
- VC建立类向导(class wizard)错误提示Parsing error: Expected =.Input Line:
- vc++ classwizard "Parsing error:Number or identifier expected.Input line ....."错误解决
- Class Wizard 出错: A duplicate insert block exists (class wizard)错误提示Parsing error: Expected =.Input
- Parsing error: Expected "=".
- Error on line 24 of document : Open quote is expected for attribute "{1}" associated with an eleme
- ISE verilog 综合错误提示:ERROR:Xst:880 - "Johnson_source.v" line 45: Cannot mix blocking and non blocking
- parsing error:expected ")" 解决方法
- 转 Parsing error:Expected "=".
- Parsing Error:Expected"afx_msg"解决办法
- ASP.NET 页面错误: "asp.net XML Parsing Error: no element found Line Number 1, Column 1"
- Parse Fatal Error at line 4 column 43: 已经为元素 "web-app" 指定属性 "xmlns"。
- 用git 下载android x86出错(syntax error near unexpected token `newline',`<!DOCTYPE HTML PUBLIC "-//IETF//)
- reason=>"Expected one of #, input, filter, output at line 1, column 1 (byte 1) after "}
- VC缺省链接库的顺序不对导致链接错误error LNK2005: "void __cdecl operator delete(void *)"
- make module失败的原因cc1: error: unrecognized command line option "-m64"
- [解决问题][不能更新eclipse]错误提示:Error retrieving "feature.xml". [error in opening zip file]