Hello.
I want to display the tool tip of the specific cell.
I made the following programming.
Is the program good in this?
void XXXGrid::CellToolTip( CExtSafeString strNewTipText , CPoint * pPntFocus )
{
CExtGridCell *pCell = NULL;
CPoint ptFocus ;
ptFocus = FocusGet();
CRect rc;
GridCellRectsGet(
1,
ptFocus.y ,
0,
0,
NULL,
&rc
);
CRect rcExcludeArea;
GetWindowRect( &rcExcludeArea );
rc.left += rcExcludeArea.left;
rc.top += rcExcludeArea.top;
rc.right += rcExcludeArea.left;
rc.bottom += rcExcludeArea.top;
SetCursorPos( rc.left + rc.Width() / 2 , rc.top + rc.Height() / 2 );
CExtPopupMenuTipWnd & wndTip = GetTip();
wndTip.SetText( LPCTSTR(strNewTipText) );
wndTip.Hide();
CWnd * pWnd = FromHandle( m_hWnd );
wndTip.Show( pWnd, rc , true );
}