diff options
author | sje <sje@4f64403b-2f21-0410-a795-97e2b3489a10> | 2006-11-23 03:22:51 +0000 |
---|---|---|
committer | sje <sje@4f64403b-2f21-0410-a795-97e2b3489a10> | 2006-11-23 03:22:51 +0000 |
commit | c0fea55f25ad1f675f40815cefb34b435f32119b (patch) | |
tree | 95da2fda7031bf64da5514ba6cd647a8a74124e0 /yapp/options.cpp | |
parent | 6db050eb2d23035c71971cc88219211bbacca23d (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/options.cpp')
-rw-r--r-- | yapp/options.cpp | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/yapp/options.cpp b/yapp/options.cpp index 5f3e0d5..ed77921 100644 --- a/yapp/options.cpp +++ b/yapp/options.cpp @@ -3,6 +3,7 @@ #include "resource.h"
#include "popwin.h"
#include <commctrl.h>
+#include "str_utils.h"
Options options;
@@ -84,18 +85,18 @@ void SaveOptions() { }
void ShowExamplePopups() {
- POPUPDATAW pd = {0};
+ POPUPDATAT pd = {0};
pd.lchIcon = hPopupIcon;
- wcscpy(pd.lpwzContactName, TranslateT("Example"));
- wcscpy(pd.lpwzText, TranslateT("The quick brown fox jumped over the lazy dog."));
- CallService(MS_POPUP_ADDPOPUPW, (WPARAM)&pd, 0);
- wcscpy(pd.lpwzContactName, TranslateT("Example With a Long Title"));
- wcscpy(pd.lpwzText, TranslateT("The quick brown fox jumped over the lazy dog."));
- CallService(MS_POPUP_ADDPOPUPW, (WPARAM)&pd, 0);
- wcscpy(pd.lpwzContactName, TranslateT("Example"));
- wcscpy(pd.lpwzText, TranslateT("Thequickbrownfoxjumpedoverthelazydog."));
- CallService(MS_POPUP_ADDPOPUPW, (WPARAM)&pd, 0);
+ _tcscpy(pd.lptzContactName, TranslateT("Example"));
+ _tcscpy(pd.lptzText, TranslateT("The quick brown fox jumped over the lazy dog."));
+ CallService(MS_POPUP_ADDPOPUPT, (WPARAM)&pd, 0);
+ _tcscpy(pd.lptzContactName, TranslateT("Example With a Long Title"));
+ _tcscpy(pd.lptzText, TranslateT("The quick brown fox jumped over the lazy dog."));
+ CallService(MS_POPUP_ADDPOPUPT, (WPARAM)&pd, 0);
+ _tcscpy(pd.lptzContactName, TranslateT("Example"));
+ _tcscpy(pd.lptzText, TranslateT("Thequickbrownfoxjumpedoverthelazydog."));
+ CallService(MS_POPUP_ADDPOPUPT, (WPARAM)&pd, 0);
HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
while(hContact) {
@@ -103,8 +104,8 @@ void ShowExamplePopups() { AVATARCACHEENTRY *ace = (AVATARCACHEENTRY *)CallService(MS_AV_GETAVATARBITMAP, (WPARAM)hContact, 0);
if(ace && ace->dwFlags & AVS_BITMAP_VALID) {
pd.lchContact = hContact;
- wcscpy(pd.lpwzText, TranslateT("An avatar."));
- CallService(MS_POPUP_ADDPOPUPW, (WPARAM)&pd, 0);
+ _tcscpy(pd.lptzText, TranslateT("An avatar."));
+ CallService(MS_POPUP_ADDPOPUPT, (WPARAM)&pd, 0);
break;
}
}
@@ -180,14 +181,11 @@ static BOOL CALLBACK DlgProcOpts1(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lvI.mask = LVIF_TEXT;
char *strptr;
- wchar_t buff[256];
+ TCHAR buff[256];
int i = 0;
for(; i < 10; i++) {
strptr = (char *)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, (WPARAM)(ID_STATUS_OFFLINE + i), (LPARAM)0);
- int cp = CP_ACP;
- if(ServiceExists(MS_LANGPACK_GETCODEPAGE))
- cp = (int)CallService(MS_LANGPACK_GETCODEPAGE, 0, 0);
- MultiByteToWideChar(cp, 0, strptr, -1, buff, 256);
+ a2t(strptr, buff, 256);
lvI.pszText = buff;
lvI.iItem = i;
ListView_InsertItem(hwndList, &lvI);
|