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. Using CString in WIN32 Application.

Using CString in WIN32 Application.

Scheduled Pinned Locked Moved C / C++ / MFC
question
8 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.
  • V Offline
    V Offline
    VCSharp007
    wrote on last edited by
    #1

    How can we use CString in WIN32 Application ?? Thanx in advance.

    P M 2 Replies Last reply
    0
    • V VCSharp007

      How can we use CString in WIN32 Application ?? Thanx in advance.

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

      Why one would like to use CString in WIN32 application? Use std::string instead.

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

      U 1 Reply Last reply
      0
      • P prasad_som

        Why one would like to use CString in WIN32 application? Use std::string instead.

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

        U Offline
        U Offline
        uusheikh
        wrote on last edited by
        #3

        Define this, and you will have CString in Win32 #define _AFXDLL #include #include

        M P 2 Replies Last reply
        0
        • U uusheikh

          Define this, and you will have CString in Win32 #define _AFXDLL #include #include

          M Offline
          M Offline
          Mike_V
          wrote on last edited by
          #4

          Make that #define _AFXDLL #include <afx.h> #include <afxwin.h>

          U 1 Reply Last reply
          0
          • V VCSharp007

            How can we use CString in WIN32 Application ?? Thanx in advance.

            M Offline
            M Offline
            Mike_V
            wrote on last edited by
            #5

            I replied to the wrong person - see my earlier post in the thread. This way you get the email notification. Mike

            1 Reply Last reply
            0
            • M Mike_V

              Make that #define _AFXDLL #include <afx.h> #include <afxwin.h>

              U Offline
              U Offline
              uusheikh
              wrote on last edited by
              #6

              Hmm, i'm sure i wrote afx.h and afxwin.h! i guess the angled brackets is the culprit!! :P

              M 1 Reply Last reply
              0
              • U uusheikh

                Hmm, i'm sure i wrote afx.h and afxwin.h! i guess the angled brackets is the culprit!! :P

                M Offline
                M Offline
                Mike_V
                wrote on last edited by
                #7

                Yep... View Source did the trick. I was just browsing the forum and figured I might as well make it easier for the OP. I guess that's just one drawback of allowing html in posts. :)

                1 Reply Last reply
                0
                • U uusheikh

                  Define this, and you will have CString in Win32 #define _AFXDLL #include #include

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

                  Again, why one need to use MFC classes in WIN32 app, if standard library function do ?

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

                  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