diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2021-10-31 14:20:44 -0500 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2021-11-01 16:34:09 -0500 |
| commit | 7e60078d4a7fe748a39c135def9e84a2421ab474 (patch) | |
| tree | 51dbe5067ca9596f99107719734c4946e4c080b4 /src/samples/thmviewer/display.cpp | |
| parent | c092722a147940532b08f62403e182ef279f2c74 (diff) | |
| download | wix-7e60078d4a7fe748a39c135def9e84a2421ab474.tar.gz wix-7e60078d4a7fe748a39c135def9e84a2421ab474.tar.bz2 wix-7e60078d4a7fe748a39c135def9e84a2421ab474.zip | |
Avoid using control ids inside of thmutil.
Diffstat (limited to 'src/samples/thmviewer/display.cpp')
| -rw-r--r-- | src/samples/thmviewer/display.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/samples/thmviewer/display.cpp b/src/samples/thmviewer/display.cpp index 9ef88018..f40b50b5 100644 --- a/src/samples/thmviewer/display.cpp +++ b/src/samples/thmviewer/display.cpp | |||
| @@ -188,7 +188,7 @@ static DWORD WINAPI DisplayThreadProc( | |||
| 188 | THEME_CONTROL* pControl = pCurrentHandle->pTheme->rgControls + i; | 188 | THEME_CONTROL* pControl = pCurrentHandle->pTheme->rgControls + i; |
| 189 | if (!pControl->wPageId) | 189 | if (!pControl->wPageId) |
| 190 | { | 190 | { |
| 191 | ThemeShowControl(pCurrentHandle->pTheme, pControl->wId, nCmdShow); | 191 | ThemeShowControl(pControl, nCmdShow); |
| 192 | } | 192 | } |
| 193 | } | 193 | } |
| 194 | 194 | ||
| @@ -264,7 +264,7 @@ static LRESULT CALLBACK DisplayWndProc( | |||
| 264 | break; | 264 | break; |
| 265 | 265 | ||
| 266 | case WM_TIMER: | 266 | case WM_TIMER: |
| 267 | if (!lParam && SUCCEEDED(ThemeSetProgressControl(pHandleTheme->pTheme, wParam, dwProgress))) | 267 | if (!lParam && SUCCEEDED(ThemeSetProgressControl(reinterpret_cast<THEME_CONTROL*>(wParam), dwProgress))) |
| 268 | { | 268 | { |
| 269 | dwProgress += rand() % 10 + 1; | 269 | dwProgress += rand() % 10 + 1; |
| 270 | if (dwProgress > 100) | 270 | if (dwProgress > 100) |
| @@ -322,12 +322,12 @@ static BOOL DisplayOnThmLoadedControl( | |||
| 322 | // Pre-populate some control types with data. | 322 | // Pre-populate some control types with data. |
| 323 | if (THEME_CONTROL_TYPE_RICHEDIT == pControl->type) | 323 | if (THEME_CONTROL_TYPE_RICHEDIT == pControl->type) |
| 324 | { | 324 | { |
| 325 | hr = ThemeLoadRichEditFromResource(pTheme, pControl->wId, MAKEINTRESOURCEA(THMVWR_RES_RICHEDIT_FILE), ::GetModuleHandleW(NULL)); | 325 | hr = WnduLoadRichEditFromResource(pControl->hWnd, MAKEINTRESOURCEA(THMVWR_RES_RICHEDIT_FILE), ::GetModuleHandleW(NULL)); |
| 326 | ExitOnFailure(hr, "Failed to load richedit text."); | 326 | ExitOnFailure(hr, "Failed to load richedit text."); |
| 327 | } | 327 | } |
| 328 | else if (THEME_CONTROL_TYPE_PROGRESSBAR == pControl->type) | 328 | else if (THEME_CONTROL_TYPE_PROGRESSBAR == pControl->type) |
| 329 | { | 329 | { |
| 330 | DWORD dwId = ::SetTimer(pTheme->hwndParent, pControl->wId, 500, NULL); | 330 | DWORD dwId = ::SetTimer(pTheme->hwndParent, reinterpret_cast<UINT_PTR>(pControl), 500, NULL); |
| 331 | dwId = dwId; // prevents warning in "ship" build. | 331 | dwId = dwId; // prevents warning in "ship" build. |
| 332 | Assert(dwId == pControl->wId); | 332 | Assert(dwId == pControl->wId); |
| 333 | } | 333 | } |
