On Mon, 2002-10-28 at 08:06, [EMAIL PROTECTED] wrote:
> is it normal for a moving bitmap to be displayed on top of a modal form? on
> my main form i have a bitmap scrolling from right to left, when i bring up
> my 'preferences' form the bitmap is drawn on top, i thought all drawing on
> the main form stopped while the other form was displayed?
> 
> im using pilrc & gcc.

Hi Paul,

It depends how you've set up your event loop.

It sounds like your main event loop is still being called for all
events, and routing the events down to the form, allowing the animation
to run.

The way I dealt with this in 'roids was to have a boolean 'bLive'.  When
true, the game ran, when false, it stopped.

The variable was changed when getting a winEnterEvent or winExitEvent
from my main form like so:

if (event.eType != nilEvent) {
  if (!SysHandleEvent(&event)){     
    if (!MenuHandleEvent(0, &event, &error)) {    
      if (!ApplicationHandleEvent(&event)) {        
        FrmDispatchEvent(&event);
        if (event.eType==winEnterEvent
          && event.data.winEnter.enterWindow ==
                 (WinHandle)FrmGetFormPtr(frmMain)) {
          bLive=true;
        }
        if (event.eType==winExitEvent
          && event.data.winExit.exitWindow ==
                 (WinHandle)FrmGetFormPtr(frmMain)) {
          bLive=false;
        }
      } else {
        continue;
      }
    } else {
      continue;
    }
  } else {
    continue;
  }     
}

if (!bLive) {
  // Skip the rest of the actions, because the main
  // form isn't the topmost form.
  continue;
}







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

Reply via email to