You can use a Read Only RichEdit control with EM_SETPARAFORMAT and PFM_LINESPACING flag
A test with bLineSpacingRule = 4
and dyLineSpacing = 100 or dyLineSpacing = 400 : Rich-Edit-Line-Spacing.jpg
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi!
I have a C++ Win32 application where I use a standard form and a static text inside it. I need to extend the line spacing (space between lines) and I did not find any way to do it. I know I can change the font of the control but the line spacing is not a font attribute. Is there any way to define the line spacing using Win32?
Thanks
You can use a Read Only RichEdit control with EM_SETPARAFORMAT and PFM_LINESPACING flag
A test with bLineSpacingRule = 4
and dyLineSpacing = 100 or dyLineSpacing = 400 : Rich-Edit-Line-Spacing.jpg
You could use a read-only rich edit control where you can specify line spacing instead of a static control.
To directly answer your question.
You have to understand that the static control is meant to be simple. For the static text control, it is designed specifically for a dialog box type window and usually used as a label. This means there is no way to set the static text control's line spacing.