From 6e53dfca72b932c4bdcd7aa02ca62bf8b2630eac Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 26 Jul 2016 09:20:25 +0000 Subject: less TCHARs: - TCHAR is replaced with wchar_t everywhere; - LPGENT replaced with either LPGENW or LPGEN; - fixes for ANSI plugins that improperly used _t functions; - TCHAR *t removed from MAllStrings; - ptszGroup, ptszTitle & ptszTab in OPTIONSDIALOGPAGE replaced with pwsz* git-svn-id: http://svn.miranda-ng.org/main/trunk@17133 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/SpellChecker/src/ardialog.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'plugins/SpellChecker/src/ardialog.cpp') diff --git a/plugins/SpellChecker/src/ardialog.cpp b/plugins/SpellChecker/src/ardialog.cpp index 3b1258508f..0b1a14fa56 100644 --- a/plugins/SpellChecker/src/ardialog.cpp +++ b/plugins/SpellChecker/src/ardialog.cpp @@ -25,8 +25,8 @@ static INT_PTR CALLBACK AddReplacementDlgProc(HWND hwndDlg, UINT msg, WPARAM wPa struct Data { Dictionary *dict; - tstring find; - tstring replace; + std::wstring find; + std::wstring replace; BOOL useVariables; BOOL modal; @@ -37,7 +37,7 @@ struct Data }; BOOL ShowAutoReplaceDialog(HWND parent, BOOL modal, - Dictionary *dict, const TCHAR *find, const TCHAR *replace, BOOL useVariables, + Dictionary *dict, const wchar_t *find, const wchar_t *replace, BOOL useVariables, BOOL findReadOnly, AutoReplaceDialogCallback callback, void *param) { Data *data = new Data(); @@ -79,11 +79,11 @@ static LRESULT CALLBACK OnlyCharsEditProc(HWND hwnd, UINT msg, WPARAM wParam, LP if (GetKeyState(VK_CONTROL) & 0x8000) // CTRL key break; { - TCHAR c = (TCHAR)wParam; + wchar_t c = (wchar_t)wParam; if (!data->dict->autoReplace->isWordChar(c)) return 1; - TCHAR tmp[2] = { c, 0 }; + wchar_t tmp[2] = { c, 0 }; CharLower(tmp); wParam = tmp[0]; @@ -96,10 +96,10 @@ static LRESULT CALLBACK OnlyCharsEditProc(HWND hwnd, UINT msg, WPARAM wParam, LP switch (msg) { case EM_PASTESPECIAL: case WM_PASTE: - TCHAR text[256]; + wchar_t text[256]; GetWindowText(hwnd, text, _countof(text)); - scoped_free dest = data->dict->autoReplace->filterText(text); + scoped_free dest = data->dict->autoReplace->filterText(text); SetWindowText(hwnd, dest); break; } @@ -171,7 +171,7 @@ static INT_PTR CALLBACK AddReplacementDlgProc(HWND hwndDlg, UINT msg, WPARAM wPa SendDlgItemMessage(hwndDlg, IDC_NEW, EM_LIMITTEXT, 256, 0); if (!data->find.empty()) { - scoped_free tmp = data->dict->autoReplace->filterText(data->find.c_str()); + scoped_free tmp = data->dict->autoReplace->filterText(data->find.c_str()); SetDlgItemText(hwndDlg, IDC_OLD, tmp); } if (!data->replace.empty()) @@ -213,7 +213,7 @@ static INT_PTR CALLBACK AddReplacementDlgProc(HWND hwndDlg, UINT msg, WPARAM wPa { Data *data = (Data *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); - TCHAR find[256]; + wchar_t find[256]; if (data->findReadOnly) mir_tstrncpy(find, data->find.c_str(), _countof(find)); else { @@ -221,7 +221,7 @@ static INT_PTR CALLBACK AddReplacementDlgProc(HWND hwndDlg, UINT msg, WPARAM wPa lstrtrim(find); } - TCHAR replace[256]; + wchar_t replace[256]; GetDlgItemText(hwndDlg, IDC_NEW, replace, _countof(replace)); lstrtrim(replace); -- cgit v1.2.3