HRESULT FireCommandStateChange(bool newState, int commandID);
HRESULT FireCommandStateChangeAll();
HRESULT UpdateForwardBackState();
+ HRESULT UpdateUpState();
void UpdateGotoMenu(HMENU theMenu);
void UpdateViewMenu(HMENU theMenu);
FireCommandStateChangeAll();
hResult = UpdateForwardBackState();
+ hResult = UpdateUpState();
return S_OK;
}
LPITEMIDLIST newDirectory = ILClone(fCurrentDirectoryPIDL);
if (newDirectory == NULL)
return E_OUTOFMEMORY;
+ if (_ILIsDesktop(newDirectory))
+ {
+ ILFree(newDirectory);
+ return E_INVALIDARG;
+ }
ILRemoveLastID(newDirectory);
HRESULT hResult = BrowseToPIDL(newDirectory, BTP_UPDATE_CUR_HISTORY | BTP_UPDATE_NEXT_HISTORY);
ILFree(newDirectory);
return S_OK;
}
+HRESULT CShellBrowser::UpdateUpState()
+{
+ bool canGoUp;
+ HRESULT hResult;
+
+ canGoUp = true;
+ if (_ILIsDesktop(fCurrentDirectoryPIDL))
+ canGoUp = false;
+ hResult = FireCommandStateChange(canGoUp, 3);
+ return S_OK;
+}
+
void CShellBrowser::UpdateGotoMenu(HMENU theMenu)
{
CComPtr<ITravelLog> travelLog;