Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Whats the equivalent of CString.m_pchData in VS.NET?

Whats the equivalent of CString.m_pchData in VS.NET?

Scheduled Pinned Locked Moved C / C++ / MFC
csharpvisual-studioc++helpquestion
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Alvaro Mendez
    wrote on last edited by
    #1

    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

    A S J 3 Replies Last reply
    0
    • A Alvaro Mendez

      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

      A Offline
      A Offline
      Alex Cramer
      wrote on last edited by
      #2

      What there used instead?

      1 Reply Last reply
      0
      • A Alvaro Mendez

        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

        S Offline
        S Offline
        Stephane Rodriguez
        wrote on last edited by
        #3

        Unfortunately 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

        1 Reply Last reply
        0
        • A Alvaro Mendez

          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

          J Offline
          J Offline
          Jon Hulatt
          wrote on last edited by
          #4

          why 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....

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups