> From: Anuradha J
>
> I want to use gadget for drawing purpose. After displaying gadget, I
> trap pen down events and draw at all those pixel positions where a pen
> down has occured. I don't display a bitmap in a gadget.
>
> This drawing that I capture should be retieved in a void*. How do I do
> this? This is very similar to Signature app. Do I call FrmSetGadgetData()
> when a pen down occurs?
>

Note that the data field in a gadget is declared as
const void * data;

Basically, it's just a pointer to some data you have somewhere else.  By
that, I mean that you have to allocate memory for whatever you want to
store, store your data in that memory block, then call FrmSetGadgetData to
set the gadget's "data" pointer to point to whatever you stored.  So, if you
can create a good data structure to store the pixel positions, then you can
use FrmSetGadgetData to associate this data structure with the gadget and
you can use FrmGetGadgetData when you want to look at the data associated
with the gadget.

I hope this helps.


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

Reply via email to