void LangSetDlgItems(HWND dialog, const UInt32 *ids, unsigned numItems) { unsigned i; for (i = 0; i < ARRAY_SIZE(kLangPairs); i++) { const CIDLangPair &pair = kLangPairs[i]; CWindow window(GetDlgItem(dialog, pair.ControlID)); if (window) { const wchar_t *s = g_Lang.Get(pair.LangID); if (s) window.SetText(s); } } for (i = 0; i < numItems; i++) { UInt32 id = ids[i]; LangSetDlgItemText(dialog, id, id); } }
void LangSetWindowText(HWND window, UInt32 langID) { const wchar_t *s = g_Lang.Get(langID); if (s) MySetWindowText(window, s); }