Actually, -Wrap removes the BS_MULTILINE (0x2000) style, but the button's height is calculated for wrapped text anyway.The docs wrote:Known limitation: Certain desktop themes might not display a button's text properly. If this occurs, try including -Wrap (minus Wrap) in the button's options. However, this also prevents having more than one line of text.
Source
Code: Select all
#NoEnv
Gui, Margin, 150, 20
Gui, Add, Button, , Common Button
Gui, Add, Button, wp hwndHBTN -Wrap, Centered -Wrap Button
ControlGet, Styles1, Style, , , ahk_id %HBTN%
Gui, Add, Button, wp hwndHBTN, Centered Third Button
ControlGet, Styles2, Style, , , ahk_id %HBTN%
Gui, Show, , Button Test
MsgBox, 0, Styles, %Styles1%`n%Styles2%
Return
GuiClose:
ExitApp