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. [Message Deleted]

[Message Deleted]

Scheduled Pinned Locked Moved C / C++ / MFC
18 Posts 10 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.
  • N Offline
    N Offline
    neha agarwal27
    wrote on last edited by
    #1

    [Message Deleted]

    N R S H J 5 Replies Last reply
    0
    • N neha agarwal27

      [Message Deleted]

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

      neha.agarwal27 wrote:

      I want to convert my "LPCSTR" string to "CString ", how can i do so?

      LPCSTR lpText = "Some text";
      CString cs( lpText );

      nave [OpenedFileFinder]

      1 Reply Last reply
      0
      • N neha agarwal27

        [Message Deleted]

        R Offline
        R Offline
        Rajesh R Subramanian
        wrote on last edited by
        #3

        I wonder how lazy people have become just because they can get free help. You did not try something as simple as this before asking it on the internet:

        LPCSTR str = "I'm the dumbest";
        CString szStr = str;

        Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP

        N T 2 Replies Last reply
        0
        • R Rajesh R Subramanian

          I wonder how lazy people have become just because they can get free help. You did not try something as simple as this before asking it on the internet:

          LPCSTR str = "I'm the dumbest";
          CString szStr = str;

          Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP

          N Offline
          N Offline
          neha agarwal27
          wrote on last edited by
          #4

          [Message Deleted]

          R T H 3 Replies Last reply
          0
          • N neha agarwal27

            [Message Deleted]

            R Offline
            R Offline
            Rajesh R Subramanian
            wrote on last edited by
            #5

            neha.agarwal27 wrote:

            if you think people are lazy out here and just can ask anything because here is free help available, so i suggest there's no need to make people more lazy by just answering their problems

            I'm talking about YOU. How you are trying to generalize things by throwing around terms like 'people'! You do not belong to the list of 'people', because they follow the guidelines. And you are rude enough to come back and tell me not to offer anyone help. Thanks for the tip, but I ain't gonna stop it as I love it. Converting an LPCSTR to a CString? Holy cow! You neither did know what an LPCSTR is, nor did you know what a CString is. You did not try ANYTHING from your side and you came down to ask for help. People like you play a primal role in spoiling India's name in the International arena. FYI, I've marked your reply as abusive.

            Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP

            N 2 Replies Last reply
            0
            • R Rajesh R Subramanian

              neha.agarwal27 wrote:

              if you think people are lazy out here and just can ask anything because here is free help available, so i suggest there's no need to make people more lazy by just answering their problems

              I'm talking about YOU. How you are trying to generalize things by throwing around terms like 'people'! You do not belong to the list of 'people', because they follow the guidelines. And you are rude enough to come back and tell me not to offer anyone help. Thanks for the tip, but I ain't gonna stop it as I love it. Converting an LPCSTR to a CString? Holy cow! You neither did know what an LPCSTR is, nor did you know what a CString is. You did not try ANYTHING from your side and you came down to ask for help. People like you play a primal role in spoiling India's name in the International arena. FYI, I've marked your reply as abusive.

              Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP

              N Offline
              N Offline
              neha agarwal27
              wrote on last edited by
              #6

              [Message Deleted]

              R 1 Reply Last reply
              0
              • R Rajesh R Subramanian

                neha.agarwal27 wrote:

                if you think people are lazy out here and just can ask anything because here is free help available, so i suggest there's no need to make people more lazy by just answering their problems

                I'm talking about YOU. How you are trying to generalize things by throwing around terms like 'people'! You do not belong to the list of 'people', because they follow the guidelines. And you are rude enough to come back and tell me not to offer anyone help. Thanks for the tip, but I ain't gonna stop it as I love it. Converting an LPCSTR to a CString? Holy cow! You neither did know what an LPCSTR is, nor did you know what a CString is. You did not try ANYTHING from your side and you came down to ask for help. People like you play a primal role in spoiling India's name in the International arena. FYI, I've marked your reply as abusive.

                Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP

                N Offline
                N Offline
                neha agarwal27
                wrote on last edited by
                #7

                [Message Deleted]

                R N 2 Replies Last reply
                0
                • N neha agarwal27

                  [Message Deleted]

                  R Offline
                  R Offline
                  Rajesh R Subramanian
                  wrote on last edited by
                  #8

                  neha.agarwal27 wrote:

                  Do what ever u want to do...i don care a damn

                  So, now you're taking the discussion out of its context and proving to be rude. I'm sorry, but I'm bringing more people here.

                  Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP

                  S 1 Reply Last reply
                  0
                  • N neha agarwal27

                    [Message Deleted]

                    R Offline
                    R Offline
                    Rajesh R Subramanian
                    wrote on last edited by
                    #9

                    So, you still wanted my code and you did not know what you should do with VS 2005 to get rid of those simple errors. You don't know what a an LPCSTR is, you don't know what a CString is, you don't know generic text mappings, you don't know Unicode, but you develop software. You poor little sod.

                    Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP

                    1 Reply Last reply
                    0
                    • N neha agarwal27

                      [Message Deleted]

                      N Offline
                      N Offline
                      NormDroid
                      wrote on last edited by
                      #10

                      neha.agarwal27 wrote:

                      telling people that they are lazy i smart enogh but try to figure out things first before commenting on anybody

                      Handed to you on a plate.

                      www.software-kinetics.co.uk

                      1 Reply Last reply
                      0
                      • N neha agarwal27

                        [Message Deleted]

                        T Offline
                        T Offline
                        Tom Deketelaere
                        wrote on last edited by
                        #11

                        ever heard off google??? try "LPCSTR" string to "CString" the first link would have given you the answer but I guess it's easyer to ask here and get an answer like Rajesh gave you (wich I support by the way)

                        If my help was helpfull let me know, if not let me know why. The only way we learn is by making mistakes.

                        1 Reply Last reply
                        0
                        • N neha agarwal27

                          [Message Deleted]

                          S Offline
                          S Offline
                          Sarath C
                          wrote on last edited by
                          #12

                          Visual Studio 2005 will create project as with Unicode Character set option by default. (the compilation error will resolve if you change the character set to Multibyte (if you can)) I recommend you to use type safe TCHAR alternatives like LPCTSTR, TCHAR, TCHAR* and other routines. and also user _tcsXXX functions for manipulating strings. if you want to convert the a Unicode String to Multibyte, You can use MultiByteToWideChar API. See MSDN for Sample code. Another thing is that CString's internal storage will change according to UNICODE definition of project. So use it accordingly.

                          -Sarath. "Great hopes make everything great possible" - Benjamin Franklin

                          My blog - Sharing My Thoughts, An Article - Understanding Statepattern

                          1 Reply Last reply
                          0
                          • N neha agarwal27

                            [Message Deleted]

                            H Offline
                            H Offline
                            Hamid Taebi
                            wrote on last edited by
                            #13

                            And see The Complete Guide to C++ Strings, Part II - String Wrapper Classes [^] for converts.

                            1 Reply Last reply
                            0
                            • N neha agarwal27

                              [Message Deleted]

                              H Offline
                              H Offline
                              Hamid Taebi
                              wrote on last edited by
                              #14

                              Can you explain WHY you delete your messages!?

                              1 Reply Last reply
                              0
                              • R Rajesh R Subramanian

                                I wonder how lazy people have become just because they can get free help. You did not try something as simple as this before asking it on the internet:

                                LPCSTR str = "I'm the dumbest";
                                CString szStr = str;

                                Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP

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

                                Rajesh R Subramanian wrote:

                                LPCSTR str = "I'm the dumbest";CString szStr = str;

                                what about "i am still noob"

                                "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
                                Never mind - my own stupidity is the source of every "problem" - Mixture

                                cheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You/codeProject$$>

                                1 Reply Last reply
                                0
                                • R Rajesh R Subramanian

                                  neha.agarwal27 wrote:

                                  Do what ever u want to do...i don care a damn

                                  So, now you're taking the discussion out of its context and proving to be rude. I'm sorry, but I'm bringing more people here.

                                  Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP

                                  S Offline
                                  S Offline
                                  Saurabh Garg
                                  wrote on last edited by
                                  #16

                                  Rajesh R Subramanian wrote:

                                  I'm sorry, but I'm bringing more people here.

                                  Don't you think this is bit childish. My attitude towards people like this is to simply ignore them. You can't educate people like these. -Saurabh

                                  R 1 Reply Last reply
                                  0
                                  • N neha agarwal27

                                    [Message Deleted]

                                    J Offline
                                    J Offline
                                    Julia4u
                                    wrote on last edited by
                                    #17

                                    Don't worry Neha. This lad is a dickhead...Just ignore whatever he said. You are free to ask anything you like. But yeah it would be better if you first google it though. All the best for your work. tc Julia :)

                                    1 Reply Last reply
                                    0
                                    • S Saurabh Garg

                                      Rajesh R Subramanian wrote:

                                      I'm sorry, but I'm bringing more people here.

                                      Don't you think this is bit childish. My attitude towards people like this is to simply ignore them. You can't educate people like these. -Saurabh

                                      R Offline
                                      R Offline
                                      Rajesh R Subramanian
                                      wrote on last edited by
                                      #18

                                      I agree with you.

                                      Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP

                                      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