/*=========================================================================== FUNCTION: BuildMainMenu DESCRIPTION This function constructs the menu control that allows the user to select a usage example to execute. The command ID for each menu item is passed to the usage example function above when the user selects the menu item for that example. PROTOTYPE: static void BuildMainMenu(CallDemoApp * pMe) PARAMETERS: pMe: [in]: Contains a pointer to the usage app data structure. DEPENDENCIES None RETURN VALUE None SIDE EFFECTS None ===========================================================================*/ static void BuildMainMenu(CallDemoApp *pMe) { AEERect qrc; AEEDeviceInfo di; AECHAR * szBuf; // Make sure the pointers we'll be using are valid if (pMe == NULL || pMe->a.m_pIShell == NULL || pMe->m_pIMenu == NULL) { return; } if ((szBuf = (AECHAR *) MALLOC(TEXT_BUFFER_SIZE)) == NULL) { return; } // Set Title STR_TO_WSTR("CALLDEMO & CALLDEMOMsg Example", szBuf, TEXT_BUFFER_SIZE); IMENUCTL_SetTitle(pMe->m_pIMenu, NULL, 0, szBuf); //Set the Rectangle for the Menu ISHELL_GetDeviceInfo(pMe->a.m_pIShell,&di); qrc.x = 0; qrc.y = 0; qrc.dx = di.cxScreen; qrc.dy = di.cyScreen; IMENUCTL_SetRect(pMe->m_pIMenu, &qrc); //Add individual entries to the Menu // Add originate call to menu STR_TO_WSTR("1. Originate Call", szBuf, TEXT_BUFFER_SIZE); IMENUCTL_AddItem(pMe->m_pIMenu, 0, 0, USAGE_CALL_ORIG, szBuf, 0); STR_TO_WSTR("2. End OutGoing Call", szBuf, TEXT_BUFFER_SIZE); IMENUCTL_AddItem(pMe->m_pIMenu, 0, 0, USAGE_CALL_OUTGOING_END, szBuf, 0); STR_TO_WSTR("3. End Incoming Call", szBuf, TEXT_BUFFER_SIZE); IMENUCTL_AddItem(pMe->m_pIMenu, 0, 0, USAGE_CALL_INCOMING_END, szBuf, 0); STR_TO_WSTR("4. Call and DTMF", szBuf, TEXT_BUFFER_SIZE); IMENUCTL_AddItem(pMe->m_pIMenu, 0, 0, USAGE_CALL_DTMF, szBuf, 0); STR_TO_WSTR("5. Call Party", szBuf, TEXT_BUFFER_SIZE); IMENUCTL_AddItem(pMe->m_pIMenu, 0, 0, USAGE_CALL_PARTY3, szBuf, 0); STR_TO_WSTR("6. Call answer", szBuf, TEXT_BUFFER_SIZE); IMENUCTL_AddItem(pMe->m_pIMenu, 0, 0, USAGE_CALL_ANSWER, szBuf, 0); STR_TO_WSTR("7. Call redirect", szBuf, TEXT_BUFFER_SIZE); IMENUCTL_AddItem(pMe->m_pIMenu, 0, 0, USAGE_CALL_REDIRECT, szBuf, 0); // Activate menu IMENUCTL_SetActive(pMe->m_pIMenu,TRUE); FREE(szBuf); }
/*=========================================================================== FUNCTION: BuildMainMenu DESCRIPTION This function constructs the menu control that allows the user to select a usage example to execute. The command ID for each menu item is passed to the usage example function above when the user selects the menu item for that example. PROTOTYPE: static void BuildMainMenu(ISmsApp * pMe) PARAMETERS: pMe: [in]: Contains a pointer to the usage app data structure. DEPENDENCIES None RETURN VALUE None SIDE EFFECTS None ===========================================================================*/ static void BuildMainMenu(ISmsApp *pMe) { AEERect qrc; AEEDeviceInfo di; AECHAR * szBuf; // Make sure the pointers we'll be using are valid if (pMe == NULL || pMe->a.m_pIShell == NULL || pMe->m_pIMenu == NULL) return; if ((szBuf = (AECHAR *) MALLOC(TEXT_BUFFER_SIZE)) == NULL) return; // Set Title STR_TO_WSTR("ISMS & ISMSMsg Example", szBuf, TEXT_BUFFER_SIZE); IMENUCTL_SetTitle(pMe->m_pIMenu, NULL, 0, szBuf); //Set the Rectangle for the Menu ISHELL_GetDeviceInfo(pMe->a.m_pIShell,&di); qrc.x = 0; qrc.y = 0; qrc.dx = di.cxScreen; qrc.dy = di.cyScreen; IMENUCTL_SetRect(pMe->m_pIMenu, &qrc); //Add individual entries to the Menu // Add SMS Sending to menu STR_TO_WSTR("1. SMS Tx ASCII", szBuf, TEXT_BUFFER_SIZE); IMENUCTL_AddItem(pMe->m_pIMenu, 0, 0, USAGE_SMS_TX_ASCII, szBuf, 0); STR_TO_WSTR("2. SMS Tx UNICODE", szBuf, TEXT_BUFFER_SIZE); IMENUCTL_AddItem(pMe->m_pIMenu, 0, 0, USAGE_SMS_TX_UNICODE, szBuf, 0); STR_TO_WSTR("3. SMS Tx UTF-8", szBuf, TEXT_BUFFER_SIZE); IMENUCTL_AddItem(pMe->m_pIMenu, 0, 0, USAGE_SMS_TX_UTF8, szBuf, 0); // Add SMS Receive in TAPI method to menu STR_TO_WSTR("4. Rx SMS in method TAPI ", szBuf, TEXT_BUFFER_SIZE); IMENUCTL_AddItem(pMe->m_pIMenu, 0, 0, USAGE_SMS_RX_TAPI_METHOD, szBuf, 0); // Add SMS Receive in ISMS method to menu STR_TO_WSTR("5. Rx SMS in method ISMSNotifier", szBuf, TEXT_BUFFER_SIZE); IMENUCTL_AddItem(pMe->m_pIMenu, 0, 0, USAGE_SMS_RX_ISMS_METHOD, szBuf, 0); // SMS storage status STR_TO_WSTR("6. SMS storage status", szBuf, TEXT_BUFFER_SIZE); IMENUCTL_AddItem(pMe->m_pIMenu, 0, 0, USAGE_SMS_STORE_STATUS, szBuf, 0); // read SMS from store STR_TO_WSTR("7. SMS store read", szBuf, TEXT_BUFFER_SIZE); IMENUCTL_AddItem(pMe->m_pIMenu, 0, 0, USAGE_SMS_STORE_ENUM_READ, szBuf, 0); // Activate menu IMENUCTL_SetActive(pMe->m_pIMenu,TRUE); FREE(szBuf); }
/*=========================================================================== ===========================================================================*/ static void xDrawTextA(IDisplay * pd,AEEFont fnt, const char * pszText, int nChars, int x,int y,const AEERect * prcBackground,uint32 dwFlags) { AECHAR wcBuf[80]; if (nChars < 0) nChars = STRLEN(pszText); nChars = min(nChars, ARRAYSIZE(wcBuf)); STR_TO_WSTR((char*)pszText, wcBuf, sizeof(wcBuf)); IDISPLAY_DrawText(pd, fnt, wcBuf, nChars, x, y, prcBackground, dwFlags); }
int main(int argc, char** argv) { // global flags for(int iStartArg=1; iStartArg<argc; ++iStartArg) { t_string strArg = STR_TO_WSTR(argv[iStartArg]); tl::trim(strArg); // end of arguments to hermelin if(strArg[0] != T_STR'-') break; if(strArg=="-t" || strArg == "--timing") g_bShowTiming = 1; } const std::array<tl::Log*, 5> arrLogs{{&tl::log_crit, &tl::log_err, &tl::log_warn, &tl::log_info, &tl::log_debug}}; for(tl::Log* pLog : arrLogs) { pLog->SetShowDate(0); pLog->SetShowThread(0); } int iRet = -99; tl::Stopwatch<t_real> watch; try { tl::init_spec_chars(); if(g_bShowTiming) watch.start(); iRet = script_main(argc, argv); if(g_bShowTiming) watch.stop(); } catch(const std::exception& ex) { tl::log_crit(ex.what()); } if(g_bShowTiming && iRet==0) { tl::log_info("================================================================================"); tl::log_info("Script start time: ", watch.GetStartTimeStr()); tl::log_info("Script stop time: ", watch.GetStopTimeStr()); tl::log_info("Script execution time: ", watch.GetDur(), " s"); tl::log_info("================================================================================"); } return iRet; }
/*=========================================================================== FUNCTION: DisplayEvent DESCRIPTION This function prints a heading at the top of the screen to indicate which usage example was selected by the user, It also prints a message on the bottom two lines of the screen instructing the user to press the UP or DOWN key to return to the main menu to execute another example. PROTOTYPE: static void DisplayEvent(CallDemoApp * pMe, uint16 wParam) PARAMETERS: pMe: [in]: Contains a pointer to the usage app data structure. wParam: [in]: Identifier of the selected example (example IDs are specified when the main usage app menu is created). If the value USAGE_ERASE_SCREEN is supplied instead, this function clears the screen. DEPENDENCIES None RETURN VALUE None SIDE EFFECTS None ===========================================================================*/ static void DisplayEvent (CallDemoApp *pMe, uint16 wParam) { AEERect qrc; AEEDeviceInfo di; // Device Info AECHAR * szBuf; AEERect rc; // Make sure the pointers we'll be using are valid if (pMe == NULL || pMe->a.m_pIShell == NULL || pMe->a.m_pIDisplay == NULL) { return; } if ((szBuf = (AECHAR *) MALLOC(TEXT_BUFFER_SIZE)) == NULL) { return; } ISHELL_GetDeviceInfo(pMe->a.m_pIShell,&di); qrc.x = 0; qrc.y = 0; qrc.dx = di.cxScreen; qrc.dy = di.cyScreen; rc.x = 5; rc.y = 5; rc.dx = di.cxScreen - 5; rc.dy = di.cyScreen - 5; // Specify text for heading based on example the user has selected switch (wParam) { case USAGE_ERASE_SCREEN: IDISPLAY_EraseRect(pMe->a.m_pIDisplay,&qrc); //Clear the display FREE(szBuf); return; case USAGE_CALL_ORIG: STR_TO_WSTR("CALL ORIG", szBuf, TEXT_BUFFER_SIZE); break; case USAGE_CALL_OUTGOING_END: STR_TO_WSTR("End OutGoing Call", szBuf, TEXT_BUFFER_SIZE); break; case USAGE_CALL_INCOMING_END: STR_TO_WSTR("End Incoming Call", szBuf, TEXT_BUFFER_SIZE); break; case USAGE_CALL_DTMF: STR_TO_WSTR("Call and DTMF", szBuf, TEXT_BUFFER_SIZE); break; case USAGE_CALL_PARTY3: STR_TO_WSTR("Call Party 3", szBuf, TEXT_BUFFER_SIZE); break; case USAGE_CALL_ANSWER: STR_TO_WSTR("Answer incoming call", szBuf, TEXT_BUFFER_SIZE); break; case USAGE_CALL_REDIRECT: STR_TO_WSTR("Redirect incoming call", szBuf, TEXT_BUFFER_SIZE); break; default: STR_TO_WSTR("Unsupported fn", szBuf, TEXT_BUFFER_SIZE); } // Print the heading at the top of the screen IDISPLAY_DrawText(pMe->a.m_pIDisplay, AEE_FONT_NORMAL, szBuf, -1,10, 5, &rc, IDF_ALIGN_NONE| IDF_TEXT_TRANSPARENT); // Print a message at the bottom of the screen telling the user // how to return to the main app menu STR_TO_WSTR("Press Up/Down", szBuf, TEXT_BUFFER_SIZE); IDISPLAY_DrawText(pMe->a.m_pIDisplay, AEE_FONT_NORMAL, szBuf, -1,10, qrc.dy - 25, &rc, IDF_ALIGN_NONE | IDF_TEXT_TRANSPARENT); STR_TO_WSTR("keys to continue..", szBuf, TEXT_BUFFER_SIZE); IDISPLAY_DrawText(pMe->a.m_pIDisplay, AEE_FONT_NORMAL, szBuf, -1,10, qrc.dy - 15, &rc, IDF_ALIGN_NONE | IDF_TEXT_TRANSPARENT); IDISPLAY_UpdateEx(pMe->a.m_pIDisplay,TRUE); FREE(szBuf); }
/*=========================================================================== FUNCTION: DisplayOutput DESCRIPTION This function displays an output string at a given line number on the screen. If the nline parameter is a negative value (-1) the string is displayed in the middle of the screen. If the "nline" value is larger than or equal to zero the "nline" value is multiplied by 15 and the resulting value in pixels is set to the y-coordinate of the start of the string display on the screen. If the string does not fit on one line the string wraps around to the next line (spaced rougly 10-15 pixels apart). By default 5 is used as the starting the x-coordinate of a displayed string. How many characters that fit on one line is calculated for each line that is wrapped around to the next line. Note: depending on the phone screen size and the fonts used for characters the output might differ on different handsets (devices). Where some handsets will have a smaller screen and large default fonts which will cause partial overlapping of lines. This function does not try to address these issues (this is meant as a simple display function). PROTOTYPE: int DisplayOutput(IShell *pIShell, IDisplay *pDisplay, int nline, char *pszStr, AECHAR *pszwStr, boolean isWideChar) PARAMETERS: pIShell: [in]: Contains a pointer to the IShell interface. pIDisplay: [in]: Contains a pointer to the IDisplay interface. nline: [in]: Contains the line number to start displaying the text. The line numbers are by default spaced 15 pixels apart along the y-axis. pszStr: [in]: The character string to be displayed on the screen. DEPENDENCIES None RETURN VALUE Number of lines written to the screen. SIDE EFFECTS None ===========================================================================*/ static int DisplayOutput(IShell *pIShell, IDisplay *pIDisplay, int nline, char *pszStr, AECHAR *pszwStr, boolean isWideChar) { AEEDeviceInfo di; // Device Info AECHAR * szBuf; // a buffer that supports 200 char string AECHAR * psz = NULL; int charHeight = 0; // Stores the char height in pixels for given font int pnAscent = 0; // Stores the ascent in number of pixels int pnDescent = 0; // Stores the descent in number of pixels int pixelWidth; AEEFont font = AEE_FONT_NORMAL; int pnFits = 0, dy; int totalCh = 0; int numLinesPrinted = 0; // Make sure the pointers we'll be using are valid if (pIShell == NULL || pIDisplay == NULL) { return 0; } if ((szBuf = (AECHAR *) MALLOC(TEXT_BUFFER_SIZE)) == NULL) { return 0; } // Get device information ISHELL_GetDeviceInfo(pIShell,&di); // Get the font metrics info charHeight = IDISPLAY_GetFontMetrics (pIDisplay, AEE_FONT_NORMAL, &pnAscent, &pnDescent); if(isWideChar) { WSTRCPY(szBuf,pszwStr); } else { // Convert to wide string (unicode) STR_TO_WSTR ((char *)pszStr, szBuf, TEXT_BUFFER_SIZE); } // If nlines is zero then print this string starting around the middle of // the screen. Or else multiply nlines by charheight to decide the y coordinate of // the start of the string. if (nline < 0) { dy = di.cyScreen*2/5; } else{ dy = nline * charHeight + 5; } // psz keeps track of the point from which to write from the string buffer // in case the string does not fit one line and needs to wrap around in the // next line. psz = szBuf; // Need to calculate the lotal string length to decide if any wrapping // around is needed. if(isWideChar) { totalCh = 2*WSTRLEN (pszwStr); } else { totalCh = STRLEN ((char *)pszStr); } // Keep displaying text string on multiple lines if the string can't be displayed // on one single line. Lines are spaced 15 pixels apart. while ((totalCh > 0) && (*psz != NULL)) { // Get information on how many characters will fit in a line. // Give the pointer to the buffer to be displayed, and the number of // pixels along the x axis you want to display the string in (max number) // pnFits will have the max number of chars that will fit in the maxWidth // number of pixels (given string can't fit in one line), or the number of // chars in the string (if it does fit in one line). pnWidth gives the // number of pixels that will be used to display pnFits number of chars. pixelWidth = IDISPLAY_MeasureTextEx(pIDisplay, font, (AECHAR *) psz, // Start of the buffer to display, -1, di.cxScreen - 5, // maxWidth &pnFits); // Number of chars that will fit a line // If pnFits is zero there is something wrong in the input to above function. // Normally this scenario should not occur. But, have the check anyway. if (pnFits == 0) { FREE(szBuf); return 0; } IDISPLAY_DrawText(pIDisplay, AEE_FONT_NORMAL, psz, pnFits, 5 /*start dx*/, dy, 0 /* use default rectangle coordinates */, 0); psz += pnFits; // move pointer to the next segment to be displayed totalCh -= pnFits; // reduce the total number of characters to still display dy += charHeight; // Place next line charHeight pixels below the // previous line. ++numLinesPrinted; IDISPLAY_Update(pIDisplay); //, TRUE); if (totalCh < pnFits) pnFits = totalCh; // if total number is less than pnFits, adjust pnFits } FREE(szBuf); return numLinesPrinted; } // End of DisplayOutput
// execute script static inline int script_main(int argc, char** argv) { if(argc<=1) { usage(argv[0]); return -1; } bool bShowSymbols = 0; bool bInteractive = 0; unsigned int uiDebugLevel = 3; #ifndef NDEBUG uiDebugLevel = 4; #endif unsigned int iStartArg = 1; for(iStartArg=1; iStartArg<unsigned(argc); ++iStartArg) { t_string strArg = STR_TO_WSTR(argv[iStartArg]); tl::trim(strArg); // end of arguments to hermelin if(strArg[0] != T_STR'-') break; if(strArg=="-s" || strArg == "--symbols") bShowSymbols = 1; else if(strArg=="-i" || strArg == "--interactive") bInteractive = 1; else if(strArg=="-h" || strArg == "--help") { usage(argv[0]); return 0; } else if(strArg=="-d0") uiDebugLevel = 0; else if(strArg=="-d1") uiDebugLevel = 1; else if(strArg=="-d2") uiDebugLevel = 2; else if(strArg=="-d3") uiDebugLevel = 3; else if(strArg=="-d4") uiDebugLevel = 4; } const std::array<tl::Log*, 5> arrLogs{{&tl::log_crit, &tl::log_err, &tl::log_warn, &tl::log_info, &tl::log_debug}}; for(unsigned int iLog=0; iLog<arrLogs.size(); ++iLog) arrLogs[iLog]->SetEnabled(uiDebugLevel>=iLog); // debug in script.yy needs to be set yydebug = (uiDebugLevel>=4); if(bInteractive) return interactive(bShowSymbols, uiDebugLevel); if(iStartArg >= unsigned(argc)) { tl::log_err("No input file given."); return -1; } // loading of input file const char* pcFile = argv[iStartArg]; t_string strFile = STR_TO_WSTR(pcFile); t_char* pcInput = load_file(pcFile); if(!pcInput) return -2; ParseObj par; ParseInfo info; RuntimeInfo runinfo; info.bEnableDebug = (uiDebugLevel>=4); // lexing par.strCurFile = strFile; par.pLexer = new Lexer(pcInput, strFile.c_str()); delete[] pcInput; pcInput = 0; if(!par.pLexer->IsOk()) { tl::log_err("Lexer returned with errors."); return -3; } init_global_syms(info.pGlobalSyms); // parsing int iParseRet = yyparse(&par); delete par.pLexer; par.pLexer = 0; if(iParseRet != 0) { tl::log_err("Parser returned with error code ", iParseRet, "."); return -4; } // optimizing par.pRoot = par.pRoot->optimize(); // executing SymbolArray *parrMainArgs = new SymbolArray(); for(int iArg=iStartArg; iArg<argc; ++iArg) { SymbolString *pSymArg = new SymbolString(); pSymArg->SetVal(STR_TO_WSTR(argv[iArg])); parrMainArgs->GetArr().push_back(pSymArg); } //std::vector<Symbol*> vecMainArgs = { &arrMainArgs }; SymbolTable *pTableSup = new SymbolTable(); info.pmapModules->insert(ParseInfo::t_mods::value_type(strFile, par.pRoot)); runinfo.strExecFkt = T_STR"main"; //info.pvecExecArg = &vecMainArgs; runinfo.strInitScrFile = strFile; SymbolArray arrMainArgs; arrMainArgs.GetArr().push_back(parrMainArgs); pTableSup->InsertSymbol(T_STR"<args>", &arrMainArgs); par.pRoot->eval(info, runinfo, pTableSup); pTableSup->RemoveSymbolNoDelete(T_STR"<args>"); delete pTableSup; if(bShowSymbols) { tl::log_info("================================================================================"); tl::log_info("Global symbols:"); info.pGlobalSyms->print(); std::ostringstream ostrFkts; for(const NodeFunction* pFunc : info.vecFuncs) ostrFkts << pFunc->GetName() << ", "; tl::log_info("Script functions: ", ostrFkts.str()); const t_mapFkts* pExtFkts = get_ext_calls(); std::ostringstream ostrSysFkts; for(const auto& fktpair : *pExtFkts) ostrSysFkts << fktpair.first << ", "; tl::log_info("System functions: ", ostrSysFkts.str()); tl::log_info("================================================================================"); } return 0; }
/*=========================================================================== FUNCTION: DisplayEvent DESCRIPTION This function prints a heading at the top of the screen to indicate which usage example was selected by the user, It also prints a message on the bottom two lines of the screen instructing the user to press the UP or DOWN key to return to the main menu to execute another example. PROTOTYPE: static void DisplayEvent(ISmsApp * pMe, uint16 wParam) PARAMETERS: pMe: [in]: Contains a pointer to the usage app data structure. wParam: [in]: Identifier of the selected example (example IDs are specified when the main usage app menu is created). If the value USAGE_ERASE_SCREEN is supplied instead, this function clears the screen. DEPENDENCIES None RETURN VALUE None SIDE EFFECTS None ===========================================================================*/ static void DisplayEvent (ISmsApp *pMe, uint16 wParam) { AEERect qrc; AEEDeviceInfo di; // Device Info AECHAR * szBuf; AEERect rc; // Make sure the pointers we'll be using are valid if (pMe == NULL || pMe->a.m_pIShell == NULL || pMe->a.m_pIDisplay == NULL) return; if ((szBuf = (AECHAR *) MALLOC(TEXT_BUFFER_SIZE)) == NULL) return; ISHELL_GetDeviceInfo(pMe->a.m_pIShell,&di); qrc.x = 0; qrc.y = 0; qrc.dx = di.cxScreen; qrc.dy = di.cyScreen; rc.x = 5; rc.y = 5; rc.dx = di.cxScreen - 5; rc.dy = di.cyScreen - 5; // Specify text for heading based on example the user has selected switch (wParam) { case USAGE_ERASE_SCREEN: IDISPLAY_EraseRect(pMe->a.m_pIDisplay,&qrc); //Clear the display FREE(szBuf); return; case USAGE_SMS_TX_ASCII: STR_TO_WSTR("SMS TX ASCII", szBuf, TEXT_BUFFER_SIZE); break; case USAGE_SMS_TX_UNICODE: STR_TO_WSTR("SMS TX UNICODE", szBuf, TEXT_BUFFER_SIZE); break; case USAGE_SMS_TX_UTF8: STR_TO_WSTR("SMS TX UTF-8", szBuf, TEXT_BUFFER_SIZE); break; case USAGE_SMS_RX_TAPI_METHOD: STR_TO_WSTR("SMS RX in TAPI method", szBuf, TEXT_BUFFER_SIZE); break; case USAGE_SMS_RX_ISMS_METHOD: STR_TO_WSTR("SMS RX in ISMS method", szBuf, TEXT_BUFFER_SIZE); break; case USAGE_SMS_STORE_STATUS: STR_TO_WSTR("SMS Store Status", szBuf, TEXT_BUFFER_SIZE); break; case USAGE_SMS_STORE_ENUM_READ: STR_TO_WSTR("SMS Store Read", szBuf, TEXT_BUFFER_SIZE); break; default: STR_TO_WSTR("Unsupported fn", szBuf, TEXT_BUFFER_SIZE); } // Print the heading at the top of the screen IDISPLAY_DrawText(pMe->a.m_pIDisplay, AEE_FONT_NORMAL, szBuf, -1,10, 5, &rc, IDF_ALIGN_NONE| IDF_TEXT_TRANSPARENT); // Print a message at the bottom of the screen telling the user // how to return to the main app menu STR_TO_WSTR("Press Up/Down", szBuf, TEXT_BUFFER_SIZE); IDISPLAY_DrawText(pMe->a.m_pIDisplay, AEE_FONT_NORMAL, szBuf, -1,10, qrc.dy - 25, &rc, IDF_ALIGN_NONE | IDF_TEXT_TRANSPARENT); STR_TO_WSTR("keys to continue..", szBuf, TEXT_BUFFER_SIZE); IDISPLAY_DrawText(pMe->a.m_pIDisplay, AEE_FONT_NORMAL, szBuf, -1,10, qrc.dy - 15, &rc, IDF_ALIGN_NONE | IDF_TEXT_TRANSPARENT); IDISPLAY_UpdateEx(pMe->a.m_pIDisplay,TRUE); FREE(szBuf); }