Hi, I do it like this, not sure its the best way, buts it neat and it works.
typedef enum { /* User defined events */
userReadPort = firstUserEvent,
userValidMsg,
userRadioBattLow,
userVectorRedraw,
userModeChange
} user_eventsEnum;
EventType user_event;
/* Post our own event to the queue */
user_event.eType = (eventsEnum)userRadioBattLow;
/* Add other paremeters here */
EvtAddEventToQueue (&user_event);
Get the event as any other palm event.
Rik
> -----Original Message-----
> From: Jason Partyka [SMTP:[EMAIL PROTECTED]]
> Sent: 07 December 2000 15:10
> To: Palm Developer Forum
> Subject: RE: [W] Multiple Threads under Codewarrior
>
> By user defined messages you mean user-defined events, right? I haven't
> figured out a way to include data with user-defined events, although that
> may be due to limited experience in C. Is such a thing possible on the
> Palm, and if so, can someone point me to documentation on how to do so?
>
> -jp-
>
> >>> [EMAIL PROTECTED] 12/07/00 08:41AM >>>
> As the OS is message based, you can sort of have psuedo threads, activated
> by messages, although they will have to run to completion. I think a lot
> of
> people dont use the message based stuff to its full potential. User
> defined
> messages are very usefull. A Windows 3.1 programming background is usefull
> here.
>
> Rik
>
> > -----Original Message-----
> > From: Steve Stover [SMTP:[EMAIL PROTECTED]]
> > Sent: 07 December 2000 16:23
> > To: Palm Developer Forum
> > Subject: RE: [W] Multiple Threads under Codewarrior
> >
> > Thanks, Rik,
> >
> > That's what I figured. It will make this data log timing loop much more
> > convoluted, but doable. Oh well... :(
> >
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]] On Behalf Of
> Richard
> > Anderson
> > Sent: Thursday, December 07, 2000 6:13 AM
> > To: Palm Developer Forum
> > Subject: RE: [W] Multiple Threads under Codewarrior
> >
> > Your not allowed/supposed to used multiple threads in Palm apps full
> stop.
> >
> > Rik
> >
> > > -----Original Message-----
> > > From: Steve Stover [SMTP:[EMAIL PROTECTED]]
> > > Sent: 07 December 2000 15:58
> > > To: Palm Developer Forum
> > > Subject: [W] Multiple Threads under Codewarrior
> > >
> > > Hello Palmreaders,
> > >
> > > I don't remember any mention or discussion of multiple "Thread"
> > > programming
> > > under Codewarrior. Are multiple threaded programs possible under
> > > Codewarrior, and where do I find information about it if it is
> possible?
> > >
> > > Thanks,
> > > Steve Stover
> > > SRC
> >
> >
> > --
> > For information on using the Palm Developer Forums, or to unsubscribe,
> > please see http://www.palmos.com/dev/tech/support/forums/
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
> please see http://www.palmos.com/dev/tech/support/forums/
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
> please see http://www.palmos.com/dev/tech/support/forums/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/