At 05:51 AM 11/24/2003, Jeremy wrote:
I'm having a strange problem with WinDrawChar.  It works fine with other
characters in stdFont, but with some of the less common characters such as
'=B5' and '=BC', I get the following error:

called SysFatalAlert with the message:  "TextMgr.cpp,
Line 2723, Sign-extended char passed to TxtSetNextChar

WinDrawChar (c, position + bounds.topLeft.x, y);

your 'c' variable is a Char. Make it a WChar instead, or cast it to WChar= =20 in the call, i.e.

WinDrawChar ((WChar)c, position + bounds.topLeft.x, y);

Unfortunately this doesn't work, as the 8-bit value is still sign-extended to 16-bits. What you need is:


WinDrawChar((UInt8)c, position + bounds.topLeft.x, y);

-- 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/

Reply via email to