I’m creating a line chart control, and I need to write (or better say draw) the axis names and axis values.
I found DrawText and TextOut functions, but the text they show is flickering and don’t know how to set the font and text orientation (I will need vertical text orientation as well as horizontal).
Are there any other functions you could recommend or how to use these stated above and get the results I need?
I doubt the flickering is caused by DrawText or TextOut, but rather your paint method. If you are redrawing the entire window on the paint event it is likely to flcker as you erase the whole window, and then there is a perceptible delay before all elements are redrawn.
It may be possible to reduce the flicker acceptably by only painting the invalidated region; however this can become complex. A simpler method is to use double buffering; where you draw to a non-visible memory context, and then switch it to visible context.
Try Google’ing “MFC double buffering” for plenty of examples.