bkhe1
06-18-2002, 11:55 PM
How is it possible to have two instance of ITextCtl at the same time.
Eg. have a username text Field and password text field
//username textfield
ISHELL_CreateInstance(pMe->a.m_pIShell,AEECLSID_SOFTKEYCTL,(void **)&pMe->m_PIMenu);
if(pMe->m_pIText != NULL)
{
STR_TO_WSTR("Username",szBuf,sizeof(szBuf));
ITEXTCTL_SetTitle(pMe->m_pIText,NULL,NULL,szBuf);
ITEXTCTL_SetMaxSize(pMe->m_pIText,100);
ITEXTCTL_SetProperties(pMe->m_pIText,TP_FRAME | TP_RAPID_MODE);
ITEXTCTL_SetRect(pMe->m_pIText,&rect);
STR_TO_WSTR("dzf",szBuf,sizeof(szBuf));
ITEXTCTL_SetText(pMe->m_pIText,szBuf,sizeof(szBuf));
ITEXTCTL_SetActive(pMe->m_pIText,TRUE);
}
//password textfield
pMe->m_pIText2= NULL;
SETAEERECT(&rect2,5,80,100,200);
ISHELL_CreateInstance(pMe->a.m_pIShell,AEECLSID_TEXTCTL,(void **)&pMe->m_pIText2);
if(pMe->m_pIText2 != NULL)
{
STR_TO_WSTR("Password",szBuf2,sizeof(szBuf2));
ITEXTCTL_SetTitle(pMe->m_pIText2,NULL,NULL,szBuf2);
ITEXTCTL_SetMaxSize(pMe->m_pIText2,100);
ITEXTCTL_SetProperties(pMe->m_pIText2,TP_FRAME);
ITEXTCTL_SetRect(pMe->m_pIText2,&rect2);
STR_TO_WSTR("",szBuf2,sizeof(szBuf2));
ITEXTCTL_SetText(pMe->m_pIText2,szBuf2,sizeof(szBuf2));
ITEXTCTL_SetActive(pMe->m_pIText2,TRUE);
}
For some reason only the password text field loads up.
any suggestions welcomed
cheers,
Bhavna
Eg. have a username text Field and password text field
//username textfield
ISHELL_CreateInstance(pMe->a.m_pIShell,AEECLSID_SOFTKEYCTL,(void **)&pMe->m_PIMenu);
if(pMe->m_pIText != NULL)
{
STR_TO_WSTR("Username",szBuf,sizeof(szBuf));
ITEXTCTL_SetTitle(pMe->m_pIText,NULL,NULL,szBuf);
ITEXTCTL_SetMaxSize(pMe->m_pIText,100);
ITEXTCTL_SetProperties(pMe->m_pIText,TP_FRAME | TP_RAPID_MODE);
ITEXTCTL_SetRect(pMe->m_pIText,&rect);
STR_TO_WSTR("dzf",szBuf,sizeof(szBuf));
ITEXTCTL_SetText(pMe->m_pIText,szBuf,sizeof(szBuf));
ITEXTCTL_SetActive(pMe->m_pIText,TRUE);
}
//password textfield
pMe->m_pIText2= NULL;
SETAEERECT(&rect2,5,80,100,200);
ISHELL_CreateInstance(pMe->a.m_pIShell,AEECLSID_TEXTCTL,(void **)&pMe->m_pIText2);
if(pMe->m_pIText2 != NULL)
{
STR_TO_WSTR("Password",szBuf2,sizeof(szBuf2));
ITEXTCTL_SetTitle(pMe->m_pIText2,NULL,NULL,szBuf2);
ITEXTCTL_SetMaxSize(pMe->m_pIText2,100);
ITEXTCTL_SetProperties(pMe->m_pIText2,TP_FRAME);
ITEXTCTL_SetRect(pMe->m_pIText2,&rect2);
STR_TO_WSTR("",szBuf2,sizeof(szBuf2));
ITEXTCTL_SetText(pMe->m_pIText2,szBuf2,sizeof(szBuf2));
ITEXTCTL_SetActive(pMe->m_pIText2,TRUE);
}
For some reason only the password text field loads up.
any suggestions welcomed
cheers,
Bhavna