I created a skinned button with BUTTON_SKIN_FLEX. There is a redraw routine in the default callback when button is pressed. I overwrite the default callback to accept touch message and my button don't get redrawn on pressed.
How can I get back the redraw functionality from the overwrite callback.
Sample:
static void _cbButton(WM_MESSAGE *pMsg){
int Id;
BUTTON_SKINFLEX_PROPS Props;
GUI_PID_STATE current_PIDState;
switch(pMsg->MsgId){
case WM_TOUCH:
GUI_PID_GetCurrentState(¤t_PIDState);
if(UnPressed_Flag == true){
if(current_PIDState.Pressed == 1){
Id = WM_GetId(pMsg->hWin);
switch(Id){
case ID_BUTTON_0:
_BringToBottom(_hWindow4);
_BringToTop(_hWindow5);
break;
case ID_BUTTON_3:
_BringToBottom(_hWindow4);
_BringToTop(_hWindow6);
break;
case ID_BUTTON_6:
PROGBAR_SetValue(_hProgBar_1, 0);
_BringToBottom(_hWindow5);
_BringToTop(_hWindow4);
break;
case ID_BUTTON_7:
_ProgBarStat(_hProgBar_1);
break;
case ID_BUTTON_8:
_BringToBottom(_hWindow6);
_BringToTop(_hWindow4);
break;
default:
break;
}
}
}
break;
default:
BUTTON_Callback(pMsg);
break;
}
}
How can I get back the redraw functionality from the overwrite callback.
Sample:
static void _cbButton(WM_MESSAGE *pMsg){
int Id;
BUTTON_SKINFLEX_PROPS Props;
GUI_PID_STATE current_PIDState;
switch(pMsg->MsgId){
case WM_TOUCH:
GUI_PID_GetCurrentState(¤t_PIDState);
if(UnPressed_Flag == true){
if(current_PIDState.Pressed == 1){
Id = WM_GetId(pMsg->hWin);
switch(Id){
case ID_BUTTON_0:
_BringToBottom(_hWindow4);
_BringToTop(_hWindow5);
break;
case ID_BUTTON_3:
_BringToBottom(_hWindow4);
_BringToTop(_hWindow6);
break;
case ID_BUTTON_6:
PROGBAR_SetValue(_hProgBar_1, 0);
_BringToBottom(_hWindow5);
_BringToTop(_hWindow4);
break;
case ID_BUTTON_7:
_ProgBarStat(_hProgBar_1);
break;
case ID_BUTTON_8:
_BringToBottom(_hWindow6);
_BringToTop(_hWindow4);
break;
default:
break;
}
}
}
break;
default:
BUTTON_Callback(pMsg);
break;
}
}
The post was edited 4 times, last by jvanmont ().