diff options
author | (no author) <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10> | 2010-04-05 02:42:12 +0000 |
---|---|---|
committer | (no author) <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10> | 2010-04-05 02:42:12 +0000 |
commit | 131975945929c21f78de8343e61d89e359d396c0 (patch) | |
tree | 9251230bf63ecf12e96c06302fb1272f864d80df /worldtime_protocol/options.cpp | |
parent | a1aeff82b1470fcf00d3c81e5853b7d09128aaa8 (diff) |
Converted x64 version to Unicode
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@489 4f64403b-2f21-0410-a795-97e2b3489a10
Diffstat (limited to 'worldtime_protocol/options.cpp')
-rw-r--r-- | worldtime_protocol/options.cpp | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/worldtime_protocol/options.cpp b/worldtime_protocol/options.cpp index 071c88c..d98652a 100644 --- a/worldtime_protocol/options.cpp +++ b/worldtime_protocol/options.cpp @@ -30,7 +30,7 @@ LISTITEM add_edit_item; INT_PTR CALLBACK DlgProcOptsEdit(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) {
HWND hw;
int sel;
- char buf[MAX_NAME_LENGTH];
+ TCHAR buf[MAX_NAME_LENGTH];
switch ( msg ) {
case WM_INITDIALOG:
@@ -82,8 +82,8 @@ INT_PTR CALLBACK DlgProcOptsEdit(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l case IDC_ED_LABEL:
GetDlgItemText(hwndDlg, IDC_ED_LABEL, buf, MAX_NAME_LENGTH);
hw = GetDlgItem(hwndDlg, IDOK);
- EnableWindow(hw, (strlen(buf) > 0));
- strncpy(add_edit_item.pszText, buf, MAX_NAME_LENGTH);
+ EnableWindow(hw, (_tcslen(buf) > 0));
+ _tcsncpy(add_edit_item.pszText, buf, MAX_NAME_LENGTH);
}
}
@@ -136,16 +136,16 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA bool hide_proto = (DBGetContactSettingByte(NULL, "WorldTime", "HideProtocol", 0) == 1);
CheckDlgButton(hwndDlg, IDC_CHK_HIDE, hide_proto ? 1 : 0);
DBVARIANT dbv;
- if(!DBGetContactSetting(NULL, "WorldTime", "TimeFormat", &dbv))
- strcpy(format_string, dbv.pszVal);
+ if(!DBGetContactSettingTString(NULL, "WorldTime", "TimeFormat", &dbv))
+ _tcscpy(format_string, dbv.ptszVal);
DBFreeVariant(&dbv);
SetDlgItemText(hwndDlg, IDC_ED_FORMAT, format_string);
- if(!DBGetContactSetting(NULL, "WorldTime", "DateFormat", &dbv))
- strcpy(date_format_string, dbv.pszVal);
+ if(!DBGetContactSettingTString(NULL, "WorldTime", "DateFormat", &dbv))
+ _tcscpy(date_format_string, dbv.ptszVal);
DBFreeVariant(&dbv);
SetDlgItemText(hwndDlg, IDC_ED_DATE_FORMAT, date_format_string);
- if(!DBGetContactSetting(NULL, "WorldTime", "CListFormat", &dbv))
- strcpy(clist_format_string, dbv.pszVal);
+ if(!DBGetContactSettingTString(NULL, "WorldTime", "CListFormat", &dbv))
+ _tcscpy(clist_format_string, dbv.ptszVal);
DBFreeVariant(&dbv);
SetDlgItemText(hwndDlg, IDC_ED_CLIST_FORMAT, clist_format_string);
@@ -257,18 +257,18 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA hide_proto = IsDlgButtonChecked(hwndDlg, IDC_CHK_HIDE) == BST_CHECKED;
DBWriteContactSettingByte(NULL, "WorldTime", "HideProtocol", hide_proto ? 1 : 0);
- char buf[512];
+ TCHAR buf[512];
GetDlgItemText(hwndDlg, IDC_ED_FORMAT, buf, 512);
- DBWriteContactSettingString(NULL, "WorldTime", "TimeFormat", buf);
- strncpy(format_string, buf, 512);
+ DBWriteContactSettingTString(NULL, "WorldTime", "TimeFormat", buf);
+ _tcsncpy(format_string, buf, 512);
GetDlgItemText(hwndDlg, IDC_ED_DATE_FORMAT, buf, 512);
- DBWriteContactSettingString(NULL, "WorldTime", "DateFormat", buf);
- strncpy(date_format_string, buf, 512);
+ DBWriteContactSettingTString(NULL, "WorldTime", "DateFormat", buf);
+ _tcsncpy(date_format_string, buf, 512);
GetDlgItemText(hwndDlg, IDC_ED_CLIST_FORMAT, buf, 512);
- DBWriteContactSettingString(NULL, "WorldTime", "CListFormat", buf);
- strncpy(clist_format_string, buf, 512);
+ DBWriteContactSettingTString(NULL, "WorldTime", "CListFormat", buf);
+ _tcsncpy(clist_format_string, buf, 512);
copy_listbox_items(listbox_items, temp_listbox_items);
save_listbox_items();
@@ -287,9 +287,9 @@ int OptInit(WPARAM wParam,LPARAM lParam) odp.cbSize = sizeof(odp);
odp.position = -790000000;
odp.hInstance = hInst;
- odp.pszTemplate = MAKEINTRESOURCE(IDD_DIALOG1);
- odp.pszTitle = Translate("World Time");
- odp.pszGroup = Translate("Plugins");
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_DIALOG1);
+ odp.pszTitle = "World Time Protocol";
+ odp.pszGroup = "Plugins";
odp.flags = ODPF_BOLDGROUPS;
odp.nIDBottomSimpleControl = IDC_PPM;
odp.pfnDlgProc = DlgProcOpts;
@@ -303,20 +303,20 @@ void LoadOptions() { hide_proto = (DBGetContactSettingByte(NULL, "WorldTime", "HideProtocol", 0) == 1);
DBVARIANT dbv;
- if(!DBGetContactSetting(NULL, "WorldTime", "TimeFormat", &dbv)) {
- strncpy(format_string, dbv.pszVal, 512);
+ if(!DBGetContactSettingTString(NULL, "WorldTime", "TimeFormat", &dbv)) {
+ _tcsncpy(format_string, dbv.ptszVal, 512);
} else
- strcpy(format_string, "HH:mm");
+ _tcscpy(format_string, _T("HH:mm"));
DBFreeVariant(&dbv);
- if(!DBGetContactSetting(NULL, "WorldTime", "DateFormat", &dbv)) {
- strncpy(date_format_string, dbv.pszVal, 512);
+ if(!DBGetContactSettingTString(NULL, "WorldTime", "DateFormat", &dbv)) {
+ _tcsncpy(date_format_string, dbv.ptszVal, 512);
} else
- strcpy(date_format_string, "d/M");
+ _tcscpy(date_format_string, _T("d/M"));
DBFreeVariant(&dbv);
- if(!DBGetContactSetting(NULL, "WorldTime", "CListFormat", &dbv)) {
- strncpy(clist_format_string, dbv.pszVal, 512);
+ if(!DBGetContactSettingTString(NULL, "WorldTime", "CListFormat", &dbv)) {
+ _tcsncpy(clist_format_string, dbv.ptszVal, 512);
} else
- strcpy(clist_format_string, "%n: %t %d");
+ _tcscpy(clist_format_string, _T("%n: %t %d"));
DBFreeVariant(&dbv);
}
|