MCPcopy Create free account
hub / github.com/ColorCop/ColorCop / ApplyTheme

Method ApplyTheme

ColorCop/ColorCopDlg.cpp:1659–1675  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1657}
1658
1659void CColorCopDlg::ApplyTheme() {
1660 BOOL useDark = (m_Appflags & DarkMode);
1661
1662 if (_SetPreferredAppMode)
1663 _SetPreferredAppMode(useDark ? 1 : 0);
1664
1665 BOOL dark = useDark ? TRUE : FALSE;
1666 DwmSetWindowAttribute(GetSafeHwnd(),
1667 DWMWA_USE_IMMERSIVE_DARK_MODE,
1668 &dark,
1669 sizeof(dark));
1670 // Tell the status bar to update its colors
1671 m_StatusBar.SetTheme(useDark);
1672
1673 Invalidate(TRUE);
1674 UpdateWindow();
1675}
1676
1677void CColorCopDlg::OnUpdateThemeSystem(CCmdUI* pCmdUI) {
1678 BOOL isChecked = static_cast<BOOL>(

Callers

nothing calls this directly

Calls 1

SetThemeMethod · 0.80

Tested by

no test coverage detected