Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

Hi

I 've written the following code for entering information in various text controls. But despite setting the input mode using ITEXTCTL_SetInputMode to AEE_TM_NUMBERS, the respective control is also taking the characters other than numbers

void BookMyShow4_EnterCreditCardInfo(sample1 *pMe)
{
AEEMenuColors mc;
IImage* pImage = NULL;
AEEItemStyle Sel,Normal;
AEERect rcHead,rcFoot,rc;
AECHAR writebuf[30];
Sel.ft = AEE_FT_BOX;
Sel.xOffset = 2;
Sel.yOffset = 2;
Sel.roImage = AEE_RO_NOT;
Normal.xOffset = 2;
Normal.yOffset = 2;
Normal.roImage = AEE_RO_COPY;
mc.wMask=MC_BACK|MC_SCROLLBAR|MC_SEL_BACK|MC_SCROLLBAR|MC_FRAME|MC_TEXT|MC_SEL_TEXT;
mc.cBack=MAKE_RGB(255,255,255);
mc.cSelBack=MAKE_RGB(255,255,196);
mc.cText=MAKE_RGB(75,75,75);
mc.cSelText = MAKE_RGB(255,0,0);
mc.cFrame=MAKE_RGB(254,191,61);
IDISPLAY_ClearScreen(pMe->a.m_pIDisplay);
SETAEERECT(&rcHead,0,0,pMe->DeviceInfo.cxScreen,15);

SETAEERECT(&rc,0,25,pMe->DeviceInfo.cxScreen,pMe->DeviceInfo.cyScreen-40);

IMENUCTL_SetRect(pMe->Menu1,&rc);
IMENUCTL_SetStyle(pMe->Menu1, &Normal, &Sel);
IMENUCTL_SetColors(pMe->Menu1,&mc);
ITEXTCTL_SetRect(pMe->txt1,&rc);
ITEXTCTL_SetRect(pMe->txt2,&rc);
ITEXTCTL_SetRect(pMe->txt3,&rc);
ITEXTCTL_SetRect(pMe->txt4,&rc);
ITEXTCTL_SetRect(pMe->txt5,&rc);
ITEXTCTL_SetRect(pMe->txt6,&rc);
STRTOWSTR("Enter Name:",writebuf,25);
ITEXTCTL_SetTitle(pMe->txt1,(const char *)NULL,(uint16)NULL,writebuf);
ITEXTCTL_SetProperties(pMe->txt1,TP_FRAME);

STRTOWSTR("Enter CardNo:",writebuf,25);
ITEXTCTL_SetTitle(pMe->txt2,(const char *)NULL,(uint16)NULL,writebuf);
ITEXTCTL_SetInputMode(pMe->txt2,AEE_TM_NUMBERS);
ITEXTCTL_SetMaxSize(pMe->txt2,5);

STRTOWSTR("Enter CVN:",writebuf,25);
ITEXTCTL_SetMaxSize(pMe->txt3,5);
ITEXTCTL_SetInputMode(pMe->txt3,AEE_TM_NUMBERS);
ITEXTCTL_SetTitle(pMe->txt3,(const char *)NULL,(uint16)NULL,writebuf);

STRTOWSTR("Enter Month:",writebuf,25);
ITEXTCTL_SetMaxSize(pMe->txt4,2);
ITEXTCTL_SetInputMode(pMe->txt4,AEE_TM_NUMBERS);
ITEXTCTL_SetTitle(pMe->txt4,(const char *)NULL,(uint16)NULL,writebuf);

STRTOWSTR("Enter Year:",writebuf,25);
ITEXTCTL_SetMaxSize (pMe->txt5,4);
ITEXTCTL_SetInputMode(pMe->txt5, AEE_TM_NUMBERS);
ITEXTCTL_SetTitle(pMe->txt5,(const char *)NULL,(uint16)NULL,writebuf);

STRTOWSTR("Enter Mobile No:",writebuf,25);
ITEXTCTL_SetTitle(pMe->txt6,(const char *)NULL,(uint16)NULL,writebuf);
ITEXTCTL_SetMaxSize (pMe->txt6, 10);
ITEXTCTL_SetInputMode(pMe->txt6, AEE_TM_NUMBERS);

STRTOWSTR("Master",writebuf,25);
IMENUCTL_AddItem(pMe->Menu1,(const char *)NULL,(uint16)NULL,1,writebuf,(uint32)writebuf);
STRTOWSTR("Visa",writebuf,25);
IMENUCTL_AddItem(pMe->Menu1,(const char *)NULL,(uint16)NULL,2,writebuf,(uint32)writebuf);

ITEXTCTL_SetActive(pMe->txt1,TRUE);
SETAEERECT(&rcFoot,0,pMe->DeviceInfo.cyScreen-15,pMe->DeviceInfo.cxScreen,15);
IDISPLAY_DrawRect(pMe->a.m_pIDisplay,&rcHead,MAKE_RGB(254,191,61),MAKE_RGB(254,191,61),IDF_RECT_FILL);
IDISPLAY_DrawRect(pMe->a.m_pIDisplay,&rcFoot,MAKE_RGB(254,191,61),MAKE_RGB(254,191,61),IDF_RECT_FILL);
IDISPLAY_Update(pMe->a.m_pIDisplay);
pMe->pAppState=APP_STATE_CREDITCARD;

}

Hi
I am getting the same problem
did you get any solution for this.

Hi
I am getting the same problem
did you get any solution for this.

Is this on the handset ??
What is the model ??

Is this on the handset ??
What is the model ??