计算gdi 函数DrawString绘制的字符串象素长度和高度
作者:互联网
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);
标签:象素,wName,rectf,StringFormat,nick,DrawString,gdi,sf,MeasureString 来源: https://www.cnblogs.com/Toya/p/13807830.html