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. How to get copy message?

How to get copy message?

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

    I need to know when a copy event occurs in the explorer. I think I must set a global hook using SetWindowsHookEx API. But which type of hook it has to be?

    :rose:

    M 1 Reply Last reply
    0
    • C color Aljechin

      I need to know when a copy event occurs in the explorer. I think I must set a global hook using SetWindowsHookEx API. But which type of hook it has to be?

      :rose:

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

      You can write an ICopyHook shell extension to get those notifications.

      --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ

      C 1 Reply Last reply
      0
      • M Michael Dunn

        You can write an ICopyHook shell extension to get those notifications.

        --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ

        C Offline
        C Offline
        color Aljechin
        wrote on last edited by
        #3

        That seems to work only for folders. I want my application to know immediately when user is copying one or more files. Will a clipboard hook help? Is there any other way to do this?

        :rose:

        M 1 Reply Last reply
        0
        • C color Aljechin

          That seems to work only for folders. I want my application to know immediately when user is copying one or more files. Will a clipboard hook help? Is there any other way to do this?

          :rose:

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

          No, it gets called for any file operations done in Explorer. A copy hook gets registered under a "folder" key but that doesn't mean it works only for folders.

          --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ

          C 1 Reply Last reply
          0
          • M Michael Dunn

            No, it gets called for any file operations done in Explorer. A copy hook gets registered under a "folder" key but that doesn't mean it works only for folders.

            --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ

            C Offline
            C Offline
            color Aljechin
            wrote on last edited by
            #5

            Oh thats cool. Can you point me to some sample article or code? When I searched CP I found one article but there only folder copy operation is handled. My app requirement is like I need to log whenever the user is performing a file copy in the explorer. Thanks.

            :rose:

            M 1 Reply Last reply
            0
            • C color Aljechin

              Oh thats cool. Can you point me to some sample article or code? When I searched CP I found one article but there only folder copy operation is handled. My app requirement is like I need to log whenever the user is performing a file copy in the explorer. Thanks.

              :rose:

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

              I don't have any sample code of my own... give Google's code search[^] a try.

              --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ

              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