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 void
CDeviceView::SetFocus() CDeviceView::SetFocus()
{ {
::SetFocus(m_hTreeView);
} }
bool bool

View file

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

View file

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