1

Is it possible to center text vertically in an edit control in pure win32 api ? The controls are already super-classed so a sub/super classing solution is not a problem. But shifting/changing to some custom control is not an option.

I am working in c++;

4

2 回答 2

2

您必须手动插入适当数量的空格。

如果要使文本居中,“RichEdit”是合适的 Win32 控件。

于 2013-01-13T13:20:41.830 回答
-2

您可以将ES_CENTER窗口样式应用于 EDIT 控件。如果它具有ES_MULTILINE窗口样式,则它的所有线条都将居中。

于 2013-01-14T22:34:13.377 回答