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. Restrict Copy and Paste

Restrict Copy and Paste

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

    Hi Experts, How can I restrict copy and paste (from mouse and keyboard) from a view?

    _ J 2 Replies Last reply
    0
    • J john5632

      Hi Experts, How can I restrict copy and paste (from mouse and keyboard) from a view?

      _ Offline
      _ Offline
      _AnsHUMAN_
      wrote on last edited by
      #2

      1. Capture the Key Down/Mouse click event 2. Find if it's a Copy(Ctrl+C) action 3. return from the Key down handler if it's a Ctrl+C It would be good if you can elaborate on what is in that view

      You talk about Being HUMAN. I have it in my name AnsHUMAN

      1 Reply Last reply
      0
      • J john5632

        Hi Experts, How can I restrict copy and paste (from mouse and keyboard) from a view?

        J Offline
        J Offline
        JohnCz
        wrote on last edited by
        #3

        The question is: what view? Is it MFC Cedit or CrichEdit derived view? Anyway, you do not have capture anything. Where is the word capture coming from? Windows sends messages that you choose to handle or not you do not have to set any traps to capture. Anyway, if this is MFC application it has menu items and possibly corresponding accelerator keys combination with the same ID. For example: ID_EDIT_PASTE has Ctrl-V or CTRL-Insert key combinations. If you want to completely disable copying pasting, insert do nothing (empty) handlers for those IDs, leave accelerators intact and remove appropriate menu items. If you want to disable editing under certain condition, use Update UI for those commands.

        JohnCz

        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