Thanks Roger,

I'm now pretty clear on the principles of FrmDrawForm and my applications have been 
modified to reflect them. However I think that
the Palm doco. will need to be updated for 3.5. Here's an excerpt from p.80 of the 
Prelim. Programmer's Companion (Revised: 6/99
jo/cjb):

"When a form is opened, a frmOpenEvent is triggered and the
form�s ID is stored. A winEnterEvent is triggered whenever a
form is opened, and a winExitEvent is triggered whenever a form
is closed. the winEnterEvent usually follows right after a
winExitEvent; an old window is deactivated just before a new
window is activated."

...reasonably misleading...

Kind regards and thanks again,
Christopher

[EMAIL PROTECTED] wrote:

> 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.

--
Christopher Hunt
Class Action Pty. Ltd.

Complete time zone management for the Palm(tm) connected organizer.
Check out http://www.classactionpl.com/


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html.

Reply via email to