From c0fea55f25ad1f675f40815cefb34b435f32119b Mon Sep 17 00:00:00 2001 From: sje Date: Thu, 23 Nov 2006 03:22:51 +0000 Subject: use ansi font services if unicode ones unavailable bugfixes to allow pure ansi build git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@57 4f64403b-2f21-0410-a795-97e2b3489a10 --- yapp/services.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'yapp/services.cpp') diff --git a/yapp/services.cpp b/yapp/services.cpp index e0b6bff..0b99f20 100644 --- a/yapp/services.cpp +++ b/yapp/services.cpp @@ -5,6 +5,7 @@ #include "resource.h" #include "popup_history.h" #include +#include "str_utils.h" #define NUM_SERVICES 13 HANDLE hService[NUM_SERVICES]; @@ -285,14 +286,14 @@ int PopupChange(WPARAM wParam, LPARAM lParam) { int ShowMessage(WPARAM wParam, LPARAM lParam) { if(!DBGetContactSettingByte(0, MODULE, "Enabled", 1)) return 0; - POPUPDATAW pd = {0}; - wcscpy(pd.lpwzContactName, lParam == SM_WARNING ? _T("Warning") : _T("Notification")); + POPUPDATAT pd = {0}; + _tcscpy(pd.lptzContactName, lParam == SM_WARNING ? _T("Warning") : _T("Notification")); pd.lchIcon = LoadIcon(0, lParam == SM_WARNING ? IDI_WARNING : IDI_INFORMATION); - wchar_t buff[MAX_SECONDLINE]; - MultiByteToWideChar(code_page, 0, (char *)wParam, -1, buff, MAX_SECONDLINE); - wcscpy(pd.lpwzText, buff); + TCHAR buff[MAX_SECONDLINE]; + a2t((char *)wParam, buff, MAX_SECONDLINE); + _tcscpy(pd.lptzText, buff); - CallService(MS_POPUP_ADDPOPUPW, (WPARAM)&pd, 0); + CallService(MS_POPUP_ADDPOPUPT, (WPARAM)&pd, 0); return 0; } -- cgit v1.2.3