Problems with useing Edit Boxes

Started by
4 comments, last by El_Bosso 22 years, 2 months ago
Hi, I''ve wanted to make a console, like the Quake3 Console, including a Dialog Box for the startup. I''m using for the Messages a Edit Box, but how can I make a line jump? If I use ''\n'' in the string, which I send to SetDlgItemText, I only get a symbol in the EditBox. The same happens when I use ''\t''. My second question is: How can I get a text of a EditBox, without using a Button which will be activated, when you pres enter (after writing the order)? Thanks in advance
Advertisement
Use "\r\n".
enable "multiline" or something like that on the edit boxes properties. then ''\n'' will work fine.
But make sure to use sprintf to format the text with "\r\n" before you output it.
Thanks, it works but what does \r mean?

And has anybody an Idea about my second problem (the Input EditBox without a Button)?
\n Is the newline or linefeed symbol, and \r is carridge return. In Windows you need the combination of both b/c the \r tells windows to return the cursor to the start of the row, while, \n says go to next row.
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989

This topic is closed to new replies.

Advertisement