diff options
Diffstat (limited to 'src/modules/clist')
-rw-r--r-- | src/modules/clist/clcitems.cpp | 2 | ||||
-rw-r--r-- | src/modules/clist/clcmsgs.cpp | 16 | ||||
-rw-r--r-- | src/modules/clist/clcutils.cpp | 2 |
3 files changed, 8 insertions, 12 deletions
diff --git a/src/modules/clist/clcitems.cpp b/src/modules/clist/clcitems.cpp index c39f5cf5a6..ce8b744a88 100644 --- a/src/modules/clist/clcitems.cpp +++ b/src/modules/clist/clcitems.cpp @@ -158,7 +158,7 @@ int fnAddInfoItemToGroup(ClcGroup *group, int flags, const TCHAR *pszText) if (group->cl.items[i]->type != CLCIT_INFO)
break;
i = cli.pfnAddItemToGroup(group, i);
- iInfoItemUniqueHandle = (iInfoItemUniqueHandle + 1) & 0xFFFF;
+ iInfoItemUniqueHandle = LOWORD(iInfoItemUniqueHandle+1);
if (iInfoItemUniqueHandle == 0)
++iInfoItemUniqueHandle;
group->cl.items[i]->type = CLCIT_INFO;
diff --git a/src/modules/clist/clcmsgs.cpp b/src/modules/clist/clcmsgs.cpp index b35c7b0d64..c27564729c 100644 --- a/src/modules/clist/clcmsgs.cpp +++ b/src/modules/clist/clcmsgs.cpp @@ -160,16 +160,12 @@ LRESULT fnProcessExternalMessages(HWND hwnd, struct ClcData *dat, UINT msg, WPAR return dat->extraColumnsCount;
case CLM_GETEXTRAIMAGE:
- {
- if (LOWORD(lParam) >= dat->extraColumnsCount)
- return 0xFFFF;
-
- ClcContact *contact;
- if ( !cli.pfnFindItem(hwnd, dat, (HANDLE) wParam, &contact, NULL, NULL))
- return 0xFFFF;
-
- return contact->iExtraImage[LOWORD(lParam)];
- }
+ if (LOWORD(lParam) < dat->extraColumnsCount) {
+ ClcContact *contact;
+ if ( cli.pfnFindItem(hwnd, dat, (HANDLE) wParam, &contact, NULL, NULL))
+ return contact->iExtraImage[LOWORD(lParam)];
+ }
+ return EMPTY_EXTRA_ICON;
case CLM_GETEXTRAIMAGELIST:
return (LRESULT) dat->himlExtraColumns;
diff --git a/src/modules/clist/clcutils.cpp b/src/modules/clist/clcutils.cpp index 97b0db6abb..9c1fb44956 100644 --- a/src/modules/clist/clcutils.cpp +++ b/src/modules/clist/clcutils.cpp @@ -154,7 +154,7 @@ int fnHitTest(HWND hwnd, struct ClcData *dat, int testx, int testy, ClcContact * }
for (i=0; i < dat->extraColumnsCount; i++) {
- if (hitcontact->iExtraImage[i] == 0xFFFF)
+ if (hitcontact->iExtraImage[i] == EMPTY_EXTRA_ICON)
continue;
if (testx >= clRect.right - dat->extraColumnSpacing * (dat->extraColumnsCount - i) &&
testx < clRect.right - dat->extraColumnSpacing * (dat->extraColumnsCount - i) + g_IconWidth) {
|