diff --git a/reactos/base/applications/regedit/childwnd.c b/reactos/base/applications/regedit/childwnd.c index e5aef35c032..b283e437491 100644 --- a/reactos/base/applications/regedit/childwnd.c +++ b/reactos/base/applications/regedit/childwnd.c @@ -506,6 +506,16 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa case NM_SETFOCUS: pChildWnd->nFocusPanel = 0; break; + case TVN_BEGINLABELEDIT: + { + LPNMTVDISPINFO ptvdi; + /* cancel label edit for rootkeys */ + ptvdi = (LPNMTVDISPINFO) lParam; + if (!TreeView_GetParent(pChildWnd->hTreeWnd, ptvdi->item.hItem) || + !TreeView_GetParent(pChildWnd->hTreeWnd, TreeView_GetParent(pChildWnd->hTreeWnd, ptvdi->item.hItem))) + return TRUE; + break; + } case TVN_ENDLABELEDIT: { LPCTSTR keyPath;