summaryrefslogtreecommitdiff
path: root/yapp/services.cpp
diff options
context:
space:
mode:
authorsje <sje@4f64403b-2f21-0410-a795-97e2b3489a10>2006-11-23 03:22:51 +0000
committersje <sje@4f64403b-2f21-0410-a795-97e2b3489a10>2006-11-23 03:22:51 +0000
commitc0fea55f25ad1f675f40815cefb34b435f32119b (patch)
tree95da2fda7031bf64da5514ba6cd647a8a74124e0 /yapp/services.cpp
parent6db050eb2d23035c71971cc88219211bbacca23d (diff)
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
Diffstat (limited to 'yapp/services.cpp')
-rw-r--r--yapp/services.cpp13
1 files changed, 7 insertions, 6 deletions
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 <time.h>
+#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;
}