View Single Post
Old Feb 15th, 2008, 2:45 PM   #2
Ancient Dragon
PFO God In Training
 
Ancient Dragon's Avatar
 
Join Date: Jun 2005
Location: near St Louis, MO. (USA)
Posts: 532
Rep Power: 4 Ancient Dragon is on a distinguished road
Re: determing whitespace to center text

If you use MFC there is a CDC c++ class that will help you with that centering. There is also the win32 api function TextOut() But you have to know where you want the text to start (x and y coordinates). That will depend on the font and font size being used. If you navigate through some of the links in MSDN you will probably find some example(s) you can use.
Ancient Dragon is offline   Reply With Quote