AVK_CLR closes app after erases letter when use ITEXTCTL | developer.brewmp.com AVK_CLR closes app after erases letter when use ITEXTCTL | developer.brewmp.com

Developer

AVK_CLR closes app after erases letter when use ITEXTCTL

Forums:

how to mask AVK_CLR in app eventhandler?

Return TRUE from your event handler to keep BREW from closing the app.
-Erik

Return TRUE from your event handler to keep BREW from closing the app.
-Erik

tech support can you help

tech support can you help

If an application returns FALSE to an EVT_KEY with AVK_CLR, then the application will receive an EVT_APP_STOP. A textctl will return FALSE if there are no characters present in the texctl and it handles an EVT_KEY with AVK_CLR. So this code will act as you describe:
case EVT_KEY:
return ITEXTCTL_HandleEvent(pMe->pITextCtl, eCode, wParam, dwParam);
You may want to try something like this:
case EVT_KEY:
if(ITEXTCTL_HandleEvent(pMe->pITextCtl, eCode, wParam, dwParam)) {
return TRUE;
}
else {
//Do something else
return TRUE;
}

If an application returns FALSE to an EVT_KEY with AVK_CLR, then the application will receive an EVT_APP_STOP. A textctl will return FALSE if there are no characters present in the texctl and it handles an EVT_KEY with AVK_CLR. So this code will act as you describe:
case EVT_KEY:
return ITEXTCTL_HandleEvent(pMe->pITextCtl, eCode, wParam, dwParam);
You may want to try something like this:
case EVT_KEY:
if(ITEXTCTL_HandleEvent(pMe->pITextCtl, eCode, wParam, dwParam)) {
return TRUE;
}
else {
//Do something else
return TRUE;
}