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

Developer

Forums

Forums:

I showed a dialog on screen, but i dont know hot to get input of it.

For example, the dialog has only one edit control, i need retrieve content of the edit control, Could you give me a simple example?

Thanks for your help!!:)

//-------------to show the textctl dialog for input------------------
SETAEERECT(&rc, 2, 2*cy/3, cx-4, cy/3-2);
ITEXTCTL_SetRect(pme->m_pTextCtl, &rc);
ITEXTCTL_SetTitle(pme->m_pTextCtl, MEDIAPLAYER_RES_FILE, IDS_FOLDER_NAME, NULL);
ITEXTCTL_SetProperties( pme->m_pTextCtl, TP_FRAME );
ITEXTCTL_SetInputMode( pme->m_pTextCtl, AEE_TM_LETTERS );
ITEXTCTL_SetMaxSize( pme->m_pTextCtl, MP_MAX_FILENAME );
STR_TO_WSTR("New Folder", szBuf, sizeof(szBuf));
ITEXTCTL_SetText(pme->m_pTextCtl, szBuf, sizeof (szBuf));
ITEXTCTL_SetActive(pme->m_pTextCtl, TRUE);
//------------catch the AVK_SELECT (press the OK key) event and get the content of the textctl in the HandleEvent()----------------------------//
void Win_HandleEvent()
{
if( ITEXTCTL_IsActive(pme->m_pTextCtl) )
{
if( wParam == AVK_SELECT)
{
char pszStr[30] = {0};
pszText = ITEXTCTL_GetTextPtr(pme->m_pTextCtl);
...............
}

//-------------to show the textctl dialog for input------------------
SETAEERECT(&rc, 2, 2*cy/3, cx-4, cy/3-2);
ITEXTCTL_SetRect(pme->m_pTextCtl, &rc);
ITEXTCTL_SetTitle(pme->m_pTextCtl, MEDIAPLAYER_RES_FILE, IDS_FOLDER_NAME, NULL);
ITEXTCTL_SetProperties( pme->m_pTextCtl, TP_FRAME );
ITEXTCTL_SetInputMode( pme->m_pTextCtl, AEE_TM_LETTERS );
ITEXTCTL_SetMaxSize( pme->m_pTextCtl, MP_MAX_FILENAME );
STR_TO_WSTR("New Folder", szBuf, sizeof(szBuf));
ITEXTCTL_SetText(pme->m_pTextCtl, szBuf, sizeof (szBuf));
ITEXTCTL_SetActive(pme->m_pTextCtl, TRUE);
//------------catch the AVK_SELECT (press the OK key) event and get the content of the textctl in the HandleEvent()----------------------------//
void Win_HandleEvent()
{
if( ITEXTCTL_IsActive(pme->m_pTextCtl) )
{
if( wParam == AVK_SELECT)
{
char pszStr[30] = {0};
pszText = ITEXTCTL_GetTextPtr(pme->m_pTextCtl);
...............
}