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. Append text to edit control

Append text to edit control

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

    Hi i use SendMessage(hndl,WM_SETTEXT,0,buufer) to send data in the edit control............ every time the program runs it clears the old text from the edit control and writes the new one to it ......but i want to keep the old data in the edit control and appends the new one ...... tHanks in advance

    AbidBhat

    M C H P R 5 Replies Last reply
    0
    • B bhat

      Hi i use SendMessage(hndl,WM_SETTEXT,0,buufer) to send data in the edit control............ every time the program runs it clears the old text from the edit control and writes the new one to it ......but i want to keep the old data in the edit control and appends the new one ...... tHanks in advance

      AbidBhat

      M Offline
      M Offline
      manish patel
      wrote on last edited by
      #2

      First Get Text from Control and then append your text to this text and then set this combined text to edit control Got it?

      Manish Patel. B.E. - Information Technology.

      1 Reply Last reply
      0
      • B bhat

        Hi i use SendMessage(hndl,WM_SETTEXT,0,buufer) to send data in the edit control............ every time the program runs it clears the old text from the edit control and writes the new one to it ......but i want to keep the old data in the edit control and appends the new one ...... tHanks in advance

        AbidBhat

        C Offline
        C Offline
        Cranky
        wrote on last edited by
        #3

        At first I thought this was a joke but now I think you are serious. I hope programming is just a hobby for you.

        1 Reply Last reply
        0
        • B bhat

          Hi i use SendMessage(hndl,WM_SETTEXT,0,buufer) to send data in the edit control............ every time the program runs it clears the old text from the edit control and writes the new one to it ......but i want to keep the old data in the edit control and appends the new one ...... tHanks in advance

          AbidBhat

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

          I think you need to save previous data of your program on the registry or a file for read again.

          J 1 Reply Last reply
          0
          • B bhat

            Hi i use SendMessage(hndl,WM_SETTEXT,0,buufer) to send data in the edit control............ every time the program runs it clears the old text from the edit control and writes the new one to it ......but i want to keep the old data in the edit control and appends the new one ...... tHanks in advance

            AbidBhat

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

            manish is right, but there is a more efficient way: send EM_SETSEL, -1, -1 to move the cursor to the end of the text send EM_REPLACESEL, (TRUE/FALSE), (LPARAM) "your text" to insert the text at the cursor location (i.e. the end)

            We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP
            blog: TDD - the Aha! | Linkify!| FoldWithUs! | sighist

            1 Reply Last reply
            0
            • H Hamid Taebi

              I think you need to save previous data of your program on the registry or a file for read again.

              J Offline
              J Offline
              John R Shaw
              wrote on last edited by
              #6

              :omg: Not funny.

              INTP "Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra

              H 1 Reply Last reply
              0
              • J John R Shaw

                :omg: Not funny.

                INTP "Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra

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

                I dont think my replay is funny? :doh:

                1 Reply Last reply
                0
                • B bhat

                  Hi i use SendMessage(hndl,WM_SETTEXT,0,buufer) to send data in the edit control............ every time the program runs it clears the old text from the edit control and writes the new one to it ......but i want to keep the old data in the edit control and appends the new one ...... tHanks in advance

                  AbidBhat

                  R Offline
                  R Offline
                  Ravi Bhavnani
                  wrote on last edited by
                  #8

                  See this[^] article. /ravi

                  My new year resolution: 2048 x 1536 Home | Music | Articles | Freeware ravib(at)ravib(dot)com

                  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