mirror of
https://github.com/reactos/reactos.git
synced 2025-06-13 04:28:30 +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:
|
case TVN_BEGINLABELEDIT:
|
||||||
{
|
{
|
||||||
LPNMTVDISPINFO ptvdi = (LPNMTVDISPINFO)lParam;
|
LPNMTVDISPINFO ptvdi = (LPNMTVDISPINFO)lParam;
|
||||||
|
HWND hWndFocus = GetFocus();
|
||||||
|
|
||||||
/* cancel label edit for rootkeys */
|
/* cancel label edit for rootkeys */
|
||||||
if (!TreeView_GetParent(g_pChildWnd->hTreeWnd, ptvdi->item.hItem) ||
|
if (!TreeView_GetParent(g_pChildWnd->hTreeWnd, ptvdi->item.hItem) ||
|
||||||
!TreeView_GetParent(g_pChildWnd->hTreeWnd, 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;
|
*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;
|
return TRUE;
|
||||||
}
|
}
|
||||||
case TVN_ENDLABELEDIT:
|
case TVN_ENDLABELEDIT:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue