Skip to content

Commit 0c5e86e

Browse files
committed
修正更换皮肤时不透明度不正常的问题
1 parent 990e32a commit 0c5e86e

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

TrafficMonitor/TrafficMonitorDlg.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2424,12 +2424,9 @@ void CTrafficMonitorDlg::OnChangeSkin()
24242424
Invalidate(FALSE); //更换皮肤后立即刷新窗口信息
24252425
//重新设置WS_EX_LAYERED样式,以解决在png皮肤和bmp皮肤之间切换时显示不正常的问题
24262426
//清除窗口的分层样式
2427-
LONG style = GetWindowLong(m_hWnd, GWL_EXSTYLE);
2428-
style &= ~WS_EX_LAYERED;
2429-
SetWindowLong(m_hWnd, GWL_EXSTYLE, style);
2430-
//重新设置窗口的分层样式
2431-
style |= WS_EX_LAYERED;
2432-
SetWindowLong(m_hWnd, GWL_EXSTYLE, style);
2427+
SetWindowLong(m_hWnd, GWL_EXSTYLE, GetWindowLong(m_hWnd, GWL_EXSTYLE) & ~WS_EX_LAYERED);
2428+
//重新设置透明度
2429+
SetTransparency();
24332430

24342431
theApp.SaveConfig();
24352432
}

0 commit comments

Comments
 (0)