richedit,当我扩大行距时,如何使文本在一行中垂直居中? [英] richedit ,How can i to make the text be centered vertically in a line,when i expand the line spacing?
本文介绍了richedit,当我扩大行距时,如何使文本在一行中垂直居中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好.
我有问题,我找不到解决方案.
hello everyone.
i have a problem,i can not find the Solutions.
PARAFORMAT2 pf2;
ZeroMemory(&pf2, sizeof(PARAFORMAT2));
pf2.dwMask = PFM_LINESPACING;
pf2.bLineSpacingRule = 4;
pf2.dyLineSpacing = 300;
SetSel(iBPos,iEPos);
SetParaFormat(pf2);
当我通过代码扩展行距时.
但是文本没有垂直居中,并且文本靠近下一行,则在上面显示了行距.
我想使文本在行中垂直居中,该怎么办?
我不确定可以在richedit中实现此功能,但是当我在officeword中扩大行距时,我看到文本在一行中居中.
when i expand the line spacing by the code.
but the text is not centered vertically,and the text is close to the next line,the linespace Appears above.
i want to make the text be centered vertically in the line, what can i do?
i do not sure it can be achieved in the richedit,but i see that the text be centered vertically in a line,when i expand the line spacing in the officeword.
推荐答案
在对pf2进行ZeroMemory之后设置
Set
pf2.cbSize = sizeof(PARAFORMAT2)
,它应该都可以工作
这篇关于richedit,当我扩大行距时,如何使文本在一行中垂直居中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文