"Oscar" <[EMAIL PROTECTED]> wrote in message
news:39694@palm-dev-forum...
>
> Yes, I have the same problems too, also even I have set the gadgethandler
> for the extended gadget, I still cannot see the gadget display on the
form.
> Also, it seems cannot capture the ctlSelectEvent when I try to tap on the
> postion the gadget suppose to be. moreover, how can I draw something in
the
> gadget? Just draw another bitmap at the same position as the gadget and
> overlap it? So, can anyone give us detail help on those gadget problems? I
> have already try lots of ways to solve it for a week, but still nothing go
> smoothly...........Please help!
This is quite odd. As far as I can tell, the only official way in OS 3.5 to
create an extended gadget is to use FrmNewGadget, which dynamically adds an
extended gadget to your form. I was pretty surprised to see that the
resource format for gadgets defined in UIResDefs.h didn't give an "extended"
bitfield.
I don't think there will ever be a problem with memory allocation and the
handler field. The OS always has to convert between the resources and the
internal representation, so even if gadgets didn't have a handler field in
previous OS version, they do in 3.5.
>From looking at the 3.5 source, the gadget handlers do look like they get
called in the appropriate places. The drawing code is called from
FrmDrawForm if the gadget is extended, it is usable, and its got a handler
defined. Its also called from FrmShowObject if the gadget is extended and
handled, and the gadget is made usable as a consequence.
>From the looks of PalmOS 4.0 DR4, there haven't been any extended gadget
changes -- in fact, the previous trick of directly modifying the extended
flag won't work in some 4.0 compilations if you're using the new strict mode
that prevents access to OS structure internals.
--
Ben Combee
Veriprise Wireless <http://www.veriprise.com>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/