summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2020-04-28 18:54:08 +0300
committerGeorge Hazan <ghazan@miranda.im>2020-04-28 18:54:08 +0300
commita3bba4bd09b0df2f4331cf7a8c333b7b4a86a195 (patch)
tree2aad71c6a35d542c7a507d725cf1ec126a6c8442 /plugins/TabSRMM
parent175ed5d764b1c35e0d97f949e030382acea8527e (diff)
fixes #2366 (TabSRMM: кракозябры в винде, где нет поддержки русского)
Diffstat (limited to 'plugins/TabSRMM')
-rw-r--r--plugins/TabSRMM/src/templates.cpp8
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);