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. Getting pasted test

Getting pasted test

Scheduled Pinned Locked Moved C / C++ / MFC
question
4 Posts 2 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.
  • H Offline
    H Offline
    Hadi Dayvary
    wrote on last edited by
    #1

    Hi Is there any way to get the pasted text in a dialog? Any control in the dialog may have the focus. Regards

    www.logicsims.ir

    L 1 Reply Last reply
    0
    • H Hadi Dayvary

      Hi Is there any way to get the pasted text in a dialog? Any control in the dialog may have the focus. Regards

      www.logicsims.ir

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

      You can read the contents of the clipboard with the GetClipboardData()[^] function, and write it to any control.

      One of these days I'm going to think of a really clever signature.

      H 1 Reply Last reply
      0
      • L Lost User

        You can read the contents of the clipboard with the GetClipboardData()[^] function, and write it to any control.

        One of these days I'm going to think of a really clever signature.

        H Offline
        H Offline
        Hadi Dayvary
        wrote on last edited by
        #3

        Thanks But I want to get the text when it's pasted. I checked WM_PASTE but it is send to the control that has the focus not it's parent CWnd. My dialog has some control of buttons, edit boxes, list control, ... so it is posible that any of these controls has the focus (when something is paste) Regards

        www.logicsims.ir

        L 1 Reply Last reply
        0
        • H Hadi Dayvary

          Thanks But I want to get the text when it's pasted. I checked WM_PASTE but it is send to the control that has the focus not it's parent CWnd. My dialog has some control of buttons, edit boxes, list control, ... so it is posible that any of these controls has the focus (when something is paste) Regards

          www.logicsims.ir

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

          You need to subclass the controls[^] and capture the message that way.

          One of these days I'm going to think of a really clever signature.

          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