| View previous topic :: View next topic |
| Author |
Message |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Wed Aug 27, 2008 1:06 pm Post subject: appending to an edit |
|
|
I was wondering how you can append text to an editbox without copying the text in the edit box and then appending to that and then setting the text.
_________________
| 8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
|
|
| Back to top |
|
 |
HomerSexual Grandmaster Cheater Supreme
Reputation: 5
Joined: 03 Feb 2007 Posts: 1657
|
Posted: Wed Aug 27, 2008 1:52 pm Post subject: |
|
|
confusing statement but ok. is this what you mean?
TextBoxText , This text is in text box and you want it to be something like
TextBoxTextasdfas , and you don't want to actually get the text from step 1 and then add to it? You want to directly add the suffix to it?
The easiest way would be the way you said you don't want. Get the text from textbox, lstrcat, and then set the text either by message or SetDlgItemText
_________________
|
|
| Back to top |
|
 |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Wed Aug 27, 2008 1:58 pm Post subject: |
|
|
Ok And \r\n makes a newline?
_________________
| 8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
|
|
| Back to top |
|
 |
kitterz Grandmaster Cheater Supreme
Reputation: 0
Joined: 24 Dec 2007 Posts: 1268
|
Posted: Wed Aug 27, 2008 1:59 pm Post subject: |
|
|
you can use the += operator to add to a textbox in managed C++.
\r\n will do, but \n will also (I think)
|
|
| Back to top |
|
 |
Overload Master Cheater
Reputation: 0
Joined: 08 Feb 2008 Posts: 293
|
Posted: Wed Aug 27, 2008 3:08 pm Post subject: |
|
|
\n makes a new line. Forget what \r does.
_________________
Blog
| Quote: | Rhys says:
you can be my maid
Rhys says:
ill buy you a french maid outfit
Tyler says:
Sounds good
Rhys says:
ill hold you to that |
|
|
| Back to top |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
Posted: Wed Aug 27, 2008 3:16 pm Post subject: |
|
|
\r is a Carriage Return. It basically returns the text cursor thing (|) all the way to the left. It basically means its the end of the line.
_________________
|
|
| Back to top |
|
 |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Wed Aug 27, 2008 6:23 pm Post subject: |
|
|
Well I heard someone said to use \r\n to make a newline. But when I used to only use \n it just gave me a null character (you know the box). Will \r\n make any differences or just give me two null characters (two boxes).
_________________
| 8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
|
|
| Back to top |
|
 |
kitterz Grandmaster Cheater Supreme
Reputation: 0
Joined: 24 Dec 2007 Posts: 1268
|
Posted: Wed Aug 27, 2008 6:24 pm Post subject: |
|
|
| oib111 wrote: | | Well I heard someone said to use \r\n to make a newline. But when I used to only use \n it just gave me a null character (you know the box). Will \r\n make any differences or just give me two null characters (two boxes). |
Why don't you try it out.
Edit: Sorry, my fault, you do need \r\n
|
|
| Back to top |
|
 |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Wed Aug 27, 2008 7:17 pm Post subject: |
|
|
Thank you x0r so much
_________________
| 8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
|
|
| Back to top |
|
 |
|