How can I create a multiline button in winAPI (\n or even \r\n doesn't work). Here is the code:
HWND hPrzyciskoff = CreateWindowEx( 0, "BUTTON", "Play offline", WS_CHILD | WS_VISIBLE | WS_TABSTOP, 410, 550, 380, 25, hwnd, NULL, hInstance, NULL );
Add BS_MULTILINE to the styles you specify in the 4th argument of CreateWindowEx().
As the documentation of Button Styles explains:
BS_MULTILINE
Wraps the button text to multiple lines if the text string is too long to fit on a single line in the button rectangle.
The \n characters inside the button text will then have the desired effect.
Check the screenshot on the Button Types page to see how it looks like.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With