Discussion:
Detecting F5 refresh from namespace extension
(too old to reply)
mkuzmin
2010-05-06 13:59:16 UTC
Permalink
Raw Message
Hello,

We have a windows namepace extension. I have a problem on windows 7 wit
getting refresh on F5 when the focus is on tree view. My Shell view implement
IOleCommandTarget.

I am receiving Refresh through Exec method when Refresh is selected in the Vie
menu or Refresh button is clicked in the address bar. But if the focus is insid
the navigation pane (tree view) and I press F5 I don't get called. If the focu
is inside list view (my custom shell view) everything is fine and I do ge
Refresh. If the focus is inside address bar or even Search field I still get F
refresh.

What can I do to get the Refresh on F5 when the focus is in tree view?

Thank you,
Max
bviksoe
2010-05-08 08:50:21 UTC
Permalink
Raw Message
Post by mkuzmin
Hello,
We  have a windows namepace extension. I have a problem on windows 7 with
getting refresh on F5 when the focus is on tree view. My Shell view implements
IOleCommandTarget.
I am receiving Refresh through Exec method when Refresh is selected in the View
menu or Refresh button is clicked in the address bar. But if the focus is inside
the navigation pane (tree view) and I press F5 I don't get called. If the focus
is inside list view (my custom shell view) everything is fine and I do get
Refresh. If the focus is inside address bar or even Search field I still get F5
refresh.
What can I do to get the Refresh on F5 when the focus is in tree view?
Thank you,
Max
Hi,

At least in Windows 7, you won't get a signal even from the old
IShellFolderViewCB callback route (with the undocumented
SFVM_LISTREFRESHED /17 message).
But it appears that the Shell isn't actually refreshing your view. If
you examine the SHCONTF flags on the IShellFolder::EnumObjects call
after an F5 keypress, it indicates that it is merely updating the tree
(with SHCONTF_NAVIGATION_ENUM). Perhaps you can safely return your
existing folders cache?

regards
bjarke
mkuzmin
2010-05-11 14:22:31 UTC
Permalink
Raw Message
Post by mkuzmin
Hello,
We have a windows namepace extension. I have a problem on windows 7 with
getting refresh on F5 when the focus is on tree view. My Shell vie
implements
Post by mkuzmin
IOleCommandTarget.
I am receiving Refresh through Exec method when Refresh is selected in th
View
Post by mkuzmin
menu or Refresh button is clicked in the address bar. But if the focus is
inside the navigation pane (tree view) and I press F5 I don't get called. If
the focus is inside list view (my custom shell view) everything is fine an
I
Post by mkuzmin
do get Refresh. If the focus is inside address bar or even Search field
still
Post by mkuzmin
get F5 refresh.
What can I do to get the Refresh on F5 when the focus is in tree view?
Thank you,
Max
Well that is what we currently do - return the current cache. But the require
logic on refresh (and we are doing it when we get it) is to erase the cache an
retrieve it again from server thus achieving a refresh.
A refresh that just does a repaint on screen is not very useful feature (unles
UI has a lot of drawing problems which shell UI does not). Refresh that actuall
refresh the information from server is what needed but for some reason tree vie
does not do it.
A workaround/hack would be to handle F5 keyboard event in GetMessage hook but
am hoping for something nicer.

Loading...