IonicWind Software

IWBasic => GUI Central => Topic started by: LarryMc on April 07, 2009, 04:17:42 AM

Title: Vertical Text
Post by: LarryMc on April 07, 2009, 04:17:42 AM
I need a easy way to create vertical text in a device context.

I'm NOT talking about rotating a horizontal line of text like the attached.

I want to be able to output a line of text like this:
QuoteV
    e
    r
    t
    i
    c
    a
    l

I've played with all the parameters of LOGFONT without any luck.
The only way I can think of is putting it in a loop for each letter; getting the extents; textout the letter; then increment the y.

I need to use getextents to allow for different size fonts.

Anyone know of an easy way?

Larry
Title: Re: Vertical Text
Post by: LarryMc on April 07, 2009, 07:20:53 AM
Stumbled across the answer.
All I have to do is:
1.  switch from using TextOut to DrawText
2. insert \n between each of the letters.

Everything lines up perfect


Larry