at dialog init. I am able to change the bitmap of button as shown below,
case WM_PAINT:
hItem = WM_GetDialogItem(pMsg->hWin, ID_BUTTON_0);
BUTTON_SetBitmapEx ( hItem, BUTTON_BI_UNPRESSED, &bmStart_Test, (175/2)-(50/2), (100/2)-(50/2));
break;
but after that I am not able to change bitmap of same button, what would be the reason?
void vGeneralFunction_StartTest (void){
WM_HWIN hCWin;
/* Create a dialog */
hCWin = GUI_CreateDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), _cbDialog, WM_HBKWIN, LCD_X_SIZE-175, 0);
hButton = WM_GetDialogItem(hCWin , ID_BUTTON_0);
BUTTON_SetBitmapEx ( hButton, BUTTON_BI_UNPRESSED, &bmStop_Test, (175/2)-(50/2), (100/2)-(50/2));
while (1){
GUI_Delay (25);
}
}
case WM_PAINT:
hItem = WM_GetDialogItem(pMsg->hWin, ID_BUTTON_0);
BUTTON_SetBitmapEx ( hItem, BUTTON_BI_UNPRESSED, &bmStart_Test, (175/2)-(50/2), (100/2)-(50/2));
break;
but after that I am not able to change bitmap of same button, what would be the reason?
void vGeneralFunction_StartTest (void){
WM_HWIN hCWin;
/* Create a dialog */
hCWin = GUI_CreateDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), _cbDialog, WM_HBKWIN, LCD_X_SIZE-175, 0);
hButton = WM_GetDialogItem(hCWin , ID_BUTTON_0);
BUTTON_SetBitmapEx ( hButton, BUTTON_BI_UNPRESSED, &bmStop_Test, (175/2)-(50/2), (100/2)-(50/2));
while (1){
GUI_Delay (25);
}
}
The post was edited 1 time, last by himsha ().