Solved

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

Posted on 1998-06-14
5
578 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
Comment Utility
answer coming.
0
 
LVL 22

Expert Comment

by:nietod
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

762 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

12 Experts available now in Live!

Get 1:1 Help Now