From 33953cc6a0fab6a91af293c6838f8a46dd7922da Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 10 Feb 2014 14:42:51 +0000 Subject: HCONTACT, part 3 git-svn-id: http://svn.miranda-ng.org/main/trunk@8081 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Clist_modern/src/modern_clcidents.cpp | 30 +++++++++++++-------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'plugins/Clist_modern/src/modern_clcidents.cpp') diff --git a/plugins/Clist_modern/src/modern_clcidents.cpp b/plugins/Clist_modern/src/modern_clcidents.cpp index 2bd079760f..26260fd015 100644 --- a/plugins/Clist_modern/src/modern_clcidents.cpp +++ b/plugins/Clist_modern/src/modern_clcidents.cpp @@ -140,7 +140,7 @@ int FindItem(HWND hwnd, ClcData *dat, HCONTACT hItem, ClcContact **contact, ClcG if (nowVisible) index++; if ((IsHContactGroup(hItem) && group->cl.items[group->scanIndex]->type == CLCIT_GROUP && ((UINT_PTR)hItem&~HCONTACT_ISGROUP) == group->cl.items[group->scanIndex]->groupId) || (IsHContactContact(hItem) && group->cl.items[group->scanIndex]->type == CLCIT_CONTACT && group->cl.items[group->scanIndex]->hContact == hItem) || - (IsHContactInfo(hItem) && group->cl.items[group->scanIndex]->type == CLCIT_INFO && group->cl.items[group->scanIndex]->hContact == (HANDLE)((UINT_PTR)hItem&~HCONTACT_ISINFO))) + (IsHContactInfo(hItem) && group->cl.items[group->scanIndex]->type == CLCIT_INFO && group->cl.items[group->scanIndex]->hContact == (HCONTACT)((UINT_PTR)hItem&~HCONTACT_ISINFO))) { if (isVisible) { if (!nowVisible) *isVisible = 0; @@ -277,12 +277,12 @@ int cliGetRowByIndex(ClcData *dat,int testindex,ClcContact **contact,ClcGroup ** HANDLE ContactToHItem(ClcContact *contact) { switch(contact->type) { -case CLCIT_CONTACT: - return contact->hContact; -case CLCIT_GROUP: - return (HANDLE)(contact->groupId|HCONTACT_ISGROUP); -case CLCIT_INFO: - return (HANDLE)((DWORD_PTR)contact->hContact|HCONTACT_ISINFO); + case CLCIT_CONTACT: + return (HANDLE)contact->hContact; + case CLCIT_GROUP: + return (HANDLE)(contact->groupId|HCONTACT_ISGROUP); + case CLCIT_INFO: + return (HANDLE)((DWORD_PTR)contact->hContact|HCONTACT_ISINFO); } return NULL; } @@ -290,14 +290,14 @@ case CLCIT_INFO: HANDLE ContactToItemHandle(ClcContact *contact,DWORD *nmFlags) { switch(contact->type) { -case CLCIT_CONTACT: - return contact->hContact; -case CLCIT_GROUP: - if (nmFlags) *nmFlags |= CLNF_ISGROUP; - return (HANDLE)contact->groupId; -case CLCIT_INFO: - if (nmFlags) *nmFlags |= CLNF_ISINFO; - return (HANDLE)((DWORD_PTR)contact->hContact|HCONTACT_ISINFO); + case CLCIT_CONTACT: + return (HANDLE)contact->hContact; + case CLCIT_GROUP: + if (nmFlags) *nmFlags |= CLNF_ISGROUP; + return (HANDLE)contact->groupId; + case CLCIT_INFO: + if (nmFlags) *nmFlags |= CLNF_ISINFO; + return (HANDLE)((DWORD_PTR)contact->hContact|HCONTACT_ISINFO); } return NULL; } \ No newline at end of file -- cgit v1.2.3