Skip to content

Commit

Permalink
修正更换皮肤时不透明度不正常的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongyang219 committed Jan 13, 2025
1 parent 990e32a commit 0c5e86e
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions TrafficMonitor/TrafficMonitorDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2424,12 +2424,9 @@ void CTrafficMonitorDlg::OnChangeSkin()
Invalidate(FALSE); //更换皮肤后立即刷新窗口信息
//重新设置WS_EX_LAYERED样式,以解决在png皮肤和bmp皮肤之间切换时显示不正常的问题
//清除窗口的分层样式
LONG style = GetWindowLong(m_hWnd, GWL_EXSTYLE);
style &= ~WS_EX_LAYERED;
SetWindowLong(m_hWnd, GWL_EXSTYLE, style);
//重新设置窗口的分层样式
style |= WS_EX_LAYERED;
SetWindowLong(m_hWnd, GWL_EXSTYLE, style);
SetWindowLong(m_hWnd, GWL_EXSTYLE, GetWindowLong(m_hWnd, GWL_EXSTYLE) & ~WS_EX_LAYERED);
//重新设置透明度
SetTransparency();

theApp.SaveConfig();
}
Expand Down

0 comments on commit 0c5e86e

Please sign in to comment.