[DEVMGMT]

- Set the focus for the treeview when the main window gets the focus.
- Select the root item after the devices tree has been built.
These changes enable the user to navigate the device tree using the keyboard.

svn path=/trunk/; revision=51715
This commit is contained in:
Eric Kohl 2011-05-13 21:09:56 +00:00
parent 7da47d32de
commit 8c50d36968
2 changed files with 9 additions and 0 deletions

View file

@ -415,6 +415,9 @@ ListDevicesByType(HWND hTreeView,
(void)TreeView_SortChildren(hTreeView,
hRoot,
0);
(void)TreeView_SelectItem(hTreeView,
hRoot);
}

View file

@ -550,7 +550,13 @@ MainWndProc(HWND hwnd,
/* Show the window */
ShowWindow(hwnd,
Info->nCmdShow);
}
break;
case WM_SETFOCUS:
{
if (Info->hTreeView != NULL)
SetFocus(Info->hTreeView);
}
break;