int CListCtrlEx::OnToolHitTest(CPoint /*point*/, TOOLINFO* /*pTI*/) const { int nID = -1; #ifdef _TOOL_TIP_ENABLE int nCol; CRect rect; int nRow = CellRectFromPoint(point, &rect, &nCol); if(nRow == -1 ) return -1; pTI->hwnd = m_hWnd; pTI->uId = (UINT)((nRow << 10) + (nCol & 0x3ff) + 1); nID = pTI->uId pTI->lpszText = LPSTR_TEXTCALLBACK; pTI->rect = rect; #endif return nID; }
INT_PTR #else int #endif CListCtrlA::OnToolHitTest( CPoint point, TOOLINFO* pTI) const{ int row, col; RECT cellrect; row = CellRectFromPoint(point, &cellrect, &col ); if ( row == -1 ) return -1; pTI->hwnd = m_hWnd; pTI->uId = (UINT)((row<<10)+(col&0x3ff)+1); pTI->lpszText = LPSTR_TEXTCALLBACK; cellrect.bottom += 200; pTI->rect = cellrect; return pTI->uId; }