Solved

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

Posted on 1998-06-14
5
600 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
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 …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
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.

627 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