#if !defined(AFX_EDITGRID_H__1F986762_FFEB_11D1_8540_00C04FAD7DBE__INCLUDED_)
#define AFX_EDITGRID_H__1F986762_FFEB_11D1_8540_00C04FAD7DBE__INCLUDED_#include "msflexgrid.h"
#include "EditWnd.h"#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000/////////////////////////////////////////////////////////////////////////////
// CEditGrid windowclass CEditGrid : public CMSFlexGrid
{
// Construction
public:
CEditGrid();
// Attributes
public:      CEditWnd m_edit;
      long m_lBorderWidth; 
      long m_lBorderHeight;// Operations
public:// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CEditGrid)
//}}AFX_VIRTUAL// Implementation
public:
int m_nLogY;
int m_nLogX;
virtual ~CEditGrid(); // Generated message map functions
protected:   virtual void PreSubclassWindow();
//   void CEditGrid::ShowGridData(Navs * Config,int Num)
//      void CEditGrid::GetGridData(Navs * Config,int Num)
      afx_msg void OnKeyPressGrid(short FAR* KeyAscii);
      afx_msg void OnDblClickGrid();
      afx_msg void OnUpdateGrid();
      DECLARE_EVENTSINK_MAP() //{{AFX_MSG(CEditGrid)
afx_msg UINT OnGetDlgCode();
afx_msg void OnSetFocus(CWnd* pOldWnd);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};#pragma once
//#include "msflexgrid.h"
#include "EditGrid.h"// CMenuDlg dialogclass CMenuDlg : public CDialog
{
DECLARE_DYNAMIC(CMenuDlg)public:
CMenuDlg(CWnd* pParent = NULL);   // standard constructor
virtual ~CMenuDlg();
//    void ShowGridData();
// void GetGridData();
// Dialog Data
enum { IDD = IDD_DIALOG_MENU };protected:
virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support DECLARE_MESSAGE_MAP()
public: virtual BOOL OnInitDialog();
CEditGrid m_grid;};

解决方案 »

  1.   

    在CMenuDlg中把CEditGrid m_grid; 删除编译有问题没?
      

  2.   

    LNK2019
    看看头文件和lib文件是否版本一致
      

  3.   


    只留.h中的声明
    在.cpp中把m_grid相关注释掉,有问题没?
      

  4.   

    CMenuDlg::CMenuDlg(CWnd* pParent /*=NULL*/) 
    : CDialog(CMenuDlg::IDD, pParent) 
    { }  
    改为CMenuDlg::CMenuDlg(CWnd* pParent = NULL) 
    : CDialog(CMenuDlg::IDD, pParent) 
    { } 
    //定义和声明不符合。
      

  5.   


    看来大虾也会犯糊涂,声明的时候给默认参数,定义的时候是不能给默认参数的lz 的估计是 VC 默认生成的代码
      

  6.   


    //睡着了//LNK2019:无法解析的外部符号
    //Rebuid ALL看看