Solved

How to display vertically oriented text? (VC++ 4.0)

Posted on 1998-06-14
5
579 Views
Last Modified: 2010-08-05
Is there a way to display vertically oriented text using the standard text
functions of the CDC classlike "TextOut" or "SetTextAlign"? In the MFC
help files I have found no hint on how to do this.
If it is not possible with the standard methods, how can I do that at all?
0
Comment
Question by:rernst
  • 4
5 Comments
 
LVL 22

Accepted Solution

by:
nietod earned 150 total points
ID: 1165884
answer coming.
0
 
LVL 22

Expert Comment

by:nietod
ID: 1165885
You specify this when you create the font.  
The escapement is the angle the text goes in as succesive characters are drawn.  An escapement of 0 draws from left to right (for left to right fonts).    And escapement of 90 degrees (900) will cause the text to be drawn vertically.

continues.
0
 
LVL 22

Expert Comment

by:nietod
ID: 1165886
There is another related quantity that is specified when you create the font.  The orientation.  The orientation specifies the angle of each character within the line of text.  For example, If the orientation equals the escapement, the characters are not tilted with respect to the direction the text is being drawn in.  If the escapement is 0, the characters always appear upright, regardless of the direction the text is draw in.  Does that make sense?

On windows 95, you must specify that the orientation equals the escapement.  This means when you draw vertical text, the characters will be on their sides.  If that is not what you want, let me know, there is another way, but much more work.
0
 

Author Comment

by:rernst
ID: 1165887
Thank you, Nietod,

  this is exactly what I've been looking for. After going through the VC++ help once
again I finally found that CFont::CreateFont provides two parameters, nEscapement
and nOrientation, where one can specify the desired values. So far I have always used
the CreatePointFont function because you have to specify only 3 parameters and
so it looked much more convenient to me.

0
 
LVL 22

Expert Comment

by:nietod
ID: 1165888
Your welcome.  I would have made more clear where these parameters were used.  But I don't  use MFC and the two API functions for creating fonts both take these paremeters  (And several hundred more. Well not hundreds, but it seems that way.)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now