On Fri, 13 Apr 2001 10:52:53 -0700, "Ray Marshall"
<[EMAIL PROTECTED]> wrote:

.....
>
>void FrmDrawFormEx( FormPtr formP )
>{
>       if ( IsAtLeastOS35() == false )
>       {
>               // pre 3.5 OS doesn't erase the background if "Save Behind" isn't set.
>               WinEraseWindow();
>       }
>       FrmDrawForm( formP );
>}
>
>void FrmReturnToFormEx( UInt16 formID )
>{
>       FrmReturnToForm( formID );
>       if ( IsAtLeastOS35() == false )
>               FrmUpdateForm( formID, frmRedrawUpdateCode );
>}


About your FrmReturnToFormEx function.  I'm not sure if simply testing
OS 3.5 version is good enough.  I tried something like that before,
but I later found out that the debug roms are the ones that
automatically sent an frmUpdateEvent.  In the actual released OS 3.5
roms, they don't send the frmUpdateEvent.  You can try to confirm that
for youself.  Anyways, what I ended up doing at the end is modified my
code into the followings:

//*****************************************************************************
//                      ReturnAndUpdateLastForm
//*****************************************************************************
//
// This function is used by Popup form to return to previous form and
// at the same time add an update event to the queue (if it is not 
// already in the queue.
//
void ReturnAndUpdateLastForm()
{
    UInt16 formId = FrmGetFormId(FrmGetFirstForm());
    FrmReturnToForm(0);
    EventType myEvt;
    myEvt.eType = frmUpdateEvent;
    myEvt.data.frmUpdate.updateCode = frmRedrawUpdateCode;
    myEvt.data.frmUpdate.formID = formId;
    EvtAddUniqueEventToQueue(&myEvt,0,false);
}




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

Reply via email to