#include #include static Boolean ApplicationHandleEvent(EventPtr event) { Boolean handled = false; if (event->eType == penDownEvent){ WinDrawChars("abc",3,event->screenX,event->screenY); handled = true; } return handled; } DWord PilotMain(Word cmd, Ptr cmdPBP, Word launchFlags) { EventType event; Word error; if (cmd == sysAppLaunchCmdNormalLaunch) { do { EvtGetEvent(&event, evtWaitForever); if (SysHandleEvent(&event)) continue; if (MenuHandleEvent(NULL, &event, &error)) continue; if (ApplicationHandleEvent(&event)) continue; FrmDispatchEvent(&event); } while (event.eType != appStopEvent); } return 0; }