diff --git a/TrafficMonitor/CommonData.h b/TrafficMonitor/CommonData.h index fa0b93d5e..945241258 100644 --- a/TrafficMonitor/CommonData.h +++ b/TrafficMonitor/CommonData.h @@ -155,6 +155,7 @@ struct PublicSettingData bool hide_unit; //隐藏单位 bool hide_percent; //隐藏百分号 DoubleClickAction double_click_action; //鼠标双击动作 + wstring double_click_exe; //鼠标双击动作为4时,打开的程序路径,默认任务管理器 }; #define MAIN_WND_COLOR_NUM 4 //主窗口颜色数量 diff --git a/TrafficMonitor/TaskBarDlg.cpp b/TrafficMonitor/TaskBarDlg.cpp index 37a854060..ed2d0ed34 100644 --- a/TrafficMonitor/TaskBarDlg.cpp +++ b/TrafficMonitor/TaskBarDlg.cpp @@ -701,7 +701,7 @@ void CTaskBarDlg::OnLButtonDblClk(UINT nFlags, CPoint point) SendMessage(WM_COMMAND, ID_OPTIONS2); //双击后弹出“选项设置”对话框 break; case DoubleClickAction::TASK_MANAGER: - ShellExecuteW(NULL, _T("open"), (theApp.m_system_dir+L"\\Taskmgr.exe").c_str(), NULL, NULL, SW_NORMAL); //打开任务管理器 + ShellExecuteW(NULL, _T("open"), (theApp.m_taskbar_data.double_click_exe).c_str(), NULL, NULL, SW_NORMAL); //打开指定程序,默认任务管理器 break; default: break; diff --git a/TrafficMonitor/TrafficMonitor.cpp b/TrafficMonitor/TrafficMonitor.cpp index 07eb3fcdc..661a5dea7 100644 --- a/TrafficMonitor/TrafficMonitor.cpp +++ b/TrafficMonitor/TrafficMonitor.cpp @@ -128,6 +128,7 @@ void CTrafficMonitorApp::LoadConfig() m_taskbar_data.separate_value_unit_with_space = ini.GetBool(_T("task_bar"), _T("separate_value_unit_with_space"), true); m_taskbar_data.digits_number = ini.GetInt(_T("task_bar"), _T("digits_number"), 4); m_taskbar_data.double_click_action = static_cast(ini.GetInt(_T("task_bar"), _T("double_click_action"), 0)); + m_taskbar_data.double_click_exe = ini.GetString(L"task_bar", L"double_click_exe", (theApp.m_system_dir + L"\\Taskmgr.exe").c_str()); //其他设置 m_cfg_data.m_show_internet_ip = ini.GetBool(L"connection_details", L"show_internet_ip", false);