graphics.MeasureString(wName, wName.GetLength(), &font1, PointF(nLINE_LEFT+45, nTop+10), &rtGdiplus);
带StringFormat(不带的话测出的值比实际的大):
RectF rectf;
StringFormat sf;
g.MeasureString(nick.c_str(), nick,size(), &font, ptF2,sf.GenericTypographic(), &rectf);