Set the focus to the treeview when the main window recieves a WM_ACTIVATE message.
CORE-10769 #resolve #comment Fixed in r70560.

svn path=/trunk/; revision=70560
This commit is contained in:
Eric Kohl 2016-01-09 22:22:17 +00:00
parent 2a5c5c0c76
commit 496764ad58
3 changed files with 14 additions and 1 deletions

View file

@ -291,6 +291,7 @@ CDeviceView::DisplayPropertySheet()
void
CDeviceView::SetFocus()
{
::SetFocus(m_hTreeView);
}
bool

View file

@ -667,6 +667,12 @@ CDeviceManager::OnCommand(_In_ WPARAM wParam,
return RetCode;
}
void
CDeviceManager::OnActivate(void)
{
m_DeviceView->SetFocus();
}
LRESULT
CDeviceManager::OnDestroy(void)
{
@ -822,7 +828,11 @@ CDeviceManager::MainWndProc(_In_ HWND hwnd,
DestroyWindow(hwnd);
break;
}
case WM_ACTIVATE:
if (LOWORD(hwnd))
This->OnActivate();
break;
case WM_DESTROY:
{

View file

@ -66,6 +66,8 @@ private:
LPARAM lParam
);
void OnActivate(void);
bool CreateToolBar(void);
bool CreateStatusBar(void);