Hi

I am trying to have a redraw update of a "toupie" on my Mainform

I have added the
  EvtGetEvent(&event, 1000);
the routine is called
but, if I force the redraw using :

         frmP = FrmGetActiveForm();
         FrmDrawForm(frmP);
        Triedre();    // dessine triedre
         DessineToupie();

then, I have no access to the menu

is there a place in the routine where to redraw (I need to clear the client
area and redraw on it using my function DessineToupie()

here is my AppEventLoop function :

thanks for your kind advices / help
Ciao


static void AppEventLoop(void)
{
 UInt16 error;
 EventType event;
 FormType * frmP;

 do
 {
  /* change timeout if you need periodic nilEvents */
//  EvtGetEvent(&event, evtWaitForever);
  // Retrieve events and also wake up once a second to do your own thing
  EvtGetEvent(&event, 1000);

  // Prevent the auto-off timer from putting the handheld into
  // sleep mode by resetting the auto-off timer every 50 seconds.
  if (TimGetSeconds() - lastResetTime > 50)
  {
  EvtResetAutoOffTimer();
  lastResetTime = TimGetSeconds();
  }

  // update Th
  if (objet==1) {
                  ph=ph+ph_speed*dt;
                  ps=ps+ps_speed*dt;
                  th=t0+th_speed*sin(ph);

         frmP = FrmGetActiveForm();
         FrmDrawForm(frmP);  file://r�-efface et redessine tout
         Triedre();    // dessine triedre
         DessineToupie();
         }

  if (! SysHandleEvent(&event))
  {
   if (! MenuHandleEvent(0, &event, &error))
   {
    if (! AppHandleEvent(&event))
    {
     FrmDispatchEvent(&event);

/*
I tried here but no success
     if (! FrmDispatchEvent(&event))
                {
                if (objet==1) {
                       frmP = FrmGetActiveForm();
                       FrmDrawForm(frmP);  file://r�-efface et redessine
tout
                       Triedre();    // dessine triedre
                       DessineToupie();
                       }
                }
*/

    }
   }
  }
 } while (event.eType != appStopEvent);
}






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

Reply via email to