Christopher Hunt said:
* WinEnterEvent does not appear to be queued as a consequence of
calling FrmSetActiveForm. Previous OSs called WinSetActiveWindow
which would cause the queuing of WinEnterEvent and WinExitEvent. Is
the apparent lack of WinEnterEvent via FrmSetActiveForm a glitch in
3.5?
This is correct. This is a result of adhering to the "no drawing to a form
until the form is visible" principle.
When FrmSetActiveForm is passed NULL, then the draw window and active window are
set invalid.
When a real form is passed, and it's visible (already been drawn), then
WinSetActiveWindow is called sending the winEnterEvent. The draw window is set
too.
When a real form is passed, and it's not visible, you're not supposed to draw
yet. Draw after FrmDrawForm. You can call WinSetDrawWindow, and then draw calls
won't fail. But when FrmDrawForm is finally called, it will save the screen
showing the form underneath plus all of the draws that have happened for
restoration later, and then it will wipe out those draws as it clears the
dialog's area to the color specified for the dialog's background. Note that the
debug ROM ignores the saved screen bits, so you won't see the goofed up restore
until you run on a release ROM.
If you have code where the form has sometimes been drawn and sometimes not,
FrmVisible can help determine the status.
-Roger Flores
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html.