From 8d8b5001f7ce0a0623752815a4e8ab5f136c7df3 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Thu, 21 Mar 2013 09:46:14 +0000 Subject: fixed ansi text git-svn-id: http://svn.miranda-ng.org/main/trunk@4137 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/BuddyPounce/src/dialog.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/plugins/BuddyPounce/src/dialog.cpp b/plugins/BuddyPounce/src/dialog.cpp index 332d46fe74..bdc08ecd5b 100644 --- a/plugins/BuddyPounce/src/dialog.cpp +++ b/plugins/BuddyPounce/src/dialog.cpp @@ -15,15 +15,14 @@ void populateSettingsList(HWND hwnd2List) void populateContacts(HANDLE BPhContact,HWND hwnd2CB) { HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0); - char name[300], *szProto; - int index, selectedIndex = 0; while (hContact) { - szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0); + char *szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0); if (szProto && (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IM)) { - _snprintf(name, 300, "%s (%s)", (char*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,(WPARAM)hContact,0), szProto); - index = SendMessage(hwnd2CB, CB_ADDSTRING, 0, (LPARAM)name); + TCHAR name[300]; + mir_sntprintf(name, SIZEOF(name), _T("%s (%s)"), CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR), _A2T(szProto)); + int index = SendMessage(hwnd2CB, CB_ADDSTRING, 0, (LPARAM)name); SendMessage(hwnd2CB, CB_SETITEMDATA, index, (LPARAM)hContact); if (BPhContact == hContact) SendMessage(hwnd2CB, CB_SETCURSEL, index, 0); } -- cgit v1.2.3