wxWizardPageSimple paint delayed?

Dave Bee davebeeus at yahoo.com
Thu Dec 7 20:08:50 PST 2006


--- Vadim Zeitlin <vadim at wxwindows.org> wrote:
> The windows are never painted immediately, they're
> repainted when they get EVT_PAINT event and this 
> can't happen as long as the program doesn't get
> back to the main event loop but sits inside
> (synchronous) Play() call.

OK, that makes a lot of sense.

However, even when I don't use Play() immediately
after Show(), but instead use:

      wxCommandEvent eventCustom(EVT_PLAY_MUSAK);
      ::wxPostEvent(this, eventCustom);

I get the behavior that you describe above.

It seems that wxPostEvent dispatches the eventCustom
immediately using wxEvtHandler::ProcessEvent() instead
of posting eventCustom to the specified dest object
using wxEvtHandler::AddPendingEvent().

I wonder what is the rule that dictates for
wxPostEvent() when to use AddPendingEvent() and when
to use ProcessEvent(). The documentation says "In a
GUI application", but this wizard based app *is* a GUI
application. So, there must be additional caveat here.

Is it possible that this happens because eventCustom
did not implement a wxEvent::Clone()?

Thanks,
Dave


 
____________________________________________________________________________________
Want to start your own business?
Learn how on Yahoo! Small Business.
http://smallbusiness.yahoo.com/r-index




More information about the wx-users mailing list