A simple method to implement text vertical bars in VC, vc text vertical bars

Source: Internet
Author: User

A simple method to implement text vertical bars in VC, vc text vertical bars

Many people think that it is very difficult to implement vertical text layout in VC. In fact, you can use the font "lie" to easily implement vertical text layout.

Some fonts in Windows are "Lie down", such as @ Fixedsys, @ System, @ ,, @, and many others, the only difference between these fonts and those without @ is that the text displayed in these fonts is "Lie down. For example:

You can rotate these lying fonts 270 ° to vertically arrange the text. The effect is as follows:


The following code can generate a vertical.

CFont font; CFont * pOldFont; font. createFont (18, 0, 2700,270 0, FW_NORMAL, 0, 0, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH, "@ "); pOldFont = dc. selectObject (& font) dc. textOut (50, 50, "vertical text"); dc. selectObject (& pOldFont)/* He asked hovertree.com */

 

You can give it a try.

Recommended: http://www.cnblogs.com/roucheng/p/cpphong.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.