summaryrefslogtreecommitdiff
path: root/protocols/Weather/src/weather_userinfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Weather/src/weather_userinfo.cpp')
-rw-r--r--protocols/Weather/src/weather_userinfo.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/protocols/Weather/src/weather_userinfo.cpp b/protocols/Weather/src/weather_userinfo.cpp
index b0e0bf6859..ecee919ce5 100644
--- a/protocols/Weather/src/weather_userinfo.cpp
+++ b/protocols/Weather/src/weather_userinfo.cpp
@@ -54,22 +54,22 @@ static int BriefDlgResizer(HWND, LPARAM, UTILRESIZECONTROL *urc)
// also load brief info into message box
static void LoadBriefInfoText(HWND hwndDlg, MCONTACT hContact)
{
- WEATHERINFO winfo;
wchar_t str[4096];
// load weather information from the contact into the WEATHERINFO struct
- winfo = LoadWeatherInfo(hContact);
+ WEATHERINFO winfo = LoadWeatherInfo(hContact);
// check if data exist. If not, display error message box
if (!g_plugin.getByte(hContact, "IsUpdated"))
- wcsncpy(str, TranslateT("No information available.\r\nPlease update weather condition first."), _countof(str) - 1);
- else
+ SetDlgItemTextW(hwndDlg, IDC_MTEXT, TranslateT("No information available.\r\nPlease update weather condition first."));
+ else {
// set the display text and show the message box
GetDisplay(&winfo, GetTextValue('B'), str);
- SetDlgItemText(hwndDlg, IDC_MTEXT, str);
+ SetDlgItemTextW(hwndDlg, IDC_MTEXT, str);
+ }
GetDisplay(&winfo, L"%c, %t", str);
- SetWindowText(hwndDlg, winfo.city);
- SetDlgItemText(hwndDlg, IDC_HEADERBAR, str);
+ SetWindowTextW(hwndDlg, winfo.city);
+ SetDlgItemTextW(hwndDlg, IDC_HEADERBAR, str);
}
// dialog process for more data in the user info window