Hello,
I have a strange problem using gcc with LstSetDrawFunction and OS 3.3
What I try to do is to set up an arry of 30 strings and display it within
a list using the callback routine pointed to by LstSetDrawFunc.
It works well with OS 3.0.x but it won't work with OS 3.3:
With OS 3.3, the first part of the list is displayed as usual,
but when the list is being scrolled, only some strange characters
appear on the list.

I come from Pascal and are not very familiar with C, perhaps this
is the problem? (But: it works with OS 3.0 ...)

Any !! help appreciated!
Thank you in advance,
Nikolaus Hueck

Here the parts of my code:


/*declaration of the array as a program wide variable*/
#define  AnzahlFeiertage 30
typedef char feiertag[60];
feiertag feiertage[AnzahlFeiertage];

...

static void ListDrawFunc(UInt itemNum, RectanglePtr bounds, CharPtr *data)
{
   char t[50];
   StrCopy(t,feiertage[itemNum]);
   WinDrawChars(t,StrLen(t), bounds->topLeft.x, bounds->topLeft.y);
}

...

static void MainViewInit(void)
{
   LstSetListChoices(ptr_Liste, NULL, anzahlgewaehlt(AnzahlFeiertage));
   LstSetDrawFunction(ptr_Liste,ListDrawFunc);
   FrmDrawForm(form);
}




Reply via email to