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. Cant use Ctrl+C like commands with CFormView

Cant use Ctrl+C like commands with CFormView

Scheduled Pinned Locked Moved C / C++ / MFC
5 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

    Why can't i use Ctrl+C,V like commands with CFormView. When i want to use it doesnt respond. is there any way to activate them. I'm using SDI style.

    2 M 2 Replies Last reply
    0
    • U ugur_basak

      Why can't i use Ctrl+C,V like commands with CFormView. When i want to use it doesnt respond. is there any way to activate them. I'm using SDI style.

      2 Offline
      2 Offline
      224917
      wrote on last edited by
      #2

      Implement your own handler for WM_COPY message to CFormView. Because by default CFormView dosen't implement it.


      suhredayan
      There is no spoon.

      U 1 Reply Last reply
      0
      • 2 224917

        Implement your own handler for WM_COPY message to CFormView. Because by default CFormView dosen't implement it.


        suhredayan
        There is no spoon.

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

        this works but i guess i must write some code. Thanks

        1 Reply Last reply
        0
        • U ugur_basak

          Why can't i use Ctrl+C,V like commands with CFormView. When i want to use it doesnt respond. is there any way to activate them. I'm using SDI style.

          M Offline
          M Offline
          Michael Dunn
          wrote on last edited by
          #4

          Add accelerators for Ctrl+C, Ctrl+V, and any other keys you want. The AppWizards make Edit menu commands with IDs of (I think) ID_EDIT_COPY, ID_EDIT_PASTE, and so on, so use those same IDs for the accelerators and add command handlers using those IDs as well. Then the menus and accelerators will go through the same handler. --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ Strange things are afoot at the U+004B U+20DD

          U 1 Reply Last reply
          0
          • M Michael Dunn

            Add accelerators for Ctrl+C, Ctrl+V, and any other keys you want. The AppWizards make Edit menu commands with IDs of (I think) ID_EDIT_COPY, ID_EDIT_PASTE, and so on, so use those same IDs for the accelerators and add command handlers using those IDs as well. Then the menus and accelerators will go through the same handler. --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ Strange things are afoot at the U+004B U+20DD

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

            void CClass::OnEditCopy() { // TODO: Add your command handler code here ((CEdit*)GetFocus())->Copy(); } I write the code above for(copy,paste,cut,undo). these already have acceleretors. They seem to work. When i want to use on a combobox, as guessed it doesn't copy but at least there is no errors.

            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