Discussion:
IExplorerPaneVisibility problems in Vista
(too old to reply)
Antti Nivala
2006-12-13 10:31:38 UTC
Permalink
The folder object of my NSE implements the IExplorerPaneVisibility interface
to give suggestions to the view about what panes are visible. Things are
working fine most of the time but I have some problems. The normal sequence
in panes control goes as follows:

- A pane queries an IFolderView interface pointer to the current view object
in the browser.

- IFolderView::GetFolder is called to get an IExplorerPaneVisibility
interface pointer to a folder object.

- The GetPaneState method of IExplorerPaneVisibility is called to determine
the state of the pane.

PROBLEMS:

1. My NSE does not want to show the Details pane. When the user goes from a
folder outside of my NSE to a folder of my NSE, my GetPaneState
implementation is not called for the Details pane (EP_DetailsPane), causing
the Details pane to be shown. It is only called for certain panes such as
EP_QueryPane and AdvQueryPane. However, when the previous folder view is
mine and the user continues to another folder inside my NSE, my GetPaneState
implementation is called for the Details pane and I can hide it. How can I
hide the Details pane in the first case, too?

2. There seems to be no way of hiding the Search Box pane (EP_QueryPane).
Specifying (EPS_DEFAULT_OFF | EPS_FORCE) in my GetPaneState implementation
has no effect. How can I hide the Search Box pane?

Antti
Walter Wang [MSFT]
2006-12-14 03:36:31 UTC
Permalink
Hi Antti,

I just tried to add IExplorerPaneVisibility to the sample
ExplorerDataProvider in Vista SDK (C:\Program Files\Microsoft
SDKs\Windows\v6.0\Samples\winui\Shell\ShellExtensibility\ExplorerDataProvide
r\FolderViewImpl.sln), it seems the Details pane can be turned off when I
first navigate to the namespace extension. Would you please try that out in
the sample too?

As for the EP_QueryPane, in this same example, it does seems to have some
problem to turn it on or off in GetPaneState. I'll do more research and get
back to you later. Thank you for your patience and understanding.

Sincerely,
Walter Wang (***@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications. If you are using Outlook Express, please make sure you clear the
check box "Tools/Options/Read: Get 300 headers at a time" to see your reply
promptly.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
Walter Wang [MSFT]
2006-12-15 07:11:04 UTC
Permalink
Hi Antti,

To turn on/off the EP_QueryPane and EP_AdvQueryPane, you will have to use
following combination:


IFACEMETHODIMP CMyFolder::GetPaneState(REFEXPLORERPANE ep, __out
EXPLORERPANESTATE *peps)
{
HRESULT hr = S_OK;
*peps = EPS_DONTCARE;
if (EP_QueryPane == ep || EP_AdvQueryPane == ep)
{
*peps = EPS_DEFAULT_OFF | EPS_INITIALSTATE;
}
return hr;
}

Let me know if this works for you.


Regards,
Walter Wang (***@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
Antti Nivala
2006-12-15 21:38:09 UTC
Permalink
Thanks for your help, Walter.

However, the ExplorerDataProvider sample you are using uses DefView to set
up the view. It does not create its own view object that would implement
IShellView, IShellView2, IFolderView etc. for managing the view. This is a
very big difference. My NSE is using our own view object and it implements
these interfaces.

The problem is how to force the browser/view not to display the Details pane
when the user first navigates to my NSE that is using an _own_ view object.
My GetPaneState implementation is not called for EP_DetailsPane in this
case. It is correctly called for EP_DetailsPane when the user continues to
navigate to some subfolder inside my NSE and then the Details pane is not
shown as the result.

For testing purposes, I have also tried to use the DefView object in my NSE.
When it is used, the Details pane is turned off in all cases by using the
same GetPaneState implementation. So using or not using DefView seems to
make a difference in this case. I need to get it to work with our own view
object.

I am not able to hide the Search Box pane (EP_QueryPane) as you did although
I return
(EPS_DEFAULT_OFF | EPS_INITIALSTATE), even if I use DefView. I have also
tried to return (EPS_DEFAULT_OFF | EPS_FORCE) and (EPS_DEFAULT_OFF |
EPS_INITIALSTATE | EPS_FORCE) without luck.

To summarize, my questions are:

1. Can you hide the Details pane when using an _own_ view object?

2. Are you sure you managed to hide the Search Box pane? It is the pane that
is located at the top right corner for quick-searching the folder view.

Antti
Walter Wang [MSFT]
2006-12-18 03:25:49 UTC
Permalink
Hi Antti,

No, the top right corner for quick-searching the folder view is not the
Query pane, the Query pane is under the menu bar; Try to use EPS_DEFAULT_ON
| EPS_INITIALSTATE to turn on the query pane to see where it's located. I'm
not aware of a way to turn off the top-right corner quick-searching box.

As for the details pane, let's summarize the question again to make sure
we're on the same page:
1) You're not using DefView
2) You implemented IFolderView for your shell view to return
IExplorerPaneVisibility implementation
3) You implemented IExplorerPaneVisibility for your shell folder, the
GetPaneState didn't get called when user navigate to your NSE for the first
time.

I'm currently consulting your question with product team, I'll get back to
you as soon as I get updated information on it. Thank you for your patience
and understanding.


Regards,
Walter Wang (***@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
Antti Nivala
2006-12-18 10:23:36 UTC
Permalink
Okay, the Query pane is not what we expected. We supposed that EP_QueryPane
is the Search Box pane and EP_AdvQueryPane is entirely the Search pane shown
in the menu bar. But the Search pane is divided to EP_QueryPane and
EP_AdvQueryPane. By returning (EPS_DEFAULT_ON | EPS_INITIALSTATE) or
(EPS_DEFAULT_OFF | EPS_INITIALSTATE) for these two panes, we can show or
hide them.

The summary information that you provided on the Details pane is correct. It
is exactly what our problem is. Hopefully you will get us updated
information soon.

Thanks for your help.

Antti
Walter Wang [MSFT]
2006-12-19 05:41:21 UTC
Permalink
Hi Antti,

I will need more information from you to better troubleshoot the issue.

1) What's the NSE's data source? File system, virtual, remote?
2) Does the issue exist in explorer or common dialog?
3) Are you using classic mode? Is Aero turned on?
4) Is the folder tree open in navigation pane when the issue occurs?

If you could send me a binary drop of the extension, we can debug it to see
what went wrong.

As a side node, we only provided example on DefView since we want to
promote DefView to NSE programmers. Most developers have implemented a
custom view only because of constraints imposed on them in previous
releases and would benefit from moving to use DefView.


Regards,
Walter Wang (***@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
Antti Nivala
2006-12-19 10:50:19 UTC
Permalink
Answers:

1) File system (the junction point of our NSE is a file system folder).

2) The problem exists in Explorer only, not in common dialog boxes.

3) No for both. The option "Use Windows classic folders" is off in Folder
Options. My computer does even not meet the minimum harware requirements for
running Windows Aero.

NOTE: The problem does not appear when using classic mode.

4) It does not matter. The problem appears when the folder tree is open,
when it is closed down, or when the whole navigation pane is hidden (turned
off).

Walter, I can send the DLL and PDB files of our NSE to you by email. You
will see a download link and instructions in that email message.

As regards using DefView, I agree that promoting it to NSE developers is a
correct action. Using it is a preferred choice especially as it provides the
same and consistent look and feel for all applications, and implementing an
own view object is relatively laborious. However, implementing an own view
object is sometimes an only choice when an NSE application is targeted on
many platforms, or when that application uses special UI features which are
not possible by using the services of DefView. Because of this reason, it is
important that the features of DefView, especially the ones that affect look
and feel (i.e. list-view styles and themes), are made available for NSE
developers that uses an own view object. When these features are not
specific to DefView but are commonly available in libraries, implementing an
own view object is much easier and results in consistent applications.

Timo & Antti
Magnus
2007-01-08 13:46:35 UTC
Permalink
Post by Walter Wang [MSFT]
Hi Antti,
I will need more information from you to better troubleshoot the issue.
1) What's the NSE's data source? File system, virtual, remote?
2) Does the issue exist in explorer or common dialog?
3) Are you using classic mode? Is Aero turned on?
4) Is the folder tree open in navigation pane when the issue occurs?
If you could send me a binary drop of the extension, we can debug it to see
what went wrong.
As a side node, we only provided example on DefView since we want to
promote DefView to NSE programmers. Most developers have implemented a
custom view only because of constraints imposed on them in previous
releases and would benefit from moving to use DefView.
Regards,
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Any update on this issue?
I get the same behaviour in my NSE using a custom view.
Ie browsing from an explorer view to my custom view does not generate a
call to GetPaneState() with EP_DetailsPane and EP_PreviewPane, any
subsequent browsing inside my NS will get calls to GetPaneState() for
EP_DetailsPane and EP_PreviewPane.

Regards
/Magnus
Timo Partanen
2007-01-11 06:51:54 UTC
Permalink
Post by Magnus
Any update on this issue?
This behavior is a bug somewhere in the shell code. Microsoft has confirmed
this issue and the bug has been recorded in their bug database:
=====
"I debugged into it, unfortunately this relies on a sort of deferred
initialization that DefView handles but other views won't. In some places
in the code we account for non-DefViews but this GetPaneState call does not.
The result is that if you navigate to a non-DefView we'll be querying the
previous view for IExplorerPaneVisibility and not the one that's being
navigated to.

There is no public method to duplicate what DefView does from within the
custom view. However you can force a state reload shortly after the custom
view is created. After the view gets activated with IShellView::UIActivate,
you can fire a WM_SETTINGCHANGE message to the browser window
(IOleWindow::GetWindow can retrieve the browser window off of the view's
IShellBrowser pointer) with wparam == 0 and lparam == L"ShellState"."
=====

And about the deferred initialization:
=====
"For performance reasons we wait until after the view has been created to do
final adjustments on the visibility of the various panes. The signal to do
this (the deferred initialization) comes from the view and that's not
available publicly."
=====

You can use the suggested workaround (e.g. force a state reload) to avoid
this problem. I have verified it works in practice.

Regards,
Timo
Magnus
2007-01-11 09:34:56 UTC
Permalink
Post by Timo Partanen
Post by Magnus
Any update on this issue?
This behavior is a bug somewhere in the shell code. Microsoft has confirmed
=====
"I debugged into it, unfortunately this relies on a sort of deferred
initialization that DefView handles but other views won't. In some places
in the code we account for non-DefViews but this GetPaneState call does not.
The result is that if you navigate to a non-DefView we'll be querying the
previous view for IExplorerPaneVisibility and not the one that's being
navigated to.
There is no public method to duplicate what DefView does from within the
custom view. However you can force a state reload shortly after the custom
view is created. After the view gets activated with IShellView::UIActivate,
you can fire a WM_SETTINGCHANGE message to the browser window
(IOleWindow::GetWindow can retrieve the browser window off of the view's
IShellBrowser pointer) with wparam == 0 and lparam == L"ShellState"."
=====
=====
"For performance reasons we wait until after the view has been created to do
final adjustments on the visibility of the various panes. The signal to do
this (the deferred initialization) comes from the view and that's not
available publicly."
=====
You can use the suggested workaround (e.g. force a state reload) to avoid
this problem. I have verified it works in practice.
Regards,
Timo
Thanks,
i will try that.

I started to go down another route, i found out that if i supported
QueryService() for IPropertyBag and returned FALSE for these 2
properties "PreviewPaneSizer_Visible" and "ReadingPaneSizer_Visible"
the panes would not show up in my view.

Regards
Magnus

Loading...