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. ATL / WTL / STL
  4. CString with ATL/WTL 7.0

CString with ATL/WTL 7.0

Scheduled Pinned Locked Moved ATL / WTL / STL
c++helpquestion
5 Posts 3 Posters 43 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.
  • G Offline
    G Offline
    Giles
    wrote on last edited by
    #1

    I've got an app, generated with the ATL app wizard in VC7. Now it was compiling fine, until I added a CSting object to a function, and now it gets upset, saying it does not know what one is, yet I know CString is in ATL now. Any ideas what could be happening? I'm getting error C2065 - undeclared identifier. Anyone know which header file its in so I can include it explicitly?

    B L 2 Replies Last reply
    0
    • G Giles

      I've got an app, generated with the ATL app wizard in VC7. Now it was compiling fine, until I added a CSting object to a function, and now it gets upset, saying it does not know what one is, yet I know CString is in ATL now. Any ideas what could be happening? I'm getting error C2065 - undeclared identifier. Anyone know which header file its in so I can include it explicitly?

      B Offline
      B Offline
      Bjoern Graf
      wrote on last edited by
      #2

      It's quite obvious - and mentioned in the help for CStringT ;) #include <atlstr.h> Bjørn.

      G 1 Reply Last reply
      0
      • B Bjoern Graf

        It's quite obvious - and mentioned in the help for CStringT ;) #include <atlstr.h> Bjørn.

        G Offline
        G Offline
        Giles
        wrote on last edited by
        #3

        Bjoern Graf wrote: It's quite obvious - and mentioned in the help for CStringT Ahh yes :-O Must remember to turn my brain on.

        1 Reply Last reply
        0
        • G Giles

          I've got an app, generated with the ATL app wizard in VC7. Now it was compiling fine, until I added a CSting object to a function, and now it gets upset, saying it does not know what one is, yet I know CString is in ATL now. Any ideas what could be happening? I'm getting error C2065 - undeclared identifier. Anyone know which header file its in so I can include it explicitly?

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          Also, if you even include (which defines the WTL CString, CRect, etc.) then it may conflict with the ATL7 version. If you want to use the ATL7 CString AND you still need then do the following in stdafx.h: #define _WTL_NO_WTYPES #define _WTL_NO_CSTRING #include <atlmisc.h>


          Faith. Believing in something you *know* isn't true.

          G 1 Reply Last reply
          0
          • L Lost User

            Also, if you even include (which defines the WTL CString, CRect, etc.) then it may conflict with the ATL7 version. If you want to use the ATL7 CString AND you still need then do the following in stdafx.h: #define _WTL_NO_WTYPES #define _WTL_NO_CSTRING #include <atlmisc.h>


            Faith. Believing in something you *know* isn't true.

            G Offline
            G Offline
            Giles
            wrote on last edited by
            #5

            It worked without, but I'll use it anyway. Thanks, Giles

            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