[BROWSEUI]

* Implement ParseNow to allow navigating to the current address in the editbox.

[SHELL32]
* Set the focus to the listview if the browser is requesting it.

CORE-7330

svn path=/branches/shell-experiments/; revision=63371
This commit is contained in:
David Quintana 2014-05-19 16:08:30 +00:00
parent 9276b066c7
commit 564f732c7c
4 changed files with 30 additions and 2 deletions

View file

@ -41,7 +41,8 @@ TODO:
CAddressEditBox::CAddressEditBox() :
fCombobox(NULL, this, 1),
fEditWindow(NULL, this, 1)
fEditWindow(NULL, this, 1),
fSite(NULL)
{
}
@ -69,6 +70,7 @@ HRESULT STDMETHODCALLTYPE CAddressEditBox::Init(HWND comboboxEx, HWND editContro
{
fCombobox.SubclassWindow(comboboxEx);
fEditWindow.SubclassWindow(editControl);
fSite = param18;
return S_OK;
}
@ -82,7 +84,28 @@ HRESULT STDMETHODCALLTYPE CAddressEditBox::SetCurrentDir(long paramC)
HRESULT STDMETHODCALLTYPE CAddressEditBox::ParseNow(long paramC)
{
return E_NOTIMPL;
WCHAR address[4096];
ULONG eaten;
LPITEMIDLIST pidl;
ULONG attributes;
HRESULT hr;
HWND topLevelWindow;
CComPtr<IShellBrowser> pisb;
hr = IUnknown_QueryService(fSite, SID_SShellBrowser, IID_PPV_ARG(IShellBrowser, &pisb));
IUnknown_GetWindow(pisb, &topLevelWindow);
GetWindowText(fCombobox.m_hWnd, address, 4095);
CComPtr<IShellFolder> psfDesktop;
hr = SHGetDesktopFolder(&psfDesktop);
hr = psfDesktop->ParseDisplayName(topLevelWindow, NULL, address, &eaten, &pidl, &attributes);
if (SUCCEEDED(hr))
{
hr = pisb->BrowseObject(pidl, 0);
}
return hr;
}
HRESULT STDMETHODCALLTYPE CAddressEditBox::Execute(long paramC)

View file

@ -35,6 +35,7 @@ class CAddressEditBox :
private:
CContainedWindow fCombobox;
CContainedWindow fEditWindow;
CComPtr<IUnknown> fSite;
public:
CAddressEditBox();
~CAddressEditBox();

View file

@ -860,6 +860,8 @@ HRESULT STDMETHODCALLTYPE CInternetToolbar::InitNew()
hResult = menuOleWindow->GetWindow(&fMenuBandWindow);
fMenuBar.Attach(menuBar.Detach()); // transfer the ref count
// FIXME: The ros Rebar does not properly support fixed-size items such as the brandband,
// and it will put them in their own row, sized to take up the whole row.
#if 0
/* Create and attach the brand/logo to the rebar */
hResult = CreateBrandBand(&logoBar);

View file

@ -1419,6 +1419,8 @@ void CDefView::DoActivate(UINT uState)
{
MergeFileMenu(mii.hSubMenu);
}
::SetFocus(m_hWndList);
}
TRACE("-- before fnSetMenuSB\n");