|
楼主 |
发表于 2020-3-13 03:30:01
|
显示全部楼层
doubleByte = csViewTemp.GetAt(subIndex);
//判断是否是汉字
if(IsDBCSLeadByte(doubleByte) != 0)
{
if(subIndex == 0)
{
subIndex = subIndex + 1;
}
else if(subIndex != 65 && subIndex != 66)
{
subIndex = subIndex + 1;
}
else if(subIndex == 66)
{
memDC.SelectObject(&DetailFont);
rc.SetRect(nLeft, yAxis, nRight, yAxis + yPix * 5);
yAxis = yAxis + yPix * 5;
memDC.DrawText((LPCTSTR)csViewTemp.Mid(0, 66), &rc, DT_LEFT | DT_VCENTER | DT_SINGLELINE);
csViewTemp.Delete(0, 66);
subIndex = 0;
}
else
{
memDC.SelectObject(&DetailFont);
rc.SetRect(nLeft, yAxis, nRight, yAxis + yPix * 5);
yAxis = yAxis + yPix * 5;
memDC.DrawText((LPCTSTR)csViewTemp.Mid(0, 67), &rc, DT_LEFT | DT_VCENTER | DT_SINGLELINE);
csViewTemp.Delete(0, 67);
subIndex = 0;
}
}
else
{
if(subIndex == 0)
{
}
else if(subIndex == 66)
{
memDC.SelectObject(&DetailFont);
rc.SetRect(nLeft, yAxis, nRight, yAxis + yPix * 5);
yAxis = yAxis + yPix * 5;
memDC.DrawText((LPCTSTR)csViewTemp.Mid(0, 67), &rc, DT_LEFT | DT_VCENTER | DT_SINGLELINE);
csViewTemp.Delete(0, 67);
subIndex = 0;
}
}
if(csViewTemp.GetLength() <= 67)
{memDC.SelectObject(&DetailFont);
rc.SetRect(nLeft, yAxis, nRight, yAxis + yPix * 5);
yAxis = yAxis + yPix * 5;
memDC.DrawText((LPCTSTR)csViewTemp, &rc, DT_LEFT | DT_VCENTER | DT_SINGLELINE);
subIndex = csViewTemp.GetLength();
} |
|