Thanks!
--
Geoffrey J. Corb
Center for Medical Informatics
Yale University School of Medicine
geoffr...@yale.edu
http://ycmi.med.yale.edu/~corb
203.737.6028 - phone
203.785.7074 - fax
800.347.2574 PIN# 61502 - pager
Geoffrey,
Have a look at GetTextExtentPoint32.
Dave
----
Address is altered to discourage junk mail.
Remove ".---" for the real address.
http://www.bj.co.uk
Use either the CDC::GetTextExtent() or CDC::GetOutputTextExtent() method.
These methods will return a CSize object containing the height and width of
the string. They simply use different DCs to compute the width. Look them
up in your online help. Also CDC::GetTabbedTextExtent() and
CDC::GetOutputTabbedTextExtent() may be useful. Also you could use the
CDC::DrawText() method and pass in the value DT_CALCRECT as part of the
format flags. This will set the passed-in rectangle to the size of the
string and will not actually draw the string.
Wayne Rigby
Computer and Systems Engineer
meta...@earthling.net