Author: cwittich Date: Tue Jul 31 03:27:52 2007 New Revision: 28052
URL: http://svn.reactos.org/svn/reactos?rev=28052&view=rev Log: don't allow renaming of root keys See issue #2508 for more details.
Modified: trunk/reactos/base/applications/regedit/childwnd.c
Modified: trunk/reactos/base/applications/regedit/childwnd.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/c... ============================================================================== --- trunk/reactos/base/applications/regedit/childwnd.c (original) +++ trunk/reactos/base/applications/regedit/childwnd.c Tue Jul 31 03:27:52 2007 @@ -506,6 +506,16 @@ 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;