I find an article"Calc : screen infos of a(ctive) cell". which sounds solved the problem.next is the main code from this article.
but I still don't know how to write the funcion using c++ sdk,can anyone help mecellRectangleOnScreen.X = VisibleAreaOnScreen.X + VisibleAreaOnScreen.Width * (cellRectangle.X - VisibleArea.X) / VisibleArea.Width;
cellRectangleOnScreen.Y = VisibleAreaOnScreen.Y + VisibleAreaOnScreen.Height * (cellRectangle.Y - VisibleArea.Y) / VisibleArea.Height;
cellRectangleOnScreen.Width = cellRectangle.Width * VisibleAreaOnScreen.Width / VisibleArea.Width;
cellRectangleOnScreen.Height = cellRectangle.Height * VisibleAreaOnScreen.Height / VisibleArea.Height;
CRect GetRectOnSreen(Reference<XCell> rcell)
{
}