Thanks to Kostka. I see, the problem is I didn't return true. Now I
can see the image.




On Wed, 26 Jan 2005 21:38:12 -0500, Tim Kostka <[EMAIL PROTECTED]> wrote:
> I haven't looked at Cobalt, but I imagine the procedure is the same:
> 
> 1) In your frmOpenEvent, draw the form via FrmDrawForm, then draw your
> bitmap, and return true.
> 
> 2) In your frmUpdateEvent, do the exact same thing.
> 
> If you do not return true, the system will call FrmDrawForm and any custom
> drawing you have done will be erased.
> ---
> Tim Kostka
> 
> "ye vicky" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Hi,
> >
> > It's really a naive questions, but why I just cannot manage it.
> >
> > I'm using develop suit, writing codes for Palm Cobalt system.
> > I want to draw a bitmap whenever the form is drawn. How do I approach
> > it? So far I know from creating a form bitmap element resource can
> > draw a bitmap when the form is drawn. But I don't want that way.
> > Because the bitmap being displayed will be a dynamic image. So, must
> > there some other ways can do it.
> >
> > By now, I made a drawing method which is used to draw a bitmap. The
> > method is functionable. It can be called and draw bitmap in other
> > forms. I don't know what is the problem, I guess maybe I did not
> > handle the correct event.
> > I don't know how many event will be generated after FrmGotoForm()
> > function.
> > But it seems quite a lot of them. So far I know after FrmGotoForm(),
> > will at least generate, frmLoadEvent, frmOpenEvent, frmUpdateEvent,
> > winUpdateEvent, winResizedEvent. Because I tried to call the drawing
> > method under each of them, I can see the program did run the method
> > but nothing is drawn. Only when I responsed to winResizedEvent, I saw
> > the bitmap flashed once and soon disappeared. And Palm OS Reporter
> > tool gives a debug message:
> > [Form] PrvDrawFormTab: Drawing list outside an update!\n
> >
> > The form I created to draw the bitmap is a traditional form. And the
> > form is empty(no elements created in the form).
> > I know for this kinds of form there is a gc created and stored in the
> > back buffer. So, I also guess, is it because I did not draw the bitmap
> > to back buffer, so once the form is redrawn, the bitmap is overwrited?
> > If it is the point, then how do I write to back buffer?
> >
> > And also I don't understand, why there are so many event generated
> > after FrmGotoForm(), and why the form was drawn several times since no
> > action to the form at all after the form is fist time opened?
> >
> > I'm very new to Palm, and this is the only place I found can get some
> > help, so pls forgive my so many naive questions.
> >
> > Thanks
> >
> 
> 
> --
> For information on using the Palm Developer Forums, or to unsubscribe, please 
> see http://www.palmos.com/dev/support/forums/
>

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

Reply via email to