I can access the right pane of the Windows Explorer in XP ( 32 bit ) , by
getting the handle to the "SysListView32" .
But in Windows 7 , the window class for the right hand side of the Windows
Explorer is DirectUIHWND. I have used Spy++ to see the child windows, but I
only find ControlNotifySink .
Any idea how do I get the list view .
Thanks in advance
Sujay
--
Sujay Ghosh
MSN : sujay...@hotmail.com
There isn't one any more. It seems that Microsoft has reimplemented
DefView using DirectUI (the undocumented user interface engine used by
the Common Tasks pane in XP, amongst other things).
- Jim
Thanks for sharing the info .
But I think one can access the DirectUIHWND internals , and find the list
view from their. I am doing some R&D , and shall post once I get over it .
I see a light .. not enough to brighten up the tunnel now ..:-)
Sujay
"Jim Barry" <j...@mvps.org> wrote in message
news:ecohIc5...@TK2MSFTNGP04.phx.gbl...
It is likely too late for you but the solution I found might help somebody
else. The following code allows you to make Windows Explorer on Windows 7 use
the good old SysListView32 control rather than DirectUIHWND. This fixed my
compatibility problem. In a nutshell, it uses the new Windows 7 interface
IFolderViewOptions to enable the option FVO_VISTALAYOUT. You need to compile
with version 7.0 of the SDK to do this.
void RevertExplorerToListView(HWND explorerHandle)
{
IShellWindows *shellWindow;
if (SUCCEEDED(CoCreateInstance(CLSID_ShellWindows,
NULL,
CLSCTX_ALL,
IID_IShellWindows,
reinterpret_cast<void**>(&shellWindow))))
{
VARIANT v;
V_VT(&v) = VT_I4;
IDispatch *dispatch;
BOOL found = FALSE;
for (V_I4(&v) = 0 ; !found && shellWindow->Item(v, &dispatch) == S_OK ;
V_I4(&v)++)
{
IWebBrowserApp *browserApp;
if (SUCCEEDED(dispatch->QueryInterface(IID_IWebBrowserApp,
reinterpret_cast<void**>(&browserApp))))
{
HWND appHandle;
if
(SUCCEEDED(browserApp->get_HWND(reinterpret_cast<LONG_PTR*>(&appHandle))) &&
appHandle == explorerHandle)
{
found = TRUE;
IServiceProvider *provider;
if (SUCCEEDED(browserApp->QueryInterface(IID_IServiceProvider,
reinterpret_cast<void**>(&provider))))
{
IShellBrowser *browser;
if (SUCCEEDED(provider->QueryService(SID_STopLevelBrowser,
IID_IShellBrowser,
reinterpret_cast<void**>(&browser))))
{
IFolderViewOptions *options;
if
(SUCCEEDED(browser->QueryInterface(IID_IFolderViewOptions,
reinterpret_cast<void**>(&options))))
{
if
(FAILED(options->SetFolderViewOptions(FVO_VISTALAYOUT,
FVO_VISTALAYOUT)))
{
TRACE("SetFolderViewOptions failed");
}
options->Release();
}
browser->Release();
}
provider->Release();
}
}
browserApp->Release();
}
}
shellWindow->Release();
}
}
Nathalie
Nathalie
Sujay Ghosh wrote:
How to get the right hand pane ( DirectUIHWND ) in Windows 7
16-Nov-09
Hello ,
Thanks in advance
Sujay
--
Sujay Ghosh
MSN : sujay...@hotmail.com
Previous Posts In This Thread:
On Monday, November 16, 2009 12:56 PM
Sujay Ghosh wrote:
How to get the right hand pane ( DirectUIHWND ) in Windows 7
Hello ,
Thanks in advance
Sujay
--
Sujay Ghosh
MSN : sujay...@hotmail.com
On Tuesday, November 17, 2009 10:02 AM
Jim Barry wrote:
Sujay Ghosh wrote:There is not one any more.
Sujay Ghosh wrote:
There is not one any more. It seems that Microsoft has reimplemented
DefView using DirectUI (the undocumented user interface engine used by
the Common Tasks pane in XP, amongst other things).
- Jim
On Tuesday, November 17, 2009 2:26 PM
Sujay Ghosh wrote:
Hello Jim,Thanks for sharing the info .
Hello Jim,
Thanks for sharing the info .
But I think one can access the DirectUIHWND internals , and find the list
view from their. I am doing some R&D , and shall post once I get over it .
I see a light .. not enough to brighten up the tunnel now ..:-)
Sujay
Submitted via EggHeadCafe - Software Developer Portal of Choice
WPF Report Engine, Part 4
http://www.eggheadcafe.com/tutorials/aspnet/5ac799db-385f-431a-8a45-8b37cb7f3186/wpf-report-engine-part-4.aspx