aboutsummaryrefslogtreecommitdiff
path: root/src/tools/thmviewer/thmviewer.cpp
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2025-11-01 21:52:31 -0700
committerRob Mensching <rob@firegiant.com>2025-11-03 14:49:39 -0800
commitd2ba0da55725f2908b67e1470afc7cfd71cb3d1f (patch)
treec2a1db61c5fac031c698976106bba2c453d85ded /src/tools/thmviewer/thmviewer.cpp
parent4d626c294c4783d454e27ea4e5614037dac8576e (diff)
downloadwix-d2ba0da55725f2908b67e1470afc7cfd71cb3d1f.tar.gz
wix-d2ba0da55725f2908b67e1470afc7cfd71cb3d1f.tar.bz2
wix-d2ba0da55725f2908b67e1470afc7cfd71cb3d1f.zip
Use CompareStringOrdinal() instead of CompareString() case-sensitive
This commit moves to the modern CompareStringOrdinal() for all case-sensitve uses of CompareString() with the invariant locale. Resolves 6947
Diffstat (limited to 'src/tools/thmviewer/thmviewer.cpp')
-rw-r--r--src/tools/thmviewer/thmviewer.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tools/thmviewer/thmviewer.cpp b/src/tools/thmviewer/thmviewer.cpp
index 69a9920b..12d311af 100644
--- a/src/tools/thmviewer/thmviewer.cpp
+++ b/src/tools/thmviewer/thmviewer.cpp
@@ -495,14 +495,14 @@ static void OnNewTheme(
495 tvi.item.lParam = i + 1; //prgdwPageIds[i]; - TODO: do the right thing here by calling ThemeGetPageIds(), should not assume we know how the page ids will be calculated. 495 tvi.item.lParam = i + 1; //prgdwPageIds[i]; - TODO: do the right thing here by calling ThemeGetPageIds(), should not assume we know how the page ids will be calculated.
496 496
497 HTREEITEM hti = reinterpret_cast<HTREEITEM>(::SendMessage(pTreeControl->hWnd, TVM_INSERTITEMW, 0, reinterpret_cast<LPARAM>(&tvi))); 497 HTREEITEM hti = reinterpret_cast<HTREEITEM>(::SendMessage(pTreeControl->hWnd, TVM_INSERTITEMW, 0, reinterpret_cast<LPARAM>(&tvi)));
498 if (*wzSelectedPage && CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, pPage->sczName, -1, wzSelectedPage, -1)) 498 if (*wzSelectedPage && CSTR_EQUAL == ::CompareStringOrdinal(pPage->sczName, -1, wzSelectedPage, -1, FALSE))
499 { 499 {
500 htiSelected = hti; 500 htiSelected = hti;
501 } 501 }
502 } 502 }
503 } 503 }
504 504
505 if (*wzSelectedPage && CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, L"Application", -1, wzSelectedPage, -1)) 505 if (*wzSelectedPage && CSTR_EQUAL == ::CompareStringOrdinal(L"Application", -1, wzSelectedPage, -1, FALSE))
506 { 506 {
507 htiSelected = tvi.hParent; 507 htiSelected = tvi.hParent;
508 } 508 }
@@ -519,7 +519,7 @@ static BOOL OnThemeLoadingControl(
519 __in THEME_LOADINGCONTROL_RESULTS* pResults 519 __in THEME_LOADINGCONTROL_RESULTS* pResults
520 ) 520 )
521{ 521{
522 if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, pArgs->pThemeControl->sczName, -1, L"Tree", -1)) 522 if (CSTR_EQUAL == ::CompareStringOrdinal(pArgs->pThemeControl->sczName, -1, L"Tree", -1, FALSE))
523 { 523 {
524 pResults->wId = THMVWR_CONTROL_TREE; 524 pResults->wId = THMVWR_CONTROL_TREE;
525 } 525 }