因为有这样的设置: DT_LEFT | DT_VCENTER | DT_SINGLELINE所以总在一个位置显示
解决方案 »
- 0xC015000F:正在被停用的激活上下文不是最近激活的bug
- 请问如何比较两组数据的大小?
- OpenGL怎么对某个物体进行操作?....
- 如何在Dialog上响应ComboBox的CBN_SELCHANGE事件
- 请问谁做过烧录光盘的程序?谢谢
- 菜鸟想问我的机器上装了vc++6.0,还能装vc.net吗?
- 关于TREEVIEW控件(在线等待,高分!!)
- 大家进来看看我的情况使用“二维数组”是好的解决方案吗?有没有更好的办法,路过给点意见啊,里面有问题的详细介绍
- 怎么通过路径把bmp、jpg、gif等格式的图片在picture控件上显示出来
- 快快帮帮我,如何在VC6多文档程序的对话框类中获取视类句柄???
- 初学者
- 发现一个问题
代码帖多一点出来
DT_LEFT 是水平从左开始
DT_VCENTER 是纵向居中
DT_SINGLELINE 是显示单行
//判断是否是汉字
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();
}
我用CString的Delete函数就会画不出来
不知道是什么原因哪位高手知道呢