diff options
author | George Hazan <ghazan@miranda.im> | 2020-04-28 18:54:08 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-04-28 18:54:08 +0300 |
commit | a3bba4bd09b0df2f4331cf7a8c333b7b4a86a195 (patch) | |
tree | 2aad71c6a35d542c7a507d725cf1ec126a6c8442 /plugins/TabSRMM/src/templates.cpp | |
parent | 175ed5d764b1c35e0d97f949e030382acea8527e (diff) |
fixes #2366 (TabSRMM: кракозябры в винде, где нет поддержки русского)
Diffstat (limited to 'plugins/TabSRMM/src/templates.cpp')
-rw-r--r-- | plugins/TabSRMM/src/templates.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/TabSRMM/src/templates.cpp b/plugins/TabSRMM/src/templates.cpp index a9b6e7f59a..cb298ecfd2 100644 --- a/plugins/TabSRMM/src/templates.cpp +++ b/plugins/TabSRMM/src/templates.cpp @@ -175,9 +175,11 @@ bool CTemplateEditDlg::OnInitDialog() Utils::enableDlgControl(m_hwnd, IDC_SAVETEMPLATE, FALSE); Utils::enableDlgControl(m_hwnd, IDC_REVERT, FALSE); Utils::enableDlgControl(m_hwnd, IDC_FORGET, FALSE); - for (int i = 0; i <= TMPL_ERRMSG; i++) { - SendDlgItemMessageA(m_hwnd, IDC_TEMPLATELIST, LB_ADDSTRING, 0, (LPARAM)Translate(TemplateNames[i])); - SendDlgItemMessage(m_hwnd, IDC_TEMPLATELIST, LB_SETITEMDATA, i, (LPARAM)i); + + HWND hwndList = GetDlgItem(m_hwnd, IDC_TEMPLATELIST); + for (auto &it : TemplateNames) { + int idx = ListBox_AddString(hwndList, TranslateW(_A2T(it))); + ListBox_SetItemData(hwndList, idx, idx); } Utils::enableDlgControl(m_hwndParent, IDC_MODIFY, FALSE); Utils::enableDlgControl(m_hwndParent, IDC_RTLMODIFY, FALSE); |