summaryrefslogtreecommitdiff
path: root/plugins/DbEditorPP/src/settingsdlg.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-07-26 09:20:25 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-07-26 09:20:25 +0000
commit6e53dfca72b932c4bdcd7aa02ca62bf8b2630eac (patch)
tree2e8bb660c908b54914abd562af8aafa4a486c846 /plugins/DbEditorPP/src/settingsdlg.cpp
parenta61c8728b379057fe7f0a0d86fe0b037598229dd (diff)
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
Diffstat (limited to 'plugins/DbEditorPP/src/settingsdlg.cpp')
-rw-r--r--plugins/DbEditorPP/src/settingsdlg.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/DbEditorPP/src/settingsdlg.cpp b/plugins/DbEditorPP/src/settingsdlg.cpp
index b712386a5b..ed13f64227 100644
--- a/plugins/DbEditorPP/src/settingsdlg.cpp
+++ b/plugins/DbEditorPP/src/settingsdlg.cpp
@@ -130,7 +130,7 @@ INT_PTR CALLBACK EditSettingDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
TranslateDialogDefault(hwnd);
{
- TCHAR text[MSG_SIZE];
+ wchar_t text[MSG_SIZE];
mir_sntprintf(text, dbsetting->setting?TranslateT("Edit setting (%s)"):TranslateT("New setting (%s)"), DBVType(dbsetting->dbv.type));
SetWindowText(hwnd, text);
}
@@ -157,21 +157,21 @@ INT_PTR CALLBACK EditSettingDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
case CHK_DECIMAL:
CheckRadioButton(hwnd, CHK_HEX, CHK_DECIMAL, LOWORD(wParam));
{
- TCHAR *setting, text[32];
+ wchar_t *setting, text[32];
int settingLength, tmp;
settingLength = GetWindowTextLength(GetDlgItem(hwnd, IDC_SETTINGVALUE));
if (settingLength)
{
- setting = (TCHAR*)mir_alloc((settingLength+1)*sizeof(TCHAR));
+ setting = (wchar_t*)mir_alloc((settingLength+1)*sizeof(wchar_t));
GetDlgItemText(hwnd, IDC_SETTINGVALUE, setting, settingLength + 1);
if (LOWORD(wParam) == CHK_DECIMAL && IsDlgButtonChecked(hwnd, CHK_DECIMAL))
{
- _stscanf(setting, L"%X", &tmp);
+ swscanf(setting, L"%X", &tmp);
mir_sntprintf(text, L"%u", tmp);
}
else
{
- _stscanf(setting, L"%u", &tmp);
+ swscanf(setting, L"%u", &tmp);
mir_sntprintf(text, L"%X", tmp);
}
SetDlgItemText(hwnd, IDC_SETTINGVALUE, text);
@@ -188,7 +188,7 @@ INT_PTR CALLBACK EditSettingDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
{
struct DBsetting *dbsetting = (struct DBsetting*)GetWindowLongPtr(hwnd, GWLP_USERDATA);
- TCHAR settingname[FLD_SIZE];
+ wchar_t settingname[FLD_SIZE];
GetDlgItemText(hwnd, IDC_SETTINGNAME, settingname, _countof(settingname));
if (settingname[0])
@@ -221,7 +221,7 @@ INT_PTR CALLBACK EditSettingDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
break;
int len = GetWindowTextLength(GetDlgItem(hwnd, valueID))+1;
- TCHAR *value = (TCHAR*)mir_alloc(len*sizeof(TCHAR));
+ wchar_t *value = (wchar_t*)mir_alloc(len*sizeof(wchar_t));
GetDlgItemText(hwnd, valueID, value, len);
_T2A setting(settingname);
@@ -235,7 +235,7 @@ INT_PTR CALLBACK EditSettingDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
case DBVT_BYTE:
case DBVT_WORD:
case DBVT_DWORD:
- res = setNumericValue(dbsetting->hContact, dbsetting->module, setting, _tcstoul(value, NULL, IsDlgButtonChecked(hwnd, CHK_HEX)? 16 : 10), type);
+ res = setNumericValue(dbsetting->hContact, dbsetting->module, setting, wcstoul(value, NULL, IsDlgButtonChecked(hwnd, CHK_HEX)? 16 : 10), type);
break;
case DBVT_ASCIIZ:
case DBVT_UTF8: