From:                   Alan Kennington <[EMAIL PROTECTED]>
Subject:                Re: FrmReturnToForm does not erase current form

> If this problem is not well-known, then I guess I'll
> have to start tracing through what's happening in minute
> detail. 
> 
> Regards,
> Alan Kennington.

Returning to a frmMainForm after displaying a popup is relatively 
straight forward.  Maybe I missed something in the original question 
but here is how I do it.

First, popup form is set to 'save behind'.
Second, call popup with FrmPopupForm(frmPopupForm)
Third, in the handler for the frmPopupForm have an event handler 
section for the Ok button like:
    static Boolean frmAboutEventH(EventPtr event) {
        // some setup
        // and other code here
        switch (event->eType) { // checks for frmPopupEvent
            case ctlSelectEvent:      // checks for SelectEvent; like a button
                switch(event->data.ctlEnter.controlID) {
                    case btnAboutOk: // checks for Ok button 
                        FrmReturnToForm(frmMain);    // returns to main form
                        handled = 1;                          // specifies that this 
function handles event
                        break;             // forces exit of this handler
    }

That's about all there is to this.  If you want to generate an 
UpdateForm event for your main form you could put a 
FrmUpdateForm(frmMainForm) in this handler and it would generate an 
UpdateEvent where the main form could do some additional work.


--
-----------------------------------------------------------------
Discussion Group:        http://www.halcyon.com/ipscone/wwwboard/

Protect your constitutional rights. Your favorite one may be next!
-----------------------------------------------------------------

Reply via email to