Click here to Skip to main content
15,308,835 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi have a good time
i work with visual c++ 2010 MFC
how can i get path of file that we clicked on?
when a user is double clicking on a file in "explorer" program, the file will open and run. now i need a code to get path of that file.
thank you.

thanks a lot
god with you
Posted
Updated 18-Nov-11 19:35pm
v2
Comments
E.F. Nijboer 9-Nov-11 6:41am
   
Clicked on where, what? Not very clear what you are trying to do.
[no name] 13-Nov-11 2:57am
   
when a user is double clicking on a file in "explorer" program, the file will open and run. now i need a code to get path of that file.
thank you.

1 solution

If the file type is registered to your application, the double-clicking in explorer will pass the file (and path) to your application as a command line argument.

Some references:
http://msdn.microsoft.com/en-us/library/zaydx040.aspx[^]
http://msdn.microsoft.com/en-us/library/zatkyh2a%28v=VS.100%29.aspx[^]
   
Comments
[no name] 31-Oct-12 17:29pm
   
no the file is not registered in my app.
i just want the path of the file.
thanks again

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