CDC* pDC = GetDC(); CSize size = pDC->GetTextExtent(_T("GG"));//size.cx 为字符串所占水平方向的像素数 //size.cy 为字符串所占垂直方向的像素数