From 21ecf0ee8db5df0da5939b637001b1fe14bbfe5b Mon Sep 17 00:00:00 2001 From: Vadim Dashevskiy Date: Thu, 13 Sep 2012 07:04:14 +0000 Subject: KeyboardNotify unicode fix (patch by Mataes) git-svn-id: http://svn.miranda-ng.org/main/trunk@1569 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/KeyboardNotify/src/options.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'plugins/KeyboardNotify/src/options.cpp') diff --git a/plugins/KeyboardNotify/src/options.cpp b/plugins/KeyboardNotify/src/options.cpp index 0e7f2aa171..53df92ec84 100644 --- a/plugins/KeyboardNotify/src/options.cpp +++ b/plugins/KeyboardNotify/src/options.cpp @@ -774,7 +774,7 @@ INT_PTR CALLBACK DlgProcThemeOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR SendDlgItemMessage(hwndDlg, IDC_CUSTOMSTRING, EM_LIMITTEXT, MAX_PATH, 0); for (i=0; !DBGetContactSettingTString(NULL, KEYBDMODULE, fmtDBSettingName("theme%d", i), &dbv); i++) { - int index = SendDlgItemMessage(hwndDlg, IDC_THEME, CB_INSERTSTRING, (WPARAM)-1, (LPARAM)dbv.pszVal); + int index = SendDlgItemMessage(hwndDlg, IDC_THEME, CB_INSERTSTRING, (WPARAM)-1, (LPARAM)dbv.ptszVal); DBFreeVariant(&dbv); if (index != CB_ERR && index != CB_ERRSPACE) { str = (TCHAR *)malloc(MAX_PATH+1); @@ -824,7 +824,7 @@ INT_PTR CALLBACK DlgProcThemeOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR EnableWindow(GetDlgItem(hwndDlg, IDC_DELETE), TRUE); break; case CBN_EDITCHANGE: - GetDlgItemText(hwndDlg, IDC_THEME, theme, sizeof(theme)); + GetDlgItemText(hwndDlg, IDC_THEME, theme, SIZEOF(theme)); if ((item = SendMessage((HWND)lParam, CB_FINDSTRINGEXACT, -1, (LPARAM)theme)) == CB_ERR) { //new theme SetDlgItemText(hwndDlg, IDC_CUSTOMSTRING, _T("")); EnableWindow(GetDlgItem(hwndDlg, IDC_ADD), TRUE); @@ -847,7 +847,7 @@ INT_PTR CALLBACK DlgProcThemeOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR int item; TCHAR theme[MAX_PATH+1], customAux[MAX_PATH+1]; - GetDlgItemText(hwndDlg, IDC_THEME, theme, sizeof(theme)); + GetDlgItemText(hwndDlg, IDC_THEME, theme, SIZEOF(theme)); if ((item = SendDlgItemMessage(hwndDlg, IDC_THEME, CB_FINDSTRINGEXACT, -1, (LPARAM)theme)) == CB_ERR) return TRUE; str = (TCHAR *)SendDlgItemMessage(hwndDlg, IDC_THEME, CB_GETITEMDATA, (WPARAM)item, 0); @@ -874,7 +874,7 @@ INT_PTR CALLBACK DlgProcThemeOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR int item; TCHAR theme[MAX_PATH+1]; - GetDlgItemText(hwndDlg, IDC_THEME, theme, sizeof(theme)); + GetDlgItemText(hwndDlg, IDC_THEME, theme, SIZEOF(theme)); if (!theme[0]) return TRUE; item = SendDlgItemMessage(hwndDlg, IDC_THEME, CB_ADDSTRING, 0, (LPARAM)theme); @@ -895,7 +895,7 @@ INT_PTR CALLBACK DlgProcThemeOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR int item; TCHAR theme[MAX_PATH+1]; - GetDlgItemText(hwndDlg, IDC_THEME, theme, sizeof(theme)); + GetDlgItemText(hwndDlg, IDC_THEME, theme, SIZEOF(theme)); item = SendDlgItemMessage(hwndDlg, IDC_THEME, CB_FINDSTRINGEXACT, -1, (LPARAM)theme); str = (TCHAR *)SendDlgItemMessage(hwndDlg, IDC_THEME, CB_GETITEMDATA, (WPARAM)item, 0); if (str) { @@ -911,7 +911,7 @@ INT_PTR CALLBACK DlgProcThemeOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR int item; TCHAR theme[MAX_PATH+1]; - GetDlgItemText(hwndDlg, IDC_THEME, theme, sizeof(theme)); + GetDlgItemText(hwndDlg, IDC_THEME, theme, SIZEOF(theme)); item = SendDlgItemMessage(hwndDlg, IDC_THEME, CB_FINDSTRINGEXACT, -1, (LPARAM)theme); str = (TCHAR *)SendDlgItemMessage(hwndDlg, IDC_THEME, CB_GETITEMDATA, (WPARAM)item, 0); if (str) @@ -953,7 +953,7 @@ INT_PTR CALLBACK DlgProcThemeOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR ofn.lpstrFilter = filter; ofn.lpstrFile = path; ofn.Flags = OFN_HIDEREADONLY|OFN_NOCHANGEDIR|OFN_NOREADONLYRETURN|OFN_PATHMUSTEXIST; - ofn.nMaxFile = sizeof(path); + ofn.nMaxFile = SIZEOF(path); ofn.lpstrDefExt = _T("knt"); if(GetSaveFileName(&ofn)) exportThemes(path); @@ -981,7 +981,7 @@ INT_PTR CALLBACK DlgProcThemeOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR ofn.lpstrFilter = filter; ofn.lpstrFile = path; ofn.Flags = OFN_FILEMUSTEXIST|OFN_HIDEREADONLY|OFN_NOCHANGEDIR; - ofn.nMaxFile = sizeof(path); + ofn.nMaxFile = SIZEOF(path); ofn.lpstrDefExt = _T("knt"); if(GetOpenFileName(&ofn)) { importThemes(path, IsDlgButtonChecked(hwndDlg, IDC_OVERRIDE) == BST_CHECKED); @@ -1187,7 +1187,7 @@ INT_PTR CALLBACK DlgProcProcesses(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM EnableWindow(GetDlgItem(hwndDlg, IDC_DELETEPGM), TRUE); break; case CBN_EDITCHANGE: - GetDlgItemText(hwndDlg, IDC_PROGRAMS, szFileName, sizeof(szFileName)); + GetDlgItemText(hwndDlg, IDC_PROGRAMS, szFileName, SIZEOF(szFileName)); if ((item = SendMessage((HWND)lParam, CB_FINDSTRINGEXACT, -1, (LPARAM)szFileName)) == CB_ERR) { //new program EnableWindow(GetDlgItem(hwndDlg, IDC_ADDPGM), TRUE); EnableWindow(GetDlgItem(hwndDlg, IDC_DELETEPGM), FALSE); @@ -1203,7 +1203,7 @@ INT_PTR CALLBACK DlgProcProcesses(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM int item; TCHAR szFileName[MAX_PATH+1]; - GetDlgItemText(hwndDlg, IDC_PROGRAMS, szFileName, sizeof(szFileName)); + GetDlgItemText(hwndDlg, IDC_PROGRAMS, szFileName, SIZEOF(szFileName)); if (!szFileName[0]) break; item = SendDlgItemMessage(hwndDlg, IDC_PROGRAMS, CB_ADDSTRING, 0, (LPARAM)szFileName); @@ -1216,7 +1216,7 @@ INT_PTR CALLBACK DlgProcProcesses(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM int item; TCHAR szFileName[MAX_PATH+1]; - GetDlgItemText(hwndDlg, IDC_PROGRAMS, szFileName, sizeof(szFileName)); + GetDlgItemText(hwndDlg, IDC_PROGRAMS, szFileName, SIZEOF(szFileName)); item = SendDlgItemMessage(hwndDlg, IDC_PROGRAMS, CB_FINDSTRINGEXACT, -1, (LPARAM)szFileName); SendDlgItemMessage(hwndDlg, IDC_PROGRAMS, CB_DELETESTRING, (WPARAM)item, 0); if (SendDlgItemMessage(hwndDlg, IDC_PROGRAMS, CB_GETCOUNT, 0, 0) == 0) { -- cgit v1.2.3