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. CString to TCHAR

CString to TCHAR

Scheduled Pinned Locked Moved C / C++ / MFC
question
9 Posts 6 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.
  • R Offline
    R Offline
    radhika28
    wrote on last edited by
    #1

    How can i convert the above? Thanks

    P N T S 4 Replies Last reply
    0
    • R radhika28

      How can i convert the above? Thanks

      P Offline
      P Offline
      prasad_som
      wrote on last edited by
      #2

      You mean CString to TCHAR*, isn't it ?

      Prasad Notifier using ATL | Operator new[],delete[][^]

      R 1 Reply Last reply
      0
      • R radhika28

        How can i convert the above? Thanks

        N Offline
        N Offline
        Naveen
        wrote on last edited by
        #3

        CString cs = "some text"; TCHAR c = cs[0];

        nave

        R 1 Reply Last reply
        0
        • P prasad_som

          You mean CString to TCHAR*, isn't it ?

          Prasad Notifier using ATL | Operator new[],delete[][^]

          R Offline
          R Offline
          radhika28
          wrote on last edited by
          #4

          No,i have to convert a Cstring variable to TCHAR variable only.No pointer for TCHAR.

          P 1 Reply Last reply
          0
          • R radhika28

            No,i have to convert a Cstring variable to TCHAR variable only.No pointer for TCHAR.

            P Offline
            P Offline
            prasad_som
            wrote on last edited by
            #5

            Have you considered fact , that CString is a 'string' , array of characters ? In other words its array of TCHAR. Do you want signle TCHAR out of CString ? If yes, then reply by Navin suffice. But seems strange wording.

            Prasad Notifier using ATL | Operator new[],delete[][^]

            1 Reply Last reply
            0
            • N Naveen

              CString cs = "some text"; TCHAR c = cs[0];

              nave

              R Offline
              R Offline
              radhika28
              wrote on last edited by
              #6

              I got it.Thanks both of you.

              L 1 Reply Last reply
              0
              • R radhika28

                How can i convert the above? Thanks

                T Offline
                T Offline
                ThatsAlok
                wrote on last edited by
                #7

                radhika28 wrote:

                How can i convert the above?

                is your application UNICODE enabled

                "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and you

                1 Reply Last reply
                0
                • R radhika28

                  I got it.Thanks both of you.

                  L Offline
                  L Offline
                  Laxman Auti
                  wrote on last edited by
                  #8

                  radhika28 wrote:

                  I got it.Thanks both of you.

                  What was your problem? What you got? :confused: :confused: Knock out 't' from can't, You can if you think you can :cool:

                  1 Reply Last reply
                  0
                  • R radhika28

                    How can i convert the above? Thanks

                    S Offline
                    S Offline
                    Shaileshhex
                    wrote on last edited by
                    #9

                    hi.. try this out... TEXT("string");

                    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