I found your mail and name from this milis, I want to ask you how to write text like this bellow :
"Hei I learned to write text in multiple line but. like this"
if I use WinDrawChars() it's cut off because the text is too wide.
I've been read about TextWrap or else but I don't know how to use it.
Can you please give me a simple code how to use Wrap text?
Something like this (warning, uncompiled and untested code ahead):
void TextBox(const Char* textP, const RectangleType* bounds) { // Assume font is set correctly on entry. Int16 lineHeight = FntLineHeight(); Coord curY = bounds->topLeft.y; Coord maxY = curY + bounds->extent.y - lineHeight;
// Wrap until there's no more text, or we can't draw a full // (unclipped) line because we've run out of vertical space. while ((*textP != '\0') && (curY <= maxY)) { UInt16 bytesOnLine = FntWordWrap(textP, bounds->extent.x); WinDrawChars(textP, bytesOnLine, bounds->topLeft.x, curY); curY += lineHeight; textP += bytesOnLine; } }
-- 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/support/forums/