> > EventType myEvent;
> >
> > MemSet (&myEvent, sizeof(EventType),0);
> > myEvent.eType = ctlSelectEvent;
> > myEvent.data.ctlSelect.controlID = MainCalcButton;
> >
> > EvtAddEventToQueue (&myEvent);
>
> Try allocating dynamically the EventType :
> EventType* myEvent=malloc( sizeof( EventType));
>
> MemSet (myEvent, sizeof(EventType),0);
> myEvent->eType = ctlSelectEvent;
> myEvent->data.ctlSelect.controlID = MainCalcButton;
>
> EvtAddEventToQueue (myEvent);
un.. i *dont* think so.. EvtAddEventToQueue() just copies
the values from your pointer -> the event queue.. you have
to FREE the memory you use if you do this.. and, i dont see
that..
and, 'malloc' is not available for Palm programming. did you
try this code? the original reply mentioned that the pControl
variable is going to be NULL, and, if the system handles the
event, it needed it to be not NULL.. hence, it may crash.
// az
[EMAIL PROTECTED]
http://www.ardiri.com/ <--- free games!
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/