|
doubleByte = csViewTemp.GetAt (subIndex);
// Judge whether it is a Chinese character
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;
}
Ranch
}
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 ();
} |
|