Skip to content

Commit aa1971d

Browse files
committed
为任务栏窗口设置标题,以便被FindWindow识别
1 parent b68bb1c commit aa1971d

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

TrafficMonitor/TaskBarDlg.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1279,6 +1279,7 @@ BOOL CTaskBarDlg::OnInitDialog()
12791279
CDialogEx::OnInitDialog();
12801280

12811281
// TODO: 在此添加额外的初始化
1282+
SetWindowText(TASKBAR_WINDOW_NAME);
12821283
// 检测系统是否安装了 MicrosoftWindows.Client.WebExperience (aka Windows Web Experience Pack)
12831284
theApp.m_taskbar_data.is_windows_web_experience_detected =
12841285
WindowsWebExperienceDetector::IsDetected();

TrafficMonitor/stdafx.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ using std::ofstream;
9090
#define WARN_INSERT_TO_TASKBAR_CNT 20 //尝试嵌入任务栏的警告次数
9191

9292
#define APP_NAME _T("TrafficMonitor")
93+
#define TASKBAR_WINDOW_NAME _T("TrafficMonitorTaskbarWindow")
9394
#define APP_CLASS_NAME _T("TrafficMonitor_r7XZaS4p") //程序主窗口的类名
9495
#define VERSION L"1.85"
9596

0 commit comments

Comments
 (0)