Dave's Brain

Browse - Programming Tips - How can I make the text in a MessageBox() more than one line?

Date: 2009aug30
Level: beginner
Language: C/C++
OS: Windows
Platform: win32
Keywords: multiline

Q.  How can I make the text in a MessageBox() more than one line?

A.  Place \r\n between lines like this:

MessageBox("Line One\r\nLine Two\r\nLine Three", "My Program", MB_OK);

Add a comment

Sign in to add a comment
Copyright © 2008-2017, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.