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