帮忙!!急!!
//1view.h=======================================//1View.h:interfaceoftheCMy1Viewclass...
//1view.h
=======================================
// 1View.h : interface of the CMy1View class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_1VIEW_H__906C299A_B069_4930_BB13_F6532075841F__INCLUDED_)
#define AFX_1VIEW_H__906C299A_B069_4930_BB13_F6532075841F__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CMy1View : public CView
{
protected: // create from serialization only
CMy1View();
DECLARE_DYNCREATE(CMy1View)
// Attributes
public:
CMy1Doc* GetDocument();
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMy1View)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
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 ~CMy1View();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CMy1View)
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
private:
void DrawScene() ;
HGLRC m_hRC;
};
#ifndef _DEBUG // debug version in 1View.cpp
inline CMy1Doc* CMy1View::GetDocument()
{ return (CMy1Doc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_1VIEW_H__906C299A_B069_4930_BB13_F6532075841F__INCLUDED_)
OPENGL做图入门,用mfc画茶壶的
出错如下:
--------------------Configuration: 1 - Win32 Debug--------------------
Compiling...
1View.cpp
C:\Users\flyran\完成作业\计算机图形学 一\shiyan\1\1View.cpp(126) : error C2509: 'OnCreate' : member function not declared in 'CMy1View'
c:\users\flyran\完成作业\计算机图形学 一\shiyan\1\1view.h(13) : see declaration of 'CMy1View'
C:\Users\flyran\完成作业\计算机图形学 一\shiyan\1\1View.cpp(164) : error C2509: 'OnDestroy' : member function not declared in 'CMy1View'
c:\users\flyran\完成作业\计算机图形学 一\shiyan\1\1view.h(13) : see declaration of 'CMy1View'
C:\Users\flyran\完成作业\计算机图形学 一\shiyan\1\1View.cpp(179) : error C2509: 'OnSize' : member function not declared in 'CMy1View'
c:\users\flyran\完成作业\计算机图形学 一\shiyan\1\1view.h(13) : see declaration of 'CMy1View'
执行 cl.exe 时出错.
1View.obj - 1 error(s), 0 warning(s)
怎么改正!不胜感激 展开
=======================================
// 1View.h : interface of the CMy1View class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_1VIEW_H__906C299A_B069_4930_BB13_F6532075841F__INCLUDED_)
#define AFX_1VIEW_H__906C299A_B069_4930_BB13_F6532075841F__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CMy1View : public CView
{
protected: // create from serialization only
CMy1View();
DECLARE_DYNCREATE(CMy1View)
// Attributes
public:
CMy1Doc* GetDocument();
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMy1View)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
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 ~CMy1View();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CMy1View)
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
private:
void DrawScene() ;
HGLRC m_hRC;
};
#ifndef _DEBUG // debug version in 1View.cpp
inline CMy1Doc* CMy1View::GetDocument()
{ return (CMy1Doc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_1VIEW_H__906C299A_B069_4930_BB13_F6532075841F__INCLUDED_)
OPENGL做图入门,用mfc画茶壶的
出错如下:
--------------------Configuration: 1 - Win32 Debug--------------------
Compiling...
1View.cpp
C:\Users\flyran\完成作业\计算机图形学 一\shiyan\1\1View.cpp(126) : error C2509: 'OnCreate' : member function not declared in 'CMy1View'
c:\users\flyran\完成作业\计算机图形学 一\shiyan\1\1view.h(13) : see declaration of 'CMy1View'
C:\Users\flyran\完成作业\计算机图形学 一\shiyan\1\1View.cpp(164) : error C2509: 'OnDestroy' : member function not declared in 'CMy1View'
c:\users\flyran\完成作业\计算机图形学 一\shiyan\1\1view.h(13) : see declaration of 'CMy1View'
C:\Users\flyran\完成作业\计算机图形学 一\shiyan\1\1View.cpp(179) : error C2509: 'OnSize' : member function not declared in 'CMy1View'
c:\users\flyran\完成作业\计算机图形学 一\shiyan\1\1view.h(13) : see declaration of 'CMy1View'
执行 cl.exe 时出错.
1View.obj - 1 error(s), 0 warning(s)
怎么改正!不胜感激 展开
5个回答
展开全部
OnCreate
OnDestroy
OnSize
这3个函数需要声明
OnDestroy
OnSize
这3个函数需要声明
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
你再这个类的头文件中加入没有找到的那几个函数的头文件
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
消息响应函数,最好用类向导添加.手动添加的话还要修改几处
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
你是不是把那个图标拖到桌面上进行使用??
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询