利用AppWizard生成单文档视程序tsgl,
在tsglView.h中:
// tsglView.h : interface of the CTsglView class
//
/////////////////////////////////////////////////////////////////////////////#if !defined(AFX_TSGLVIEW_H__9B5665E7_CADF_40C2_93BA_F803915C026A__INCLUDED_)
#define AFX_TSGLVIEW_H__9B5665E7_CADF_40C2_93BA_F803915C026A__INCLUDED_#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000//class CTsglSet;class CTsglView : public CRecordView
{
protected: // create from serialization only
CTsglView();
DECLARE_DYNCREATE(CTsglView)public:
//{{AFX_DATA(CTsglView)
enum{ IDD = IDD_TSGL_FORM };
// CTsglSet* m_pSet;
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA// Attributes
public:
CTsglDoc* GetDocument();// Operations
public:// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CTsglView)
public:
virtual CRecordset* OnGetRecordset();
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
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 ~CTsglView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endifprotected:// Generated message map functions
protected:
//{{AFX_MSG(CTsglView)
// 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 tsglView.cpp
inline CTsglDoc* CTsglView::GetDocument()
{ return (CTsglDoc*)m_pDocument; }
#endif///////////////////////////////////////////////////////////////////////////////{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.#endif // !defined(AFX_TSGLVIEW_H__9B5665E7_CADF_40C2_93BA_F803915C026A__INCLUDED_)编译报错:
error C2143: syntax error : missing ';' before '*'
error C2501: 'CTsglDoc' : missing storage-class or type specifiers
'GetDocument' : missing storage-class or type specifiers
我查了半天,肯定没有漏 ;,哪位老大指点一下吧!
在tsglView.h中:
// tsglView.h : interface of the CTsglView class
//
/////////////////////////////////////////////////////////////////////////////#if !defined(AFX_TSGLVIEW_H__9B5665E7_CADF_40C2_93BA_F803915C026A__INCLUDED_)
#define AFX_TSGLVIEW_H__9B5665E7_CADF_40C2_93BA_F803915C026A__INCLUDED_#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000//class CTsglSet;class CTsglView : public CRecordView
{
protected: // create from serialization only
CTsglView();
DECLARE_DYNCREATE(CTsglView)public:
//{{AFX_DATA(CTsglView)
enum{ IDD = IDD_TSGL_FORM };
// CTsglSet* m_pSet;
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA// Attributes
public:
CTsglDoc* GetDocument();// Operations
public:// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CTsglView)
public:
virtual CRecordset* OnGetRecordset();
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
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 ~CTsglView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endifprotected:// Generated message map functions
protected:
//{{AFX_MSG(CTsglView)
// 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 tsglView.cpp
inline CTsglDoc* CTsglView::GetDocument()
{ return (CTsglDoc*)m_pDocument; }
#endif///////////////////////////////////////////////////////////////////////////////{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.#endif // !defined(AFX_TSGLVIEW_H__9B5665E7_CADF_40C2_93BA_F803915C026A__INCLUDED_)编译报错:
error C2143: syntax error : missing ';' before '*'
error C2501: 'CTsglDoc' : missing storage-class or type specifiers
'GetDocument' : missing storage-class or type specifiers
我查了半天,肯定没有漏 ;,哪位老大指点一下吧!
解决方案 »
- SetLayeredWindowAttributes问题
- XP登陆界面账户按钮位置怎么设置
- 在一个对话框的按钮消息函数中如何去调用另一个对话框的方法
- 牛顿发现万有引力是因为当苹果炸到他头上的时候,他去思考。计算机高手是,当遇到问题时候,勇于思考 黑群!!!
- #ifdef _DEBUG ..... #endif 有什么用?
- 大家提供几个源代码网站,国内外都可以!
- 在应付账款借方金额大于贷方金额表示什么意思啊
- 请问怎样在一个子线程中挂起自已,多谢!
- 互斥量和临界区的问题?怎么出现这种情况?
- windows上是否有能在cmd下面运行的指令,直接查看.dll的依赖关系?
- 小弟看Charles Petzold的《windows程序设计》碰到的问题
- 如何从COleDateTime中得到精确到毫秒的Second值?
我在CMainFrame中添加函数后要加呢?