-
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
-
What do you mean by "the source file of anything pasted into my program"?
-
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
-
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?
-
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks