Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


NewLine for a textBox?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Sun Aug 26, 2007 8:56 pm    Post subject: NewLine for a textBox? Reply with quote

this is C++, its a multilined textBox with Vertical Scroll Bars and Word Wrap.

k well heres my code snippet: (not done, thats y money = 0)

Code:
private: System::Void btnStart_Click(System::Object^  sender, System::EventArgs^  e) {
          int day;
          double money = 0;
          for (day = 0; day < 366; ++day)
          {
             txtFinal->Text = txtFinal->Text+("Day: " + (day) + /* Need new line here! */ "Money: $" + (money)  /* Need 2 New Lines Here! */);
             Form1::Cursor = System::Windows::Forms::Cursors::WaitCursor;
          }
          Form1::Cursor = System::Windows::Forms::Cursors::Default;
       }


i tried

SendKeys::Send("{ENTER}");

but it wont do it inside of the of the appending of the textBox without an error...

i also tried
SendInput(1,enter,sizeof(enter));
(enter is defined above).

but i get some random error.

also tried "\n" and '\n' but nothing.

its probly something simple. but w/e. thx to anyone who helps

_________________
Back to top
View user's profile Send private message
nog_lorp
Grandmaster Cheater
Reputation: 0

Joined: 26 Feb 2006
Posts: 743

PostPosted: Sun Aug 26, 2007 9:49 pm    Post subject: Reply with quote

did you do
txtFinal->Multiline = true;
?

MSDN claims that with multiline, \n should make a new line in the textbox.

_________________
Mutilated lips give a kiss on the wrist of the worm-like tips of tentacles expanding in my mind
I'm fine accepting only fresh brine you can get another drop of this yeah you wish
Back to top
View user's profile Send private message
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Mon Aug 27, 2007 9:26 am    Post subject: Reply with quote

Multiline is already true. i set the textBox itself to multiline.

when i tried adding this to the end of it

Code:
 + "\n"


nothing happened. and it didnt work

_________________
Back to top
View user's profile Send private message
nog_lorp
Grandmaster Cheater
Reputation: 0

Joined: 26 Feb 2006
Posts: 743

PostPosted: Mon Aug 27, 2007 12:01 pm    Post subject: Reply with quote

Is the texbox's width big enough? Put text after the \n, "test\nline2\nline3"
_________________
Mutilated lips give a kiss on the wrist of the worm-like tips of tentacles expanding in my mind
I'm fine accepting only fresh brine you can get another drop of this yeah you wish
Back to top
View user's profile Send private message
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Mon Aug 27, 2007 12:22 pm    Post subject: Reply with quote

yes im pretty sure its big enough, im at work right now so i cant test it out.

i will reply back when i get home

Edit:

i tested some things out (setting default text)

and figured out that it uses \r\n instead of just \n, i tried it out and it works,

this thread may be ignored now Smile

_________________
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites