From 7984eb187eec59c96ce661e85575ee2cbf5b386e Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 18 May 2012 23:03:19 +0000 Subject: fix for setting focus in tabSRMM git-svn-id: http://svn.miranda-ng.org/main/trunk@65 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Tabsrmm/src/hotkeyhandler.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'plugins/Tabsrmm/src/hotkeyhandler.cpp') diff --git a/plugins/Tabsrmm/src/hotkeyhandler.cpp b/plugins/Tabsrmm/src/hotkeyhandler.cpp index 98ab4172f9..d203e2fd4d 100644 --- a/plugins/Tabsrmm/src/hotkeyhandler.cpp +++ b/plugins/Tabsrmm/src/hotkeyhandler.cpp @@ -285,6 +285,10 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP if (IsIconic(pLastActiveContainer->hwnd) || !IsWindowVisible(pLastActiveContainer->hwnd)) { SendMessage(pLastActiveContainer->hwnd, WM_SYSCOMMAND, SC_RESTORE, 0); SetForegroundWindow(pLastActiveContainer->hwnd); + SetFocus(GetDlgItem(pLastActiveContainer->hwndActive, IDC_MESSAGE)); + } else if (GetForegroundWindow() != pLastActiveContainer->hwnd) { + SetForegroundWindow(pLastActiveContainer->hwnd); + SetFocus(GetDlgItem(pLastActiveContainer->hwndActive, IDC_MESSAGE)); } else { if(PluginConfig.m_HideOnClose) ShowWindow(pLastActiveContainer->hwnd, SW_HIDE); @@ -529,7 +533,7 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP CSkin::initAeroEffect(); break; } - + /* * user has changed the visual style or switched to/from * classic Windows theme -- cgit v1.2.3