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. Want to paste a file programatically (using C++) that's available in the clipboard

Want to paste a file programatically (using C++) that's available in the clipboard

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++
2 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.
  • P Offline
    P Offline
    PankajB
    wrote on last edited by
    #1

    Hi All. I can copy a text and then can programatically paste the same on top of any text editor. Now, what I want to do is... If I have a file in the clipboard (Ctrl+C) and then want to paste the same onto any open folder, then How can I do that? I tried to send Ctrl+V to the window but I am unable to get the result. Can someone please provide me some pointers, so that move ahead? Please let me know, in case any clarification required. Thanks PanB

    C 1 Reply Last reply
    0
    • P PankajB

      Hi All. I can copy a text and then can programatically paste the same on top of any text editor. Now, what I want to do is... If I have a file in the clipboard (Ctrl+C) and then want to paste the same onto any open folder, then How can I do that? I tried to send Ctrl+V to the window but I am unable to get the result. Can someone please provide me some pointers, so that move ahead? Please let me know, in case any clarification required. Thanks PanB

      C Offline
      C Offline
      Code o mat
      wrote on last edited by
      #2

      With open folder you mean explorer's windows? And since you tried to send Ctrl+V to the window i assume you know its handle. Try using Spy++ to see what command/message the window gets if the user selects "Paste" from the window's edit menu and then try sending the same to the window yourself, maybe it will get you what you want, maybe not, but it is worth a try.

      > The problem with computers is that they do what you tell them to do and not what you want them to do. < > Sometimes you just have to hate coding to do it well. <

      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