comctl32/treeview: Send TVN_KEYDOWN in response of WM_KEYDOWN.

This commit is contained in:
Nikolay Sivov 2014-06-04 00:46:31 +04:00 committed by Alexandre Julliard
parent 3f8bda94fc
commit a7fb6c89b3
2 changed files with 7 additions and 3 deletions

View File

@ -206,7 +206,7 @@ static const struct message parent_expand_seq[] = {
};
static const struct message parent_expand_kb_seq[] = {
{ WM_NOTIFY, sent|id|optional, 0, 0, TVN_KEYDOWN },
{ WM_NOTIFY, sent|id, 0, 0, TVN_KEYDOWN },
{ WM_NOTIFY, sent|id, 0, 0, TVN_ITEMEXPANDINGA },
{ WM_NOTIFY, sent|id, 0, 0, TVN_ITEMEXPANDEDA },
{ WM_CHANGEUISTATE, sent|optional },
@ -221,7 +221,7 @@ static const struct message parent_collapse_2nd_kb_seq[] = {
};
static const struct message parent_expand_empty_kb_seq[] = {
{ WM_NOTIFY, sent|id|optional, 0, 0, TVN_KEYDOWN },
{ WM_NOTIFY, sent|id, 0, 0, TVN_KEYDOWN },
{ WM_CHANGEUISTATE, sent|optional },
{ 0 }
};

View File

@ -5201,11 +5201,15 @@ TREEVIEW_KeyDown(TREEVIEW_INFO *infoPtr, WPARAM wParam)
{
/* If it is non-NULL and different, it will be selected and visible. */
TREEVIEW_ITEM *newSelection = NULL;
TREEVIEW_ITEM *prevItem = infoPtr->selectedItem;
NMTVKEYDOWN nmkeydown;
TRACE("%lx\n", wParam);
nmkeydown.wVKey = wParam;
nmkeydown.flags = 0;
TREEVIEW_SendRealNotify(infoPtr, TVN_KEYDOWN, &nmkeydown.hdr);
if (prevItem == NULL)
return FALSE;