|
|
@@ -274,6 +274,16 @@ void CMainWnd::Notify(TNotifyUI& msg)
|
|
|
m_IsKuaijiejian = false;
|
|
|
}
|
|
|
}
|
|
|
+ else if (msg.sType == _T("setfocus"))
|
|
|
+ {
|
|
|
+ CDuiString name = msg.pSender->GetName();
|
|
|
+ std::wstring senderName = name;
|
|
|
+
|
|
|
+ if (senderName == L"diandan_food_search_edit")
|
|
|
+ {
|
|
|
+ this->ShowSystemKeyboard();
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
void CMainWnd::HandleClickMsg(TNotifyUI& msg)
|
|
|
@@ -2013,4 +2023,48 @@ void CMainWnd::UpdateRegisterHotKey()
|
|
|
UnregisterHotKey(m_hWnd, WM_MYHOTKEY_SHOUKUAN);
|
|
|
|
|
|
RegisterHotKey(m_hWnd, WM_MYHOTKEY_SHOUKUAN, shoukuan_mod, shoukuan_vk);
|
|
|
+}
|
|
|
+
|
|
|
+void CMainWnd::ShowSystemKeyboard()
|
|
|
+{
|
|
|
+ const DWORD windowsMajorVersion = CSystem::GetWindowsMajorVersion();
|
|
|
+
|
|
|
+ if (windowsMajorVersion >= 10)
|
|
|
+ {
|
|
|
+ const std::wstring touchKeyboardPath = CSystem::GetTouchKeyboardPath();
|
|
|
+
|
|
|
+ if (!touchKeyboardPath.empty() &&
|
|
|
+ CSystem::IsFileExist(touchKeyboardPath))
|
|
|
+ {
|
|
|
+ const HINSTANCE result = ::ShellExecuteW(
|
|
|
+ m_hWnd,
|
|
|
+ L"open",
|
|
|
+ touchKeyboardPath.c_str(),
|
|
|
+ nullptr,
|
|
|
+ nullptr,
|
|
|
+ SW_SHOWNORMAL);
|
|
|
+
|
|
|
+ if (reinterpret_cast<INT_PTR>(result) > 32)
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ LOG_ERROR("TabTip.exe 启动失败,错误码: "
|
|
|
+ << reinterpret_cast<INT_PTR>(result));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ const HINSTANCE result = ::ShellExecuteW(
|
|
|
+ m_hWnd,
|
|
|
+ L"open",
|
|
|
+ L"C:\\Windows\\System32\\osk.exe",
|
|
|
+ nullptr,
|
|
|
+ nullptr,
|
|
|
+ SW_SHOWNORMAL);
|
|
|
+
|
|
|
+ if (reinterpret_cast<INT_PTR>(result) <= 32)
|
|
|
+ {
|
|
|
+ LOG_ERROR("osk.exe 启动失败,错误码: "
|
|
|
+ << reinterpret_cast<INT_PTR>(result));
|
|
|
+ }
|
|
|
}
|