我这儿有一个转换函数 CDC* pDC = GetDC();
m_nLogX = pDC->GetDeviceCaps(LOGPIXELSX);
m_nLogY = pDC->GetDeviceCaps(LOGPIXELSY);
ReleaseDC(pDC);CRect CDerivedMSFlexGrid::GetCellRect(int row, int col)
{
SetRow(row);SetCol(col);
int x,y,wid,height;
x=GetCellLeft()* m_nLogX/1440;
y=GetCellTop()* m_nLogX/1440;
wid=GetCellWidth()* m_nLogX/1440;
height=GetCellHeight()* m_nLogX/1440;
return CRect(x-3,y-3,x+wid-3,y+height-3);
}