diff options
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);
|