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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. OnEditPaste Problem

OnEditPaste Problem

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
6 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.
  • U Offline
    U Offline
    ugur_basak
    wrote on last edited by
    #1

    I want to edit some of my edit boxes before pasting data, so try to change them in OnEditPaste. This is working very good with Ctrl+V, but there is a problem. When i use right mouse button, there is a menu "copy, paste..." when i use that menus paste. OnEditPaste doesn't called. is there a solution?

    K D 2 Replies Last reply
    0
    • U ugur_basak

      I want to edit some of my edit boxes before pasting data, so try to change them in OnEditPaste. This is working very good with Ctrl+V, but there is a problem. When i use right mouse button, there is a menu "copy, paste..." when i use that menus paste. OnEditPaste doesn't called. is there a solution?

      K Offline
      K Offline
      khan
      wrote on last edited by
      #2

      The right-click menu comes from Windows. You are not handling it. It will only paste what is on the windows clipboard. Solution (In my opinion): Subclass the edit control. Then handle the mouse right-click in some way. this is this.

      U 1 Reply Last reply
      0
      • K khan

        The right-click menu comes from Windows. You are not handling it. It will only paste what is on the windows clipboard. Solution (In my opinion): Subclass the edit control. Then handle the mouse right-click in some way. this is this.

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

        anyway i have to write more code:) thank you

        1 Reply Last reply
        0
        • U ugur_basak

          I want to edit some of my edit boxes before pasting data, so try to change them in OnEditPaste. This is working very good with Ctrl+V, but there is a problem. When i use right mouse button, there is a menu "copy, paste..." when i use that menus paste. OnEditPaste doesn't called. is there a solution?

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

          Are you handling the EN_CHANGE notification?


          "Ideas are a dime a dozen. People who put them into action are priceless." - Unknown

          U 1 Reply Last reply
          0
          • D David Crow

            Are you handling the EN_CHANGE notification?


            "Ideas are a dime a dozen. People who put them into action are priceless." - Unknown

            U Offline
            U Offline
            ugur_basak
            wrote on last edited by
            #5

            at first i dont want to use EN_CHANGE, but then i found it as last solution and used it. But there is a class i wrote that is inherited form CEdit. I use it for currencies. It doesn't call en_change, so i have to use EN_UPDATE for my CMyEdit, i guess it is not a good solution. But it seems to work. Also, can i only alter the pasted data in Dialog's with EN_CHANGE?

            D 1 Reply Last reply
            0
            • U ugur_basak

              at first i dont want to use EN_CHANGE, but then i found it as last solution and used it. But there is a class i wrote that is inherited form CEdit. I use it for currencies. It doesn't call en_change, so i have to use EN_UPDATE for my CMyEdit, i guess it is not a good solution. But it seems to work. Also, can i only alter the pasted data in Dialog's with EN_CHANGE?

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

              ugur_basak wrote: But there is a class i wrote that is inherited form CEdit...It doesn't call en_change Nor should it. ugur_basak wrote: ...so i have to use EN_UPDATE... This notification is sent when an edit control is about to redraw itself (after the control has formatted the text, but before it displays the text). ugur_basak wrote: Also, can i only alter the pasted data in Dialog's with EN_CHANGE? This notification message is sent after the user has taken an action that may have altered text in an edit control. In other words, it's not a message that your code would send. To change the text in an edit control, send it a WM_SETTEXT or EM_SETTEXTEX message.


              "Ideas are a dime a dozen. People who put them into action are priceless." - Unknown

              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