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. Edit box that copying and pasting?

Edit box that copying and pasting?

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

    hey every one... well maybe the title is not good enough to explain what is in my mind, but what i want to do is: an edit box + button and when i enter text in the edit box and click on the button then it will copy the text inside the edit box and pasting it.... i hope that i made it clear... so any way to do it? thanks alot

    D 1 Reply Last reply
    0
    • D Dody_DK

      hey every one... well maybe the title is not good enough to explain what is in my mind, but what i want to do is: an edit box + button and when i enter text in the edit box and click on the button then it will copy the text inside the edit box and pasting it.... i hope that i made it clear... so any way to do it? thanks alot

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      Dody_DK wrote: ...it will copy the text inside the edit box... Use GetWindowText() for this.


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

      D 1 Reply Last reply
      0
      • D David Crow

        Dody_DK wrote: ...it will copy the text inside the edit box... Use GetWindowText() for this.


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

        D Offline
        D Offline
        Dody_DK
        wrote on last edited by
        #3

        oki, does GetWindowText() only copying... or copying and pasting? and if it is only for copying.. what i should use to paste? thenks alot

        D L 2 Replies Last reply
        0
        • D Dody_DK

          oki, does GetWindowText() only copying... or copying and pasting? and if it is only for copying.. what i should use to paste? thenks alot

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          See here.


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

          D 1 Reply Last reply
          0
          • D Dody_DK

            oki, does GetWindowText() only copying... or copying and pasting? and if it is only for copying.. what i should use to paste? thenks alot

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

            GetWindowText() gets the text, SetWindowText(text) sets the text. Where are you pasting the text to? Artificial intelligence is no match for natural stupidity.

            1 Reply Last reply
            0
            • D David Crow

              See here.


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

              D Offline
              D Offline
              Dody_DK
              wrote on last edited by
              #6

              I want to paste the text in other program... like word... I took a look at the link that DavidCrow put... but as i said i want it to copy and paste after i click on a button... so any idea? thaks alot

              D 1 Reply Last reply
              0
              • D Dody_DK

                I want to paste the text in other program... like word... I took a look at the link that DavidCrow put... but as i said i want it to copy and paste after i click on a button... so any idea? thaks alot

                D Offline
                D Offline
                David Crow
                wrote on last edited by
                #7

                If you have the handle of the window you want to paste to, you could try sending it a WM_PASTE message.


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

                D 1 Reply Last reply
                0
                • D David Crow

                  If you have the handle of the window you want to paste to, you could try sending it a WM_PASTE message.


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

                  D Offline
                  D Offline
                  Dody_DK
                  wrote on last edited by
                  #8

                  can you give me an example to how use WM_PASTE ?? thanks alot

                  D 1 Reply Last reply
                  0
                  • D Dody_DK

                    can you give me an example to how use WM_PASTE ?? thanks alot

                    D Offline
                    D Offline
                    David Crow
                    wrote on last edited by
                    #9

                    MSDN is usually the first place I go to for such things. Google is another.


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

                    D 1 Reply Last reply
                    0
                    • D David Crow

                      MSDN is usually the first place I go to for such things. Google is another.


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

                      D Offline
                      D Offline
                      Dody_DK
                      wrote on last edited by
                      #10

                      OK thanks alot for your help... and sure there are alot of questions in my mind, and i am going to need help soon...hehe thanks alot.

                      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