Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Detecting F5 refresh from namespace extension

94 views
Skip to first unread message

mkuzmin

unread,
May 6, 2010, 9:59:16 AM5/6/10
to
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

bviksoe

unread,
May 8, 2010, 4:50:21 AM5/8/10
to

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

unread,
May 11, 2010, 10:22:31 AM5/11/10
to
Well that is what we currently do - return the current cache. But the required
logic on refresh (and we are doing it when we get it) is to erase the cache and
retrieve it again from server thus achieving a refresh.
A refresh that just does a repaint on screen is not very useful feature (unless
UI has a lot of drawing problems which shell UI does not). Refresh that actually
refresh the information from server is what needed but for some reason tree view
does not do it.
A workaround/hack would be to handle F5 keyboard event in GetMessage hook but I
am hoping for something nicer.
0 new messages