void ThumbInfo::OnLButtonUp() { RECT rcMiranda; RECT rcThumb; RECT rcOverlap; if (!bMouseMoved && fcOpt.bUseSingleClick && bMouseIn) PopupMessageDialog(); if (bMouseDown) { bMouseDown = FALSE; SetCursor(LoadCursor(nullptr, IDC_ARROW)); // Check whether we shoud remove the window GetWindowRect(hwndMiranda, &rcMiranda); GetThumbRect(&rcThumb); if (IntersectRect(&rcOverlap, &rcMiranda, &rcThumb)) { if (IsWindowVisible(hwndMiranda)) { DeleteContactPos(); thumbList.RemoveThumb(this); } } } SaveContactsPos(); }
static int OnContactDrop(WPARAM hContact, LPARAM) { RECT rcMiranda; RECT rcThumb; ThumbInfo *pThumb = thumbList.FindThumbByContact(hContact); if (hNewContact == hContact && pThumb != NULL) { hNewContact = NULL; GetWindowRect(hwndMiranda, &rcMiranda); pThumb->GetThumbRect(&rcThumb); } SaveContactsPos(); return 1; }