> I have a string resource that I would like to add some simple formatting
to
> with newlines. Is this possible? I'm using "\n" but am getting errors.
Not sure if this will help you at all, but here's a function I coded
recently (I took out some superfluous stuff, so test it if you use it).
//
// Equivalent of "WinDrawChars" but handles newlines (lifted from
PalmOS.com)
//
void
cfDrawChars(Char* msg, short xp, short yp)
{
Char* c;
UInt16 msgLen;
while (msg)
{
c = StrChr(msg, '\n');
if (c == NULL)
msgLen = StrLen(msg);
else
{
msgLen = c-msg;
c++;
}
WinPaintChars(msg, msgLen, xp, yp);
yp += FntLineHeight();
msg = c;
}
}
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/