diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2013-03-21 09:46:14 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2013-03-21 09:46:14 +0000 |
commit | 8d8b5001f7ce0a0623752815a4e8ab5f136c7df3 (patch) | |
tree | 27ca4735bb0c68a5c639a8f87b27c60ce0931d17 /plugins | |
parent | 1042cf12dbcf9c8a6d413326e81d821715538938 (diff) |
fixed ansi text
git-svn-id: http://svn.miranda-ng.org/main/trunk@4137 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/BuddyPounce/src/dialog.cpp | 9 |
1 files 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);
}
|