Table of Contents

 
GetTextLength
 

Purpose

Gets the length of a text object

 

Protoype

int CTextMngr::GetTextLength (string str_text_id)
 

Parameters

text_id the ID of the text object to get the length of
 

Description

The return value of this function depends on whether or not the text object passed in has a clipping box set up or not. If there is a clip box then the length of the clip box is returned. If there is no clip box then the length of the text itself (which can vary depending on the font used) is returned.

 

Use

CTextMngr text;
int i_length = text.GetTextLength("my_text");
 

Prev: GetTextHeight
Next: GetTextX