uint32 IMainUI_Show(IMainUI* pUI){ CtlAddItem ai; AEERect rRect; boolean ok; pUI->glbVar->appState = APP_STATE_MAINUI; IDisplay_ClearScreen(pUI->glbVar->pIDisplay); IRESOURCE_LoadResource(pUI->glbVar->pIResouce, IDS_MAINUI_TITLE); IMENUCTL_SetTitle(pUI->pMenu, NULL, 0, pUI->glbVar->pIResouce->idsResource); // Add Items in the Menu IRESOURCE_LoadResource(pUI->glbVar->pIResouce, IDS_MAINUI_LOCATE); // Add Items in the Menu //ai.pText = pUI->glbVar->pIResouce->idsResource; ai.pImage = NULL; ai.pszResImage = ai.pszResText = NULL; ai.wImage = NULL; ai.wText = NULL; ai.dwData = 0; // Add New ai.wFont = AEE_FONT_NORMAL; ai.wItemID = IDS_MAINUI_LOCATE; //位置上报 IRESOURCE_LoadResource(pUI->glbVar->pIResouce, IDS_MAINUI_LOCATE); ai.pText = pUI->glbVar->pIResouce->idsResource; ai.wItemID = IDS_MAINUI_LOCATE; ok = IMENUCTL_AddItemEx(pUI->pMenu, &ai); //拍照上传 IRESOURCE_LoadResource(pUI->glbVar->pIResouce, IDS_MAINUI_PHOTO); ai.pText = pUI->glbVar->pIResouce->idsResource; ai.wItemID = IDS_MAINUI_PHOTO; IMENUCTL_AddItemEx(pUI->pMenu, &ai); SETAEERECT(&rRect, 0, 5, pUI->glbVar->pDevice->cxScreen, pUI->glbVar->pDevice->cyScreen - IDISPLAY_GetFontMetrics( pUI->glbVar->pIDisplay, AEE_FONT_NORMAL, NULL, NULL ) - 10); IMENUCTL_SetRect(pUI->pMenu, &rRect); IMENUCTL_SetActive(pUI->pMenu, FALSE); IMENUCTL_Redraw(pUI->pMenu); IRESOURCE_LoadResource(pUI->glbVar->pIResouce, IDS_MAINUI_SETTINGS); IMENUCTL_AddItem(pUI->pSK, NULL, NULL, IDS_MAINUI_SETTINGS, pUI->glbVar->pIResouce->idsResource, 0); IMENUCTL_Redraw(pUI->pSK); pUI->focusCTL = MAINUI_INIT; return AEE_SUCCESS; }
static boolean CallDemoApp_HandleEvent(IApplet * pi, AEEEvent eCode, uint16 wParam, uint32 dwParam) { CallDemoApp * pMe = (CallDemoApp*)pi; switch (eCode) { case EVT_APP_START: // When this applet is started, try to create the main menu // that allows the user to select a usage example to execute. // If we cannot create an instance of the menu class, exit and // indicate that we have handled the event by returning TRUE if(ISHELL_CreateInstance(pMe->a.m_pIShell, AEECLSID_MENUCTL, (void **)&pMe->m_pIMenu) != SUCCESS) return TRUE; // Succeeded in obtaining a menu instance pointer, so // construct the menu and display it on the screen BuildMainMenu(pMe); return(TRUE); case EVT_APP_STOP: return(TRUE); case EVT_KEY: if(pMe->m_isDTMFItem) { if (wParam == AVK_2) { AECHAR szwStr[32]; char szNumber[32]; int nRet; // get telephone number (main) from resource file ISHELL_LoadResString(pMe->a.m_pIShell, CALLDEMO_RES_FILE, IDS_STRING_TELEPHONE_NUMBER_SUB, szwStr, sizeof(szwStr)); WSTRTOSTR(szwStr, szNumber, sizeof(szNumber)); nRet = ICALL_BurstDTMF(pMe->m_pOutgoingCall, AEET_DTMF_ON_95,AEET_DTMF_OFF_60,szNumber); DBGPRINTF("ICALL_BurstDTMF ret %d", nRet); WriteLine(pMe, "ICALL_BurstDTMF -->", NULL, FALSE); } } if (pMe->m_isParty3Item) { if (wParam == AVK_3) { AECHAR szwStr[32]; char szNumber[32]; boolean Result; // get telephone number (main) from resource file ISHELL_LoadResString(pMe->a.m_pIShell, CALLDEMO_RES_FILE, IDS_STRING_TELEPHONE_NUMBER_B, szwStr, sizeof(szwStr)); WSTRTOSTR(szwStr, szNumber, sizeof(szNumber)); LISTENER_Init(&pMe->callListenerB, (PFNLISTENER) OriginateListener, pMe); Result = ICALLMGR_Originate(pMe->m_pCallMgr, AEET_CALL_TYPE_VOICE, szNumber, NULL, &pMe->m_pOutgoingCallB, &pMe->callListenerB); if (Result != SUCCESS) { DBGPRINTF("ICALLMGR_Originate failed with res=%d", Result); break; } WriteLine(pMe, "Call Originate B-->", NULL, FALSE); WriteLine(pMe, "Press 1 to unhold A", NULL, FALSE); return TRUE; } if (wParam == AVK_1) { int nRet; if(pMe->m_pOutgoingCall) { nRet = ICALL_SwitchTo( pMe->m_pOutgoingCall ); DBGPRINTF("ICALL_SwitchTo A ret:%d", nRet); } #if 0 if(pMe->m_pOutgoingCallB) { nRet = ICALL_Hold( pMe->m_pOutgoingCallB ); DBGPRINTF("ICALL_Hold B ret:%d", nRet); } #endif WriteLine(pMe, "switch issued", NULL, FALSE); return TRUE; } #if 0 if (wParam == AVK_2) { int nRet; if(pMe->m_pOutgoingCallB) { nRet = ICALL_SwitchTo( pMe->m_pOutgoingCallB ); DBGPRINTF("ICALL_SwitchTo B ret:%d", nRet); } if(pMe->m_pOutgoingCall) { nRet = ICALL_Hold( pMe->m_pOutgoingCall ); DBGPRINTF("ICALL_Hold A ret:%d", nRet); } WriteLine(pMe, "switch issued", NULL, FALSE); return TRUE; } #endif } // ¿ØÖÆÉÏϼüÑ¡Ôñ²Ëµ¥ if (pMe->m_pIMenu) { if ((IMENUCTL_IsActive(pMe->m_pIMenu) == FALSE) && ((wParam == AVK_UP) || (wParam == AVK_DOWN))) { IMENUCTL_SetActive(pMe->m_pIMenu, TRUE); IMENUCTL_Redraw(pMe->m_pIMenu); } return IMENUCTL_HandleEvent(pMe->m_pIMenu, EVT_KEY, wParam, 0); } else return FALSE; case EVT_NOTIFY: break; case EVT_COMMAND: switch(wParam) { // The following commands are generated by user selections // from the main usage app menu. case USAGE_CALL_ORIG: case USAGE_CALL_OUTGOING_END: case USAGE_CALL_INCOMING_END: case USAGE_CALL_DTMF: case USAGE_CALL_PARTY3: case USAGE_CALL_ANSWER: case USAGE_CALL_REDIRECT: // Deactivate main menu to turn off horizontal scrolling of long menu items IMENUCTL_SetActive(pMe->m_pIMenu, FALSE); // Execute the usage example the user has selected CallDemoAppUsage (pMe, wParam); return TRUE; default: return FALSE; } // switch(wPara) case EVT_MY_ANSWER: DBGPRINTF("handler of call incoming by answer"); if (pMe->m_pIncomingCall) { int nError; nError = ICALL_Answer(pMe->m_pIncomingCall); if (SUCCESS != nError) { DBGPRINTF("ICALL_Answer failed ret=%d", nError); } else { DBGPRINTF("ICALL_Answer -->"); WriteLine(pMe, "ICALL_Answer -->", NULL, FALSE); } } return TRUE; case EVT_MY_REDIRECT: DBGPRINTF("handler of call incoming by redirect"); if (pMe->m_pIncomingCall) { int nError; AECHAR szwStr[32]; char szNumber[32]; // get redirect number ISHELL_LoadResString(pMe->a.m_pIShell, CALLDEMO_RES_FILE, IDS_STRING_TELEPHONE_NUMBER_REDIRECT, szwStr, sizeof(szwStr)); WSTRTOSTR(szwStr, szNumber, sizeof(szNumber)); nError = ICALL_Redirect(pMe->m_pIncomingCall, szNumber); if (SUCCESS != nError) { DBGPRINTF("ICALL_Redirect failed ret=%d", nError); } else { DBGPRINTF("ICALL_Redirect -->%s", szNumber); WriteLine(pMe, "ICALL_Redirect -->", NULL, FALSE); } } return TRUE; default: break; } // switch (eCode) #ifdef EVENT_AUTO_GET if(eCode == pMe->m_UserAnswerEvent) { DBGPRINTF("handler of call incoming by answer"); if (pMe->m_pIncomingCall) { int nError; nError = ICALL_Answer(pMe->m_pIncomingCall); if (SUCCESS != nError) { DBGPRINTF("ICALL_Answer failed ret=%d", nError); } else { DBGPRINTF("ICALL_Answer -->"); WriteLine(pMe, "ICALL_Answer -->", NULL, FALSE); } } } if(eCode == pMe->m_UserRedirectEvent) { DBGPRINTF("handler of call incoming by redirect"); if (pMe->m_pIncomingCall) { int nError; AECHAR szwStr[32]; char szNumber[32]; // get redirect number ISHELL_LoadResString(pMe->a.m_pIShell, CALLDEMO_RES_FILE, IDS_STRING_TELEPHONE_NUMBER_REDIRECT, szwStr, sizeof(szwStr)); WSTRTOSTR(szwStr, szNumber, sizeof(szNumber)); nError = ICALL_Redirect(pMe->m_pIncomingCall, szNumber); if (SUCCESS != nError) { DBGPRINTF("ICALL_Redirect failed ret=%d", nError); } else { DBGPRINTF("ICALL_Redirect -->%s", szNumber); WriteLine(pMe, "ICALL_Redirect -->", NULL, FALSE); } } } #endif return FALSE; }
/*======================================================================= Function: SamplePosDet_ConfigMenu_HandleEvent() Description: Event handler function for the configuration menu. Prototype: boolean SamplePosDet_ConfigMenu_HandleEvent(CSamplePosDet *pMe, AEEEvent eCode, uint16 wParam, uint32 dwParam) Parameters: pMe: [in]. CSamplePosDet instance. eCode: [in]. Event code. wParam: [in]. Event wParam. dwParam: [in]. Event dwParam. Return Value: TRUE - If the event was handled by this menu. FALSE - If the event was not handled. Comments: None Side Effects: None See Also: None =======================================================================*/ boolean SamplePosDet_ConfigMenu_HandleEvent(CSamplePosDet *pMe, AEEEvent eCode, uint16 wParam, uint32 dwParam) { boolean bHandled = FALSE; IMenuCtl *pMenuCtl = SamplePosDet_GetScreenData( pMe ); switch( eCode ) { case EVT_SCREEN: if( wParam == SCREEN_PARAM_INIT ) { if( pMenuCtl ) { /* This is not expected to happen */ SamplePosDet_DrawScreen( pMe, 0 ); bHandled = TRUE; } else { if( ISHELL_CreateInstance( pMe->theApp.m_pIShell, AEECLSID_MENUCTL, (void **)&pMenuCtl ) == SUCCESS ) { IMENUCTL_AddItem( pMenuCtl, SAMPLEPOSDET_RES_FILE, IDS_CONFIG_SERVER, IDS_CONFIG_SERVER, NULL, (uint32)pMenuCtl ); IMENUCTL_AddItem( pMenuCtl, SAMPLEPOSDET_RES_FILE, IDS_CONFIG_QOS, IDS_CONFIG_QOS, NULL, (uint32)pMenuCtl ); IMENUCTL_AddItem( pMenuCtl, SAMPLEPOSDET_RES_FILE, IDS_CONFIG_OPT, IDS_CONFIG_OPT, NULL, (uint32)pMenuCtl ); IMENUCTL_SetTitle( pMenuCtl, SAMPLEPOSDET_RES_FILE, IDS_CONFIG_TITLE, NULL ); SamplePosDet_SetScreenData( pMe, (void *)pMenuCtl ); SamplePosDet_DrawScreen( pMe, 0 ); bHandled = TRUE; } } } else if( wParam == SCREEN_PARAM_CLOSE ) { IMENUCTL_Release( pMenuCtl ); SamplePosDet_SetScreenData( pMe, 0 ); pMe->currentHandler = 0; bHandled = TRUE; } else if( wParam == SCREEN_PARAM_PAINT ) { if( IMENUCTL_IsActive( pMenuCtl ) ) { IMENUCTL_Redraw( pMenuCtl ); } else { IMENUCTL_SetActive( pMenuCtl, TRUE ); /* Also causes a menu draw */ } } break; case EVT_KEY: if( wParam == AVK_CLR ) { SamplePosDet_GotoScreen( pMe, SCREENID_MAINMENU, 0 ); bHandled = TRUE; break; } case EVT_KEY_PRESS: case EVT_KEY_RELEASE: bHandled = IMENUCTL_HandleEvent( pMenuCtl, eCode, wParam, dwParam ); break; case EVT_COMMAND: if( dwParam == (uint32)pMenuCtl ) { switch( wParam ) { case IDS_CONFIG_SERVER: SamplePosDet_GotoScreen( pMe, SCREENID_SERVER_SETTINGS, 0 ); bHandled = TRUE; break; case IDS_CONFIG_QOS: SamplePosDet_GotoScreen( pMe, SCREENID_QOS_SETTINGS, 0 ); bHandled = TRUE; break; case IDS_CONFIG_OPT: SamplePosDet_GotoScreen( pMe, SCREENID_OPTIM_SETTINGS, 0 ); default: break; } } break; } return bHandled; }
/*======================================================================= Function: SamplePosDet_OptimSettings_HandleEvent() Description: Event handler function for the optimization mode settings menu. Prototype: boolean SamplePosDet_OptimSettings_HandleEvent(CSamplePosDet *pMe, AEEEvent eCode, uint16 wParam, uint32 dwParam) Parameters: pMe: [in]. CSamplePosDet instance. eCode: [in]. Event code. wParam: [in]. Event wParam. dwParam: [in]. Event dwParam. Return Value: TRUE - If the event was handled by this menu. FALSE - If the event was not handled. Comments: None Side Effects: None See Also: None =======================================================================*/ boolean SamplePosDet_OptimSettings_HandleEvent(CSamplePosDet *pMe, AEEEvent eCode, uint16 wParam, uint32 dwParam) { boolean bHandled = FALSE; IMenuCtl *pMenuCtl = SamplePosDet_GetScreenData( pMe ); switch( eCode ) { case EVT_SCREEN: if( wParam == SCREEN_PARAM_INIT ) { if( pMenuCtl ) { /* This is not expected to happen */ SamplePosDet_DrawScreen( pMe, 0 ); bHandled = TRUE; } else { if( ISHELL_CreateInstance( pMe->theApp.m_pIShell, AEECLSID_MENUCTL, (void **)&pMenuCtl ) == SUCCESS ) { //IMENUCTL_AddItem( pMenuCtl, SAMPLEPOSDET_RES_FILE, IDS_OPT_NONE, // AEEGPS_OPT_NONE, NULL, (uint32)pMenuCtl ); IMENUCTL_AddItem( pMenuCtl, SAMPLEPOSDET_RES_FILE, IDS_OPT_SPEED, AEEGPS_OPT_SPEED, NULL, (uint32)pMenuCtl ); IMENUCTL_AddItem( pMenuCtl, SAMPLEPOSDET_RES_FILE, IDS_OPT_ACCURACY, AEEGPS_OPT_ACCURACY, NULL, (uint32)pMenuCtl ); //IMENUCTL_AddItem( pMenuCtl, SAMPLEPOSDET_RES_FILE, IDS_OPT_PAYLOAD, // AEEGPS_OPT_PAYLOAD, NULL, (uint32)pMenuCtl ); IMENUCTL_AddItem( pMenuCtl, SAMPLEPOSDET_RES_FILE, IDS_OPT_DEFAULT, AEEGPS_OPT_DEFAULT, NULL, (uint32)pMenuCtl ); IMENUCTL_SetTitle( pMenuCtl, SAMPLEPOSDET_RES_FILE, IDS_OPT_SETTINGS_TITLE, NULL ); SamplePosDet_SetScreenData( pMe, (void *)pMenuCtl ); SamplePosDet_DrawScreen( pMe, 0 ); bHandled = TRUE; } } } else if( wParam == SCREEN_PARAM_CLOSE ) { IMENUCTL_Release( pMenuCtl ); SamplePosDet_SetScreenData( pMe, 0 ); pMe->currentHandler = 0; bHandled = TRUE; } else if( wParam == SCREEN_PARAM_PAINT ) { if( IMENUCTL_IsActive( pMenuCtl ) ) { IMENUCTL_Redraw( pMenuCtl ); } else { IMENUCTL_SetActive( pMenuCtl, TRUE ); /* Also causes a menu draw */ } } break; case EVT_KEY: if( wParam == AVK_CLR ) { SamplePosDet_GotoScreen( pMe, SCREENID_CONFIG, 0 ); bHandled = TRUE; break; } case EVT_KEY_PRESS: case EVT_KEY_RELEASE: bHandled = IMENUCTL_HandleEvent( pMenuCtl, eCode, wParam, dwParam ); break; case EVT_COMMAND: if( dwParam == (uint32)pMenuCtl ) { switch( wParam ) { case AEEGPS_OPT_SPEED: case AEEGPS_OPT_ACCURACY: // Set the optimization mode and save the settings pMe->gpsSettings.optim = (AEEGPSOpt)wParam; SamplePosDet_SaveGPSSettings(pMe); SamplePosDet_GotoScreen( pMe, SCREENID_CONFIG, 0 ); bHandled = TRUE; break; default: break; } } break; } return bHandled; }
static boolean ISmsApp_HandleEvent(IApplet * pi, AEEEvent eCode, uint16 wParam, uint32 dwParam) { ISmsApp * pMe = (ISmsApp*)pi; switch (eCode) { case EVT_APP_START: // When this applet is started, try to create the main menu // that allows the user to select a usage example to execute. // If we cannot create an instance of the menu class, exit and // indicate that we have handled the event by returning TRUE if(ISHELL_CreateInstance(pMe->a.m_pIShell, AEECLSID_MENUCTL, (void **)&pMe->m_pIMenu) != SUCCESS) return TRUE; // Succeeded in obtaining a menu instance pointer, so // construct the menu and display it on the screen BuildMainMenu(pMe); return(TRUE); case EVT_APP_STOP: { int nErr; AEECLSID clsNotifier= AEECLSID_TAPI; // event sender AEECLSID clsNotify = AEECLSID_ISMS; // event listener uint32 dwMask = 0; // for deregister NMASK_TAPI_SMS_TEXT; // De -Register a notification nErr = ISHELL_RegisterNotify (pMe->a.m_pIShell, clsNotify, clsNotifier, dwMask); DBGPRINTF("ISHELL_RegisterNotify ret %d", nErr); clsNotifier= AEECLSID_SMSNOTIFIER; // event sender clsNotify = AEECLSID_ISMS; // event listener dwMask = 0; // for deregister event; // De - Register a notification nErr = ISHELL_RegisterNotify (pMe->a.m_pIShell, clsNotify, clsNotifier, dwMask); DBGPRINTF("ISHELL_RegisterNotify ret %d", nErr); } return(TRUE); case EVT_KEY: // 控制上下键选择菜单 if (pMe->m_pIMenu) { if ((IMENUCTL_IsActive(pMe->m_pIMenu) == FALSE) && ((wParam == AVK_UP) || (wParam == AVK_DOWN))) { IMENUCTL_SetActive(pMe->m_pIMenu, TRUE); IMENUCTL_Redraw(pMe->m_pIMenu); } return IMENUCTL_HandleEvent(pMe->m_pIMenu, EVT_KEY, wParam, 0); } else return FALSE; case EVT_NOTIFY: { uint32 uMsgId; ISMSMsg *pRxMsg=NULL; AEENotify* pNotify = (AEENotify*) dwParam; // 使用原TAPI接口接收短信 if (pNotify && (pNotify->cls == AEECLSID_TAPI)) // event sender { DBGPRINTF("AEECLSID_TAPI sender"); if ((pNotify->dwMask & NMASK_TAPI_SMS_TEXT) == NMASK_TAPI_SMS_TEXT) { AEESMSTextMsg *pMsg; DBGPRINTF("Notify mask ok"); pMsg = (AEESMSTextMsg *)pNotify->pData; // 此处假定短信为ASCII,如果UNICODE需要首先检测,再输出UNICODE字串 WriteLine(pMe, pMsg->szText, NULL, FALSE); } } // 使用新的SMSNotifier 接口接收短信,此接口BREW 3.1.x 以上版本支持 if (pNotify && (pNotify->cls == AEECLSID_SMSNOTIFIER)) // event sender { uint32 MyNMask; DBGPRINTF("AEECLSID_SMSNOTIFIER sender"); // 普通短信的EVENT MASK MyNMask = ((AEESMS_TYPE_TEXT << 16) | NMASK_SMS_TYPE); if ((pNotify->dwMask & MyNMask) == MyNMask) { DBGPRINTF("Notify mask ok"); uMsgId = (uint32 )pNotify->pData; if(ISMS_ReceiveMsg(pMe->m_pISMS, uMsgId, &pRxMsg)==AEE_SUCCESS) { SMSMsgOpt TmpOpt; DBGPRINTF("ISMS_ReceiveMsg ret ok"); // MSGOPT_FROM_DEVICE_SZ - 发送方号码 if(ISMSMSG_GetOpt(pRxMsg, MSGOPT_FROM_DEVICE_SZ, &TmpOpt)==AEE_SUCCESS) { DBGPRINTF("get MSGOPT_FROM_DEVICE_SZ"); WriteLine(pMe, (char *)TmpOpt.pVal, NULL, FALSE); } // MSGOPT_PAYLOAD_SZ - ASCII的短信内容 if(ISMSMSG_GetOpt(pRxMsg, MSGOPT_PAYLOAD_SZ, &TmpOpt)==AEE_SUCCESS) { DBGPRINTF("get MSGOPT_PAYLOAD_SZ"); WriteLine(pMe, (char *)TmpOpt.pVal, NULL, FALSE); } // MSGOPT_PAYLOAD_WSZ - UNICODE的短信内容 if(ISMSMSG_GetOpt(pRxMsg, MSGOPT_PAYLOAD_WSZ, &TmpOpt)==AEE_SUCCESS) { DBGPRINTF("get MSGOPT_PAYLOAD_WSZ"); WriteLine(pMe, NULL, (AECHAR *)TmpOpt.pVal, TRUE); } // MSGOPT_PAYLOAD_BINARY - UTF-8的短信内容 if(ISMSMSG_GetOpt(pRxMsg, MSGOPT_PAYLOAD_BINARY, &TmpOpt)==AEE_SUCCESS) { unsigned char *ucBuf; AECHAR UnicodeBuf[100]; DBGPRINTF("PAYLOAD_BINARY(len: %d):", WEBOPT_GETVARBUFFERLENGTH(TmpOpt.pVal)); ucBuf = WEBOPT_GETVARBUFFERDATA(TmpOpt.pVal); UTF8TOWSTR(ucBuf, WEBOPT_GETVARBUFFERLENGTH(TmpOpt.pVal), UnicodeBuf, sizeof(UnicodeBuf)); DBGPRINTF("0x%2x, %2x, %2x, %2x", UnicodeBuf[0], UnicodeBuf[1], UnicodeBuf[2], UnicodeBuf[3] ); DBGPRINTF("0x%2x, %2x, %2x, %2x", UnicodeBuf[4], UnicodeBuf[5], UnicodeBuf[6], UnicodeBuf[7] ); DBGPRINTF("0x%2x, %2x, %2x, %2x", UnicodeBuf[8], UnicodeBuf[9], UnicodeBuf[10], UnicodeBuf[11] ); DBGPRINTF("0x%2x, %2x, %2x, %2x", UnicodeBuf[12], UnicodeBuf[13], UnicodeBuf[14], UnicodeBuf[15] ); WriteLine(pMe, NULL, (AECHAR *)UnicodeBuf, TRUE); } // MSGOPT_TIMESTAMP - 短信时间标签 if(ISMSMSG_GetOpt(pRxMsg, MSGOPT_TIMESTAMP, &TmpOpt)==AEE_SUCCESS) { JulianType *pMyJulian; char buf[80]; DBGPRINTF("get MSGOPT_TIMESTAMP"); pMyJulian = (JulianType *)TmpOpt.pVal; SPRINTF(buf, "%d/%d/%d %d:%d:%d, weekday:%d", pMyJulian->wMonth, pMyJulian->wDay, pMyJulian->wYear, pMyJulian->wHour, pMyJulian->wMinute, pMyJulian->wSecond, pMyJulian->wWeekDay); WriteLine(pMe, buf, NULL, FALSE); } } } } } return TRUE; case EVT_COMMAND: switch(wParam) { // The following commands are generated by user selections // from the main usage app menu. case USAGE_SMS_TX_ASCII: case USAGE_SMS_TX_UNICODE: case USAGE_SMS_TX_UTF8: case USAGE_SMS_RX_TAPI_METHOD: case USAGE_SMS_RX_ISMS_METHOD: case USAGE_SMS_STORE_STATUS: case USAGE_SMS_STORE_ENUM_READ: // Deactivate main menu to turn off horizontal scrolling of long menu items IMENUCTL_SetActive(pMe->m_pIMenu, FALSE); // Execute the usage example the user has selected ISmsAppUsage (pMe, wParam); return TRUE; default: return FALSE; } default: break; } return FALSE; }