I'm trapping the SysNotificationLateWakeupEvent, to display a On-Wakeup 
Screen, the Registration process goes right and when Powering-off and 
Powering-on the device it works quite fine, but when closing the form and 
send an appStopEvent the screen goes blank and the app doesn't return to 
the normal displaying. Here's the code for the PilotMain:

UInt32 PilotMain(UInt16 cmd, void *cmdPBP, UInt16 launchFlags)
{
        UInt32 dbID;
        int error;
 
 
        if ((cmd == sysAppLaunchCmdNormalLaunch) || (cmd == 
sysAppLaunchCmdNotify))
        {
 
                // Application start code
                if (cmd == sysAppLaunchCmdNormalLaunch){
                        dbID = DmFindDatabase(0, "srtupscrn");
                        SysNotifyRegister(0,dbID,sysNotifyLateWakeupEvent, 
NULL, sysNotifyNormalPriority, NULL);
                }
                error = StartApplication();
                if (error)
                        return error;
 
                // Maintain event loop
                EventLoop();

                // Stop application 
                StopApplication();
        }

        return 0;
}
It seems to be right... in the formHandler the code goes like this:
static Boolean frmMain_HandleEvent(EventPtr eventP)
{
    Boolean handled = false;
    FormPtr frmP;
    EventType newEvent;


        switch (eventP->eType) 
                {
                case frmOpenEvent:
                        frmP = FrmGetActiveForm();
                        FrmDrawForm (frmP);
                        SysTaskDelay(300);
                        MemSet(&newEvent, sizeof(EventType), 0);  // Sets 
0 in the event control block
                        newEvent.eType = appStopEvent;            // Sets 
the event type
                        EvtAddEventToQueue(&newEvent);            // 
Generates the event                     handled = true;
                        handled = true;
                        break;

                default:
                        break;
 
                }
 
        return handled;
}
And in the AppStop() I'm just closing the forms with FrmCloseAllForms();
Any suggestions????


Germ�n Dom�nguez
Proyectos
Synerg-e Consulting
Tel. 5220-0051
Tel. 5220-0061
Fax. 5531-0963
email: [EMAIL PROTECTED]

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