我在运行release版时,无论啥程序,都出现如下错误,
H:\Program Files\Microsoft Visual Studio\VC98\MFC\INCLUDE\afxwin2.inl(647) : error C2511: 'GetText' : overloaded member function 'int (int,char *) const' not found in 'CListBox'
        H:\Program Files\Microsoft Visual Studio\VC98\MFC\INCLUDE\afxwin.h(2741) : see declaration of 'CListBox'
请各位指教

解决方案 »

  1.   

    _AFXWIN_INLINE int CListBox::GetText(int nIndex, LPTSTR lpszBuffer) const
    { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, LB_GETTEXT, nIndex, (LPARAM)lpszBuffer); }
    afxwin2.inl没被改过吧
      

  2.   

    _AFXWIN_INLINE int CListBox::GetText(int nIndex, LPTSTR lpszBuffer) const
    { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, LB_GETTEXT, nIndex, (LPARAM)lpszBuffer); }
    void GetText(int nIndex, CString& rString) const;好像是这样的,我没有改变,为什么上天对我这么不公平
      

  3.   

    我怀疑这个文件真的动过了,希望高手指点看一看下面这个函数原型是否一样
    void GetText(int nIndex, CString& rString) const;
    望高手指点,我很急呀
      

  4.   

    那你的vc打的sp是5吗
    我的vc打的sp5没问题哦
      

  5.   

    int GetText( int nIndex, LPTSTR lpszBuffer ) const;
    void GetText( int nIndex, CString& rString ) const;
    用于获取指定列表项的字符串.参数nIndex指定了列表项的索引.参数lpszBuffer指向一个接收字符串的缓冲区.引用参数rString则指定了接收字符串的CString对象.第一个版本的函数会返回获得的字符串的长度,若出错,则返回LB_ERR.