求助静态分割单文档多视图问题,编译通不过

rogerfz 2009-12-30 04:30:51
// DigitView.h : interface of the CDigitView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_DIGITVIEW_H__9CF1FCAD_DAC0_481B_B2C8_E6CF4254EE80__INCLUDED_)
#define AFX_DIGITVIEW_H__9CF1FCAD_DAC0_481B_B2C8_E6CF4254EE80__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000


class CDigitView : public CScrollView
{
protected: // create from serialization only
CDigitView();

DECLARE_DYNCREATE(CDigitView)

// Attributes
public:
CPROG3Doc* GetDocument();

// Operations
public:

// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CDigitView)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual void OnInitialUpdate(); // called first time after construct
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
//}}AFX_VIRTUAL

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

protected:

// Generated message map functions
protected:
//{{AFX_MSG(CDigitView)
// 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()
};

#ifndef _DEBUG // debug version in DigitView.cpp
inline CPROG3Doc* CDigitView::GetDocument()
{ return (CPROG3Doc*)m_pDocument; }
#endif

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_DIGITVIEW_H__9CF1FCAD_DAC0_481B_B2C8_E6CF4254EE80__INCLUDED_)

编译时报以下错误
e:\vccode\prog3\digitview.h(22) : error C2143: syntax error : missing ';' before '*'
e:\vccode\prog3\digitview.h(22) : error C2501: 'CPROG3Doc' : missing storage-class or type specifiers
e:\vccode\prog3\digitview.h(22) : error C2501: 'GetDocument' : missing storage-class or type specifiers
...全文
56 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
sb3day 2009-12-30
  • 打赏
  • 举报
回复
#include "PROG3Doc.h"
最好通过CMainFrame访问Doc
cbib_cat 2009-12-30
  • 打赏
  • 举报
回复
把错误位置标出来

15,980

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 界面
社区管理员
  • 界面
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧