| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 964 人关注过本帖
标题:[求助]出现这问题是为什么(控件的使用)
只看楼主 加入收藏
kekenali
Rank: 1
等 级:新手上路
帖 子:9
专家分:0
注 册:2006-5-14
收藏
 问题点数:0 回复次数:3 
[求助]出现这问题是为什么(控件的使用)
error C2601: 'OnPreparePrinting' : local function definitions are illegal
error C2601: 'OnBeginPrinting' : local function definitions are illegal
error C2601: 'OnEndPrinting' : local function definitions are illegal
error C2601: 'AssertValid' : local function definitions are illegal
error C2601: 'Dump' : local function definitions are illegal
error C2601: 'GetDocument' : local function definitions are illegal


error C2601: 'OnAppend' : local function definitions are illegal //这是自己加入的菜单响应函数
搜索更多相关主题的帖子: function definitions local 控件 
2006-06-26 22:42
myajax95
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:30
帖 子:2978
专家分:0
注 册:2006-3-5
收藏
得分:0 
贴一个你的.h和.cpp中的messasge_map

http://myajax95./
2006-06-27 08:35
kekenali
Rank: 1
等 级:新手上路
帖 子:9
专家分:0
注 册:2006-5-14
收藏
得分:0 

不好意思,刚入门,什么意思??

class CSimpleView : public CView
{
protected: // create from serialization only
CSimpleView();
DECLARE_DYNCREATE(CSimpleView)

// Attributes
public:
CSimpleDoc* GetDocument();

// Operations
public:
int m_nCurrNam;
// Overrides
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
virtual void OnInitialUpdate();
protected:
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
//}}AFX_VIRTUAL

// Implementation
public:
virtual ~CSimpleView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
//{{AFX_MSG(CSimpleView)
afx_msg void OnAppend();
afx_msg void OnDelete();
afx_msg void OnEdit();
afx_msg void OnNext();
afx_msg void OnPrev();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};


这可以吗?

2006-06-27 19:51
myajax95
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:30
帖 子:2978
专家分:0
注 册:2006-3-5
收藏
得分:0 
看样子像你的view不是用VC的wizard一步一步生成的。重新建SDI project是比较好的方法。记住第一步的时候选中document/view architecture。

http://myajax95./
2006-06-28 01:57
快速回复:[求助]出现这问题是为什么(控件的使用)
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.014667 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved