mirror of
https://github.com/reactos/reactos.git
synced 2025-02-28 19:32:59 +00:00
[REGEDIT] Block tree label edit if the delete accelerator has been pressed (#7610)
This commit is contained in:
parent
a97fcf19ec
commit
087979eeb9
1 changed files with 8 additions and 0 deletions
|
@ -668,6 +668,8 @@ BOOL TreeWndNotifyProc(HWND hWnd, WPARAM wParam, LPARAM lParam, BOOL *Result)
|
|||
case TVN_BEGINLABELEDIT:
|
||||
{
|
||||
LPNMTVDISPINFO ptvdi = (LPNMTVDISPINFO)lParam;
|
||||
HWND hWndFocus = GetFocus();
|
||||
|
||||
/* cancel label edit for rootkeys */
|
||||
if (!TreeView_GetParent(g_pChildWnd->hTreeWnd, ptvdi->item.hItem) ||
|
||||
!TreeView_GetParent(g_pChildWnd->hTreeWnd, TreeView_GetParent(g_pChildWnd->hTreeWnd, ptvdi->item.hItem)))
|
||||
|
@ -678,6 +680,12 @@ BOOL TreeWndNotifyProc(HWND hWnd, WPARAM wParam, LPARAM lParam, BOOL *Result)
|
|||
{
|
||||
*Result = FALSE;
|
||||
}
|
||||
|
||||
/* cancel label edit if VK_DELETE accelerator opened a MessageBox */
|
||||
if (hWndFocus != g_pChildWnd->hTreeWnd && hWndFocus != TreeView_GetEditControl(g_pChildWnd->hTreeWnd))
|
||||
{
|
||||
*Result = TRUE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
case TVN_ENDLABELEDIT:
|
||||
|
|
Loading…
Reference in a new issue