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_mw/src/clcidents.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'plugins/Clist_mw/src/clcidents.cpp') diff --git a/plugins/Clist_mw/src/clcidents.cpp b/plugins/Clist_mw/src/clcidents.cpp index 803b7b9f6b..20c361e321 100644 --- a/plugins/Clist_mw/src/clcidents.cpp +++ b/plugins/Clist_mw/src/clcidents.cpp @@ -111,7 +111,7 @@ void ClearClcContactCache(struct ClcData *dat,HCONTACT hContact) { ClcCacheEntry *cacheEntry; - if (hContact == INVALID_HANDLE_VALUE) { + if (hContact == (HCONTACT)INVALID_HANDLE_VALUE) { int i,tick; tick = GetTickCount(); @@ -193,9 +193,10 @@ int FindItem(HWND hwnd, struct ClcData *dat, HANDLE hItem, struct ClcContact **c continue; } 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))) { + 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 && (HANDLE)group->cl.items[group->scanIndex]->hContact == hItem) || + (IsHContactInfo(hItem) && group->cl.items[group->scanIndex]->type == CLCIT_INFO && (HANDLE)group->cl.items[group->scanIndex]->hContact == (HANDLE)((UINT_PTR)hItem & ~HCONTACT_ISINFO))) + { if (isVisible) { if ( !nowVisible) *isVisible = 0; else { @@ -215,7 +216,7 @@ int FindItem(HWND hwnd, struct ClcData *dat, HANDLE hItem, struct ClcContact **c if (group->cl.items[group->scanIndex]->type == CLCIT_CONTACT && group->cl.items[group->scanIndex]->SubAllocated>0) for (i = 1; i<=group->cl.items[group->scanIndex]->SubAllocated; i++) - if (IsHContactContact(hItem) && group->cl.items[group->scanIndex]->subcontacts[i-1].hContact == hItem) { + if (IsHContactContact(hItem) && group->cl.items[group->scanIndex]->subcontacts[i-1].hContact == (HCONTACT)hItem) { if (contact) *contact = &group->cl.items[group->scanIndex]->subcontacts[i-1]; if (subgroup) *subgroup = group; return 1; -- cgit v1.2.3