|
-
April 10th, 2002, 11:01 PM
#1
newline in static text
How do I do to simulate "enter" action in "static text" dialog ? ( use SetDlgItem can put text...But how can I put 2nd line text ?)
Ex. I am a student.
I like playing.
...............
...............
Could someone give me some sample codes ? Thanks !
-
April 10th, 2002, 11:32 PM
#2
Re: newline in static text
SetDlgItemText(IDC_TEXT,"Here is first line\nHere is second line");
Regards,
Brandon Parker
Regards,
Brandon Parker
-
April 11th, 2002, 12:53 AM
#3
Re: newline in static text
Thanks a lot...
But if I want to "dynamically" arrange text ( SetDlgItemText(xxxxx) puts "fixed" text...), what should I do ?
Ex. 1. prepare char *p = "xxxxx\n" + "yyyyyy\n"
+ "zzzzz"
2. SetDlgItemText( , p )
Is this correct ???
Thanks !!!
-
April 11th, 2002, 01:29 AM
#4
Re: newline in static text
Thanks a lot !
But if I want to "dynamically" arrange text
( SetDlgItemText() puts "fixed" text), what should
I do ?
Ex.
1. prepare char *p = "xxxx\n"+"yyyy\n"+"zzzz"
2. SetDlgItemText( , p )
Is it correct ?
Thanks !
-
April 11th, 2002, 01:58 AM
#5
Re: newline in static text
Hi,
Use \r\n instead of only \n for multiline statis control
Ex. 1. prepare char *p = "xxxxx\r\n" + "yyyyyy\r\n"
+ "zzzzz"
2. SetDlgItemText( , p )
Regards
santanu
Be sure to rate answers if it helped, to encourage them.
-
April 11th, 2002, 02:43 AM
#6
Re: newline in static text
Thanks ! I will try it immediately....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|