CLipboard - source file details


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 5 of 5

Thread: CLipboard - source file details

  1. #1
    Join Date
    Aug 2004
    Posts
    2

    CLipboard - source file details

    I need to find the source file and location of anythinig pasted into my program.
    I don't know how (or of you can) access this info at all from a clipboard

  2. #2
    Join Date
    May 2004
    Posts
    219
    What do you mean by "the source file of anything pasted into my program"?

  3. #3
    Join Date
    Aug 2004
    Posts
    2
    if a user opens up a file in notepad, has text he wants to use, selects it and copies it, it gets pasted into
    my program, some container. i can detect the paste
    but need to figure out where it came from

  4. #4
    Join Date
    May 2004
    Posts
    219
    Where it came from? It came from the clipboard. AFAIK, it doesn't "track" it or anything. Why do you even need to do this?

  5. #5
    Join Date
    Feb 2004
    Posts
    808
    Originally posted by brendanm
    if a user opens up a file in notepad, has text he wants to use, selects it and copies it, it gets pasted into
    my program, some container. i can detect the paste
    but need to figure out where it came from
    you mean you need to find out which program placed the data onto the clipboard...

    at a rough guess, the easiest way is to get the currently focused program using the windows API call GetForegroundWindow which gives you a hwnd handle, and then GetWindowText which takes a hwnd and gives you a string
    The 6th edict:
    "A thing of reference thing can hold either a null thing or a thing to any thing whose thing is assignment compatible with the thing of the thing" - ArchAngel, www.dictionary.com et al.
    JAR tutorial GridBag tutorial Inherited Shapes Inheritance? String.split(); FTP?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center