请教:调试代码的时候出现了下面错误,该如何解决呀???
error C2039: 'DoDataExchange' : is not a member of 'CDialog'
        c:\program files\microsoft visual studio\vc98\mfc\include\afxwin.h(2568) : see declaration of 'CDialog'
DrawLayer.cpp
\\\\DrawLayer.cpp(34) : error C2039: 'DoDataExchange' : is not a member of 'CDialog'
        c:\program files\microsoft visual studio\vc98\mfc\include\afxwin.h(2568) : see declaration of 'CDialog'
DrawTool.cpp
\DrawTool.cpp(44) : error C2039: 'DoDataExchange' : is not a member of 'CDialog'
        c:\program files\microsoft visual studio\vc98\mfc\include\afxwin.h(2568) : see declaration of 'CDialog'
MapLayer.cpp
MapLayer.cpp(45) : error C2039: 'DoDataExchange' : is not a member of 'CDialog'
        c:\program files\microsoft visual studio\vc98\mfc\include\afxwin.h(2568) : see declaration of 'CDialog'
MapLayerShow.cpp
\MapLayerShow.cpp(33) : error C2039: 'DoDataExchange' : is not a member of 'CDialog'
        c:\program files\microsoft visual studio\vc98\mfc\include\afxwin.h(2568) : see declaration of 'CDialog'
Radar.cpp
\Radar.cpp(141) : error C2039: 'DoDataExchange' : is not a member of 'CDialog'
        c:\program files\microsoft visual studio\vc98\mfc\include\afxwin.h(2568) : see declaration of 'CDialog'

解决方案 »

  1.   

    mfc中用的好像都是CDialog的派生类吧?
      

  2.   

    是呀,在VIEW类中添加了一个DoDataExchange之后,所有用的DoDataExchange的类都有问题了,你知道是怎么回事吗?会不会是我什么不小心删了,可我找了很久也没有发现什么
      

  3.   

    不会吧,我在别工程里面用到 'DoDataExchange' 的地方并没有出错呀!!!
      

  4.   

    楼主为什么要在VIEW类中添加DoDataExchange函数?
    难道楼主在VIEW创建了EDIT控件?
      

  5.   

    没有,不过出现错误之后我已经把DoDataExchange删了,可错误依旧,还是上面提示的错误
      

  6.   

    你可以在头文件里看一下
    protect:virtual void DoDataExchange(CDataExchange* pDX);
    是不是被注释掉了。如果是,取消注释就好了。
    应该就是这个问题。