The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: Ash_ on April 09, 2005, 09:37:47 AM

Title: DrawText Newline help.
Post by: Ash_ on April 09, 2005, 09:37:47 AM
how do i Draw a newline when using DrawText, i have the DT_MULTILINE const applied aswell.
in C++ it's just the \n tag, but it doesent work in masm.

thanks in advance.
Title: Re: DrawText Newline help.
Post by: hitchhikr on April 09, 2005, 09:42:21 AM

db "my ",13,10,"text",0

Title: Re: DrawText Newline help.
Post by: Ash_ on April 09, 2005, 09:45:22 AM
Quote from: hitchhikr on April 09, 2005, 09:42:21 AM

db "my ",13,10,"text",0



how do i do it if im going to be writing text to buffer's then writitng the text froma  buffer though?
Title: Re: DrawText Newline help.
Post by: thomasantony on April 09, 2005, 10:11:21 AM
Quote from: Ash_ on April 09, 2005, 09:45:22 AM
how do i do it if im going to be writing text to buffer's then writitng the text froma  buffer though?
Huh??  :eek
Make yourself more clear ::) . You just have to pass ADDR Youtextname to DrawText as the appropriate parameter.

YourTextname db "my text has ",13,10,"newline",0

13 and 10 are the ASCII codes of CR and LF (Carriagereturn and line feed)

Thomas :U
Title: Re: DrawText Newline help.
Post by: hitchhikr on April 09, 2005, 10:13:06 AM
What restrain you to write 13 and 10 inside of that buffer ?