diff --git a/dll/win32/browseui/explorerband.cpp b/dll/win32/browseui/explorerband.cpp index 83b5d8c3396..071549ed312 100644 --- a/dll/win32/browseui/explorerband.cpp +++ b/dll/win32/browseui/explorerband.cpp @@ -149,6 +149,7 @@ CExplorerBand::CExplorerBand() , m_fVisible(FALSE) , m_bNavigating(FALSE) , m_dwBandID(0) + , m_isEditing(FALSE) , m_pidlCurrent(NULL) { } @@ -1217,6 +1218,9 @@ HRESULT STDMETHODCALLTYPE CExplorerBand::HasFocusIO() HRESULT STDMETHODCALLTYPE CExplorerBand::TranslateAcceleratorIO(LPMSG lpMsg) { + if (m_isEditing) + return S_FALSE; + if (lpMsg->hwnd == m_hWnd) { TranslateMessage(lpMsg); @@ -1314,7 +1318,10 @@ HRESULT STDMETHODCALLTYPE CExplorerBand::OnWinEvent(HWND hWnd, UINT uMsg, WPARAM hr = pParent->GetAttributesOf(1, &pChild, &dwAttr); if (SUCCEEDED(hr) && (dwAttr & SFGAO_CANRENAME) && theResult) + { *theResult = 0; + m_isEditing = TRUE; + } return S_OK; } case TVN_ENDLABELEDITW: @@ -1323,6 +1330,7 @@ HRESULT STDMETHODCALLTYPE CExplorerBand::OnWinEvent(HWND hWnd, UINT uMsg, WPARAM NodeInfo *info = GetNodeInfo(dispInfo->item.hItem); HRESULT hr; + m_isEditing = FALSE; if (theResult) *theResult = 0; if (dispInfo->item.pszText) diff --git a/dll/win32/browseui/explorerband.h b/dll/win32/browseui/explorerband.h index a4d5aa98666..6e48e944053 100644 --- a/dll/win32/browseui/explorerband.h +++ b/dll/win32/browseui/explorerband.h @@ -60,6 +60,7 @@ private: BOOL m_bNavigating; BOOL m_bFocused; DWORD m_dwBandID; + BOOL m_isEditing; HIMAGELIST m_hImageList; HTREEITEM m_hRoot; HTREEITEM m_oldSelected;