// Create text control if necessary
if(!pt) {
if (ISHELL_CreateInstance(pme->a.m_pIShell, AEECLSID_TEXTCTL,(void **)(&pt)) != AEE_SUCCESS)
return FALSE;
else
{
// Reset Text Control size so that when we assign some other size, it doesn't
// erase anything
SETAEERECT(&rc, 0, 0, 0, 0);
ITEXTCTL_SetRect(pt, &rc);
}
}
pme->m_pText = pt;
// Set TextControl buffer size and title
MShop_SetTitle(pme, APPMGRLS_RES_FILE,(uint16)(bSearch ? IDS_SEARCH_TITLE : IDS_CREDITBACK_TITLE),NULL);
ITEXTCTL_SetMaxSize(pt, MAX_STR_CHARS);
if (bSearch)
IMENUCTL_AddItem(pme->m_pSK, APPMGRLS_RES_FILE, IDS_ANY, IDC_SEARCH_ANY, NULL, NULL);
else
// Setup softkey menu for this text control with ok/mode options
IMENUCTL_AddItem(pme->m_pSK, APPMGRLS_RES_FILE, IDC_OK, IDC_MSHOP_CREDITBACK, NULL, NULL);
// Get softkey size
IMENUCTL_GetRect(pme->m_pSK, &rcm);
if (bSearch)
// Set Text Control Properties
ITEXTCTL_SetProperties(pt, TP_FRAME|TP_MULTILINE|TP_T9_MODE);
else
// Set Text Control Properties ITEXTCTL_SetProperties(pt, TP_FRAME|TP_MULTILINE);
// Set Text Control Size
SETAEERECT(&rc, MARGIN, pme->m_rcMShopLogo.dy + MARGIN, pme->m_cx - 2*MARGIN, pme->m_cyFont*((pme->m_cy - pme->m_rcMShopLogo.dy - rcm.dy - MARGIN)/pme->m_cyFont)); ITEXTCTL_SetRect(pt, &rc);
// Set Softkey to Text Control
ITEXTCTL_SetSoftKeyMenu(pme->m_pText, pme->m_pSK);
// Redraw Softkey
IMENUCTL_Redraw(pme->m_pSK);
// If this isn't search, let's make numbers default
if (!bSearch)
ITEXTCTL_SetInputMode(pt, AEE_TM_NUMBERS);
// Make Text Control Active ITEXTCTL_SetActive(pt, TRUE);
// Set repaint flag false to prevent TextControl from updating Title and Banner
// for every event
pme->m_bRepaint = FALSE;