String: Fixed that trailing spaces were ignored

This commit is contained in:
Birunthan Mohanathas 2012-07-03 15:51:53 +03:00
parent 0804bdca05
commit 8a43e40583

View File

@ -548,6 +548,7 @@ bool CMeterString::Update()
Graphics graphics(m_MeterWindow->GetDoubleBuffer());
if (DrawString(graphics, &rect))
{
LogWithArgs(LOG_ERROR, L"%f - %s", (double)rect.Width, m_Name.c_str());
m_W = (int)rect.Width;
m_H = (int)rect.Height;
}
@ -651,7 +652,8 @@ bool CMeterString::DrawString(Graphics& graphics, RectF* rect)
else
{
stringFormat.SetTrimming(StringTrimmingNone);
stringFormat.SetFormatFlags(StringFormatFlagsNoClip | StringFormatFlagsNoWrap);
stringFormat.SetFormatFlags(StringFormatFlagsNoClip | StringFormatFlagsNoWrap |
StringFormatFlagsMeasureTrailingSpaces);
}
CharacterRange range(0, stringLen);