I am trying to set the focus in one of my dialog forms after it displays
itself. I am using FrmDoDialog to display the dialog so I used
FrmSetEventHandler(frm,PasswordHandleEvent) to set an event handler.  I
wanted to setfocus on the frmLoadEvent. When this didn't work, I wanted to
see if the event was being call so I had the following code.

static Boolean PasswordHandleEvent(EventPtr eventP)
{
        Boolean handled = false;
        FormPtr frmP;
        switch (eventP->eType) 
        {
                case frmLoadEvent:
                {
                        frmP = FrmGetActiveForm();
                        MsgBox("a","a");
                        FrmDrawForm (frmP);
                        handled = true;
                }
                break;
        }
        return handled;

}

Just to 'see' if I get the frmLoadEvent, I display a MessageBox ( my
function ). It seems that I never got to this point. So I inserted 
my MsgBox right prior to the switch statement and displayed the value of
eventP->eType. This did work so I know the system is calling
PasswordHandleEvent but eventP->eType was 6 which occording to the docs is
winExitEvent. What am I doing wrong? 

thanks
-Ralph 

Reply via email to