don't allow renaming of root keys

See issue #2508 for more details.

svn path=/trunk/; revision=28052
This commit is contained in:
Christoph von Wittich 2007-07-30 23:27:52 +00:00
parent b430b691ac
commit fd37f2607a

View file

@ -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;