用DrawText的DT_VCenter怎么实现竖排文字居中? (10分)<br>分类:Windows API jdelphi (2002-02-06 11:00:00) <br>procedure TForm1.Button1Click(Sender: TObject);<br>var<br> ss:string;<br> re:trect;<br>begin<br> ss:='你好,欢迎光临';<br> re:=rect(5,5,20,500);<br> DrawText(Canvas.handle,pchar(ss),length(ss),re,dt_singleline or dt_vcenter);<br>end;<br>显示还是横的 <br> <br>lld (2002-02-06 11:09:00) <br>dt_vcenter控制的是纵向居中,不是竖排 <br> <br>jdelphi (2002-02-06 11:32:00) <br>那么怎么实现使文字竖排并能够纵向居中呢? <br> <br>sygzch (2002-02-07 18:11:00) <br>procedure TForm1.Button1Click(Sender: TObject);<br>var<br> ss:string;<br> re:trect;<br>begin<br> ss:='你好,欢迎光临';<br> re:=rect(5,5,20,500);<br> DrawText(Canvas.handle,pchar(ss),length(ss),re,DT_WORDBREAK or DT_CENTER);<br>end;<br><br> <br>lld (2002-02-08 9:37:00) <br>应该从字体的方向、角度方面去考虑 <br> <br>jdelphi (2002-07-11 18:27:00) <br>多人接受答案了。 <br> <br><br>sygzch-10,的回答最终被接受。<br>