From 7e60078d4a7fe748a39c135def9e84a2421ab474 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sun, 31 Oct 2021 14:20:44 -0500 Subject: Avoid using control ids inside of thmutil. --- .../TestData/Manual/BafThmutilTesting/BafThmUtilTesting.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/test') diff --git a/src/test/burn/TestData/Manual/BafThmutilTesting/BafThmUtilTesting.cpp b/src/test/burn/TestData/Manual/BafThmutilTesting/BafThmUtilTesting.cpp index b502285f..6c37fbd8 100644 --- a/src/test/burn/TestData/Manual/BafThmutilTesting/BafThmUtilTesting.cpp +++ b/src/test/burn/TestData/Manual/BafThmutilTesting/BafThmUtilTesting.cpp @@ -365,18 +365,23 @@ private: void UpdateProgressBarProgress() { + const THEME_CONTROL* pControlProgressbarImage = NULL; + const THEME_CONTROL* pControlProgressbarStandard = NULL; static DWORD dwProgress = 0; DWORD dwCurrent = dwProgress < 100 ? dwProgress : 200 - dwProgress; + ThemeControlExistsById(m_pBafTheme, BAFTHMUTILTESTING_CONTROL_PROGRESSBAR_IMAGE, &pControlProgressbarImage); + ThemeControlExistsById(m_pBafTheme, BAFTHMUTILTESTING_CONTROL_PROGRESSBAR_STANDARD, &pControlProgressbarStandard); + if (0 == dwProgress || 100 == dwProgress) { - ThemeSetProgressControlColor(m_pBafTheme, BAFTHMUTILTESTING_CONTROL_PROGRESSBAR_IMAGE, 100 == dwProgress ? 1 : 0); + ThemeSetProgressControlColor(pControlProgressbarImage, 100 == dwProgress ? 1 : 0); } dwProgress = (dwProgress + 10) % 200; - ThemeSetProgressControl(m_pBafTheme, BAFTHMUTILTESTING_CONTROL_PROGRESSBAR_IMAGE, dwCurrent); - ThemeSetProgressControl(m_pBafTheme, BAFTHMUTILTESTING_CONTROL_PROGRESSBAR_STANDARD, dwCurrent); + ThemeSetProgressControl(pControlProgressbarImage, dwCurrent); + ThemeSetProgressControl(pControlProgressbarStandard, dwCurrent); } public: -- cgit v1.2.3-55-g6feb