One problem off hand is that you are not creating a buffer to store the
result from StrIToA( text, tem );

You probably want to do something like the following.

char text[ maxStrIToALen ];  // char *text will cause memory violations.
StrIToA( text, temp );

DrawCharstToFitWidth( text, bounds );

This could cause many weird problems in you program!

Brad


"jason" <[EMAIL PROTECTED]> wrote in message
news:105496@palm-dev-forum...
>
> help:
> i use this drawfunction to draw my list ,but i found that ,when then
> parameter "UInt32  tem  >100", my list can't response to my click .
> static void DrawCheckInfoList(Int16 itemNum,RectangleType *bounds,char
> **itemText)
> {
>
>  UInt16  seekAmount = itemNum;
>
>  char *text;
>
>   StrIToA(text,tem);  //tem is the number i want to set to the list
>   DrawCharsToFitWidth(text, bounds);
>
>
> }
> static void DrawCharsToFitWidth( char const *s, RectanglePtr r)
> {
>  Int16 stringLength = StrLen(s);
>  Int16 pixelWidth = r->extent.x;
>  Boolean truncate=true;
>
>  // FntCharsInWidth will update stringLength to the
>  // maximum without exceeding the width
>  FntCharsInWidth(s, &pixelWidth, &stringLength, &truncate);
>  WinDrawChars(s, stringLength, r->topLeft.x, r->topLeft.y);
> }
>
>
>
>



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

Reply via email to