Whats the equivalent of CString.m_pchData in VS.NET?
-
Well, I finally got a hold of Visual Studio .NET and now I'm trying to rebuild my DLLs which contain a bunch of MFC-based classes. I'm getting tons of errors, the first of which I don't have a solution for. I have a string class which derives from CString and uses the old
m_pchData
protected member from 6.0. So now since apparently it's no longer in CString, I get a 'm_pchData' : undeclared identifier error. What should I do? My class needs the equivalent of this member variable. Thanks, Alvaro Insanity: doing the same thing over and over again and expecting different results. - Albert Einstein -
Well, I finally got a hold of Visual Studio .NET and now I'm trying to rebuild my DLLs which contain a bunch of MFC-based classes. I'm getting tons of errors, the first of which I don't have a solution for. I have a string class which derives from CString and uses the old
m_pchData
protected member from 6.0. So now since apparently it's no longer in CString, I get a 'm_pchData' : undeclared identifier error. What should I do? My class needs the equivalent of this member variable. Thanks, Alvaro Insanity: doing the same thing over and over again and expecting different results. - Albert EinsteinWhat there used instead?
-
Well, I finally got a hold of Visual Studio .NET and now I'm trying to rebuild my DLLs which contain a bunch of MFC-based classes. I'm getting tons of errors, the first of which I don't have a solution for. I have a string class which derives from CString and uses the old
m_pchData
protected member from 6.0. So now since apparently it's no longer in CString, I get a 'm_pchData' : undeclared identifier error. What should I do? My class needs the equivalent of this member variable. Thanks, Alvaro Insanity: doing the same thing over and over again and expecting different results. - Albert EinsteinUnfortunately the MFC7 CString uses STL :
typedef ATL::CStringT< TCHAR, StrTraitMFC< TCHAR > > CString;
. You may just as well extract the CString implementation from the MFC6 classes. (afx.h + strcore.cpp)
sometimes it helps to look at the IL generated code a MS guy on develop.com "answering" .NET issues
-
Well, I finally got a hold of Visual Studio .NET and now I'm trying to rebuild my DLLs which contain a bunch of MFC-based classes. I'm getting tons of errors, the first of which I don't have a solution for. I have a string class which derives from CString and uses the old
m_pchData
protected member from 6.0. So now since apparently it's no longer in CString, I get a 'm_pchData' : undeclared identifier error. What should I do? My class needs the equivalent of this member variable. Thanks, Alvaro Insanity: doing the same thing over and over again and expecting different results. - Albert Einsteinwhy were you trying to use a protected member? for read, CString has an LPCTSTR operator, and for write you can GetBuffer() to get an LPTSTR pointer. You should use those, because that is the designed interface of CString. Signature space for rent. Apply by email to....