Click here to Skip to main content
15,888,610 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Is there any way can i get the path based on cursor position, what i mean suppose i open 3 folders like D:\vijay\temp, c:\system\data, E:\data\directory, if i move the cursor from my application to any of these folders, can i get the directory path?, based on cursor position. My application is desktop application (win32/MFC(Doc/View architecture)).
Posted
Comments
Kornfeld Eliyahu Peter 12-Jan-16 5:23am    
You should investigate mouse capturing...
Jochen Arndt 12-Jan-16 5:33am    
Do you want to check if there is some kind of text containing a path below the mouse cursor?

If so, you should explain what you finally want to achieve because there might be a better way (e.g. Drag & Drop). Otherwise you have to capture the area below the mouse as bitmap image and feed that to some kind of CR (Character Recognition).
Vijay533 12-Jan-16 5:47am    
For drag and drop only i need it. Because in drag&drop we already have some implementation, i don't want to disturb that, so i am searching for some alternatives.
Jochen Arndt 12-Jan-16 6:01am    
Please use the Reply button on top of a comment like I have done yet. Then an email notification is send. I saw your new comment now by re-visiting.

You should be more specific. A Drag & Drop operation can't be disturbed.

Just add drop support to your application (or specific windows of your application) and you will get the path (assuming you are dragging a path from the Explorer).

You even don't need to perform the final drop. When handling the DragEnter notification you can peek into the drag object to get the path.
Leo Chapiro 12-Jan-16 6:08am    
Looks like a valid answer, I think?

1 solution

Looks like you have a similar question as I answered here.

What have coded so far?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900