Click here to Skip to main content
15,890,973 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi:
I want to get the files name when mouse click files and path in windows 7,If select multiple files get all path and name.But i don't know what should i do. I researched the problem for a few days and didn't find a solution.who can help me.
I used the c + + language in my program.
Thanks!
Posted
Updated 6-Jan-16 20:22pm
v4
Comments
_Asif_ 7-Jan-16 2:03am    
You are trying to build a Windows Explorer Extension?
Member 11562680 7-Jan-16 2:21am    
no I just want to get to the file name and path
Jochen Arndt 7-Jan-16 3:05am    
You should tell us which kind of dialog is used to select the files:
- Your own dialog,
- Windows Common Item Dialog,
- Windows GetOpenFileName Dialog, or
- MFC CFileDialog class

The best option is to edit your question using the green 'Improve question' link and add the code portions that show and execute the dialog.
Member 11562680 7-Jan-16 3:14am    
no any dialog.mouse Hook
Jochen Arndt 7-Jan-16 3:21am    
Global hook or for a specific window / application?

The usual method is to handle events on a specific window (e.g. one that shows a list of files). Then this window should know which file is at a clicked position.

1 solution

For dealing with that complicated issue it is better to work with the MFC CFileDialog class. Maybe you only need to overwrite the CFileDialog::OnItemSelected() function.

But my experience was, that it is tricky and you better stay near the Microsoft code.

Take also a look at this discussion on codeguru.
 
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