Dear Support,
Because the lack of support in this matter, I wrote this functionality myself, It is something like this:
void CMyGrid::OnMouseMove(UINT nFlags, CPoint point)
{
static int nLastCellCol=-1;
static int nLastCellRow=-1;
CExtGridHitTestInfo hti;
hti.m_ptClient = point;
HitTest(hti,true,true);
if (__EGBWA_INNER_CELLS&hti.m_dwAreaFlags)
{
if (hti.m_nRowNo!=-1 && hti.m_nColNo!=-1)
{
CExtGridCell* pCell = GridCellGet(hti.m_nColNo, hti.m_nRowNo);
if (pCell)
{
CString str;
pCell->TextGet(str);
if (nLastCellCol!=hti.m_nColNo || nLastCellRow!=hti.m_nRowNo)
{
CPoint ptToolTip(point);
ptToolTip.x = hti.m_rcItem.left;
ptToolTip.y = hti.m_rcItem.top;
ClientToScreen(&ptToolTip);
CString strTooltip;
strTooltip.Format("Row:%d - Col:%d : %s", hti.m_nRowNo, hti.m_nColNo, str.GetString());
CRect rc(hti.m_rcItem);
ClientToScreen(&rc);
int nHalfWidth = rc.Width()/2;
rc.left-=nHalfWidth;
rc.right-=nHalfWidth;
m_info.SetTipStyle(CExtPopupMenuTipWnd::__ETS_INV_RECTANGLE);
m_info.SetText(strTooltip);
m_info.Show(this,rc,true);
nLastCellCol=hti.m_nColNo;
nLastCellRow=hti.m_nRowNo;
CBaseGrid::OnMouseMove(nFlags, point);
return;
}
}
}
}
m_info.Hide();
nLastCellCol=-1;
nLastCellRow=-1;
CBaseGrid::OnMouseMove(nFlags, point);
}
In my base class I added:
CExtPopupMenuTipWnd m_info
And the
OnMouseMove
event handling.
Please note that I need to change the base cell class to add a
GetComment
function, currently I am using
GetString
.
If you could add this functionality to the next version it will be wonderful.
Thanks,
Ron.