At 12:00am -0700 00-04-27, Palm Developer Forum digest wrote:
>   // how many characters do we draw
>
>#ifdef WORD_WRAP
>   count =3D FntWordWrap(myString, rect.extent.x);
>#else
>   {
>     Boolean truncated =3D false;
>     count =3D StrLen(myString);
>     FntCharsInWidth(myString, &rect.extent.x, &count, &truncated);
>   }
>#endif
>
>   // draw the string
>   WinDrawChars(myString, count, rect.topLeft.x, rect.topLeft.y);
>
>   // lets reset the clipping region
>   WinResetClip();

1. FntWordWrap does lots of special stuff that's really only 
appropriate for text in a field. So I'd only use it if I needed to 
draw multi-line static text.

2. Otherwise, calling WinDrawTruncChars is the easiest way to draw 
truncated text with a terminating ellipsis character. You can use 
WinGlueDrawTruncChars in the PalmOSGlue library if you need pre-3.1 
compatibility.

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to