For example:
static void EventLoop()
{ Err error; EventType event;
do
{
EvtGetEvent(&event, evtWaitForever);
// Eat all find key events
if (event.eType == keyDownEvent && event.data.keyDown.chr == vchrFind)
{
continue;
}
if (!SysHandleEvent(&event))
{
if (!MenuHandleEvent(0, &event, &error))
{
if (!ApplicationHandleEvent(&event))
{
FrmDispatchEvent(&event);
}
}
}
}while (event.eType != appStopEvent);
}
/***************************************OR*****************************************************/
PenBtnInfoPtr btnInfo;
UInt16 numButtons;
btnInfo = (const PenBtnInfoPtr)EvtGetPenBtnList(&numButtons); //Get the list of silk screen buttons.
for(int i =0; i
{
if((pEvent->data.keyDown.chr)==btnInfo[i].asciiCode)
{
FrmCustomAlert(GenericErrorAlert,"Silk Screen button selected","","");
return true;
}
}
No comments:
Post a Comment