For Programmers: Free Programming Magazines  


Home > Archive > VC Language > June 2005 > How to get selected files Filename and full path?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author How to get selected files Filename and full path?
Kerem Gümrükcü

2005-06-01, 4:00 am

Hi,

i am working on a kind of protection application that
must react when a user selects (only hover resp. mark, not execute!) a file
that in turn will be market as selected. I
need to find out the files full path and name. How can i
do this. Is there a WM_ Message or equal available
for this? Systemwide Windows Hook?

How can this be accomplished.....? :-)

Thanks in advance...


Kerem Gümrükcü


Scott McPhillips [MVP]

2005-06-01, 4:03 pm

Kerem Gümrükcü wrote:

> Hi,
>
> i am working on a kind of protection application that
> must react when a user selects (only hover resp. mark, not execute!) a file
> that in turn will be market as selected. I
> need to find out the files full path and name. How can i
> do this. Is there a WM_ Message or equal available
> for this? Systemwide Windows Hook?
>
> How can this be accomplished.....? :-)
>
> Thanks in advance...
>
>
> Kerem Gümrükcü
>
>


Hovers where? A control in your program? Some other window in some
other program?

--
Scott McPhillips [VC++ MVP]

Kerem Gümrükcü

2005-06-01, 4:03 pm

Hi Scott,

hovers over a file in "any" explorer window. As i told before,
i must intercept this hover and get the Filename and the Files
full path, res. like virusscanners do.


Best Regards

Kerem Gümrükcü


andré m.a

2005-06-01, 8:59 pm


> Hi Scott,
>
> hovers over a file in "any" explorer window. As i told before,
> i must intercept this hover and get the Filename and the Files
> full path, res. like virusscanners do.
>
>
> Best Regards
>
> Kerem Gümrükcü


the "hover" is a timed event handled by the process that
displays the file icons. Sometimes it may pop a tooltip.
Usualy you're dealing with a control of type ListView .
And if you want to intercept info during the hover,
it means you need to subclass the right window for a WM_NOTIFY.

basicaly you'd need to figure out if the cursor is over a
listview or somesuch. Perhaps after you intercept the
WM_NOTIFY you can study the diffrent possibilities
for WPARAM and LPARAM and see if there's a way
to reverse a file path or a tooltip text that contains a file path.

there are fonctionalities to detect a file being opened but i've
never heard of a API that reverses a listview item to a filepath.

good luck.







Kerem Gümrükcü

2005-06-02, 4:02 am

Dear andre,

thanks for the comprehnsive answer, but this is not
what i am looking for. i need to catch events like
a mouse hover over a file in resp. the Windows Explorer.
Treeviews and listviews and similiar are not a match.
I think i have to deal with systemlevel hooks, and
other systemwide hooks, that can provide me with the
desired information.


Best Regards

Kerem Gümrükcü


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com