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. DDX_Text embedding nulls on UpdateData(TRUE)

DDX_Text embedding nulls on UpdateData(TRUE)

Scheduled Pinned Locked Moved C / C++ / MFC
8 Posts 3 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.
  • F Offline
    F Offline
    ForNow
    wrote on last edited by
    #1

    I have three controls in my Modal Dialog there are EDITTEXT and the Variables I am using are CString After the modal Dialog Box comes in my OnOk I do an UpdateData(TRUE) the data I enter is 2E000 however when it is returned between every character there is a Null so it would be in hex 32004500300030 this happens with all the varaible thanks

    P 1 Reply Last reply
    0
    • F ForNow

      I have three controls in my Modal Dialog there are EDITTEXT and the Variables I am using are CString After the modal Dialog Box comes in my OnOk I do an UpdateData(TRUE) the data I enter is 2E000 however when it is returned between every character there is a Null so it would be in hex 32004500300030 this happens with all the varaible thanks

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

      One word. UNICODE

      Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012

      F 1 Reply Last reply
      0
      • P Peter_in_2780

        One word. UNICODE

        Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012

        F Offline
        F Offline
        ForNow
        wrote on last edited by
        #3

        Have to change the settings in the VS property page ?

        L 1 Reply Last reply
        0
        • F ForNow

          Have to change the settings in the VS property page ?

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

          It depends what you are trying to do with the content of the string. The CString is using Unicode, so presumably, the entire application is also. And you cannot (easily) change one part of the application without affecting other elements.

          F 1 Reply Last reply
          0
          • L Lost User

            It depends what you are trying to do with the content of the string. The CString is using Unicode, so presumably, the entire application is also. And you cannot (easily) change one part of the application without affecting other elements.

            F Offline
            F Offline
            ForNow
            wrote on last edited by
            #5

            How about CStringA

            L 1 Reply Last reply
            0
            • F ForNow

              How about CStringA

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

              Yes that will work fine, but you really need to consider why your application is using Unicode in the first place.

              F 1 Reply Last reply
              0
              • L Lost User

                Yes that will work fine, but you really need to consider why your application is using Unicode in the first place.

                F Offline
                F Offline
                ForNow
                wrote on last edited by
                #7

                Richard I have a lot of my pieces in place from my windows client debugger setting breakpoints stepping thru code I just created this project to finish off the last piece displaying modifying storage As whenever I have to re-test in my development project I have to reinit my machine ( long story) don’t know how I unicode got set Thanks for your help

                L 1 Reply Last reply
                0
                • F ForNow

                  Richard I have a lot of my pieces in place from my windows client debugger setting breakpoints stepping thru code I just created this project to finish off the last piece displaying modifying storage As whenever I have to re-test in my development project I have to reinit my machine ( long story) don’t know how I unicode got set Thanks for your help

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

                  ForNow wrote:

                  don’t know how I unicode got set

                  It would appear that it is the default for new projects, at least in VS 2019.

                  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