Click here to Skip to main content
15,887,962 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi guys,

I want to implement an application which runs in the background and gets the information about whatever the file selected by the user. I searched an find out about the win32 API and my idea was to use mouse hooks to detect the mouse click event and then get the file information I want. This is a research project. My basic idea was to capture the file information which user wants to take a printout.
Maybe this is a broader topic. But I want to know whether can I detect a user selected file information using win32 API?

Any guidance would be appreciated! :-)

What I have tried:

I found this for detecting global mouse hooks.

globalmousekeyhook
Posted
Updated 11-Jan-18 7:15am
Comments
nv3 5-Jan-18 1:16am    
You will be facing the problem that the name on the screen usually is only the last part of the complete path name, for example only the filename. And without the full path name you won't be able to uniquely identify the file in the Win32 API.
Maciej Los 5-Jan-18 1:59am    
I'd suggest to capture information about actually printed file from print queue.
This might be helpful: A simple approach for controlling print jobs using WMI[^]
Dilan Shaminda 5-Jan-18 9:27am    
@nv3 do you know any useful books or examples that I can refer to?
Dilan Shaminda 5-Jan-18 9:28am    
@Maciej Thank you for the link. I will go through it :-) So to do this only using the win32 API would be difficult right?

1 solution

Maybe you could use Common Item Dialog.
It "Supports caller notification of events within the dialog, such as selection change or file type change. Also enables the calling process to hook certain events in the dialog, such as the parsing."
 
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