Re: how to get selected file path using global mouse hook.
<bhushan.kalse@gmail.com> wrote:
For now, lets narrow down the problem for Windows Explorer
only.
Actually, Windows Explorer implements rich set of COM
interfaces that you can use. Search for "ShellFolderView"
with Google for samples. Also, you may ask in
microsoft.public.platformsdk.shell group for more details.
This article
"Automate the Active Windows Explorer or Internet Explorer
Window"
http://www.codeproject.com/shell/AutomateShellWindow.asp
contains sample code how to connect to active Windows
Explorer window. Then you can connect to its events and
receive a notification each time that selection changes in
folder view.
In Windows Explorer, if you select one or more
files/folders you can
see text "n objects selected" on the left side of
statusbar at the
bottom. That means Explorer understands that 'n'
files/folders have
been selected.
Of course Windows Explorer understands how many files are
selected. It's the same program after all.
Can I peek into this by some way to get what files are
currently
selected (I need their path). As, this appears only when
user selectes
files/folder.
I'm not sure what is the task you're trying to solve, but
maybe writing a shell extention is what you need.
Alex