Text Widget does update on multiple invalidate call in WM_PAINT Block
I am trying to update text widget in a WM_Paint block but it does not.My code
This is initialization
Now I am invalidating it using WM_Invalidate
And it callback funtion
Display All
Here user data keeps updating. I am getting it into logs but can not show any changes on screen
I am trying to update text widget in a WM_Paint block but it does not.My code
This is initialization
Now I am invalidating it using WM_Invalidate
And it callback funtion
Source Code
- /* fault_alert_text callback */
- static void _cbFaultAlertText(WM_MESSAGE * pMsg)
- {
- /* Decode message type */
- switch (pMsg->MsgId)
- {
- /* Component repaint message */
- case WM_PAINT:
- {
- static char str1[20] = {'\0'};
- printLogs("User Data :: a : %d, s : %s\r\n", data.a, data.s);
- sprintf(str1, "%s : %d", data.s, data.a);
- TEXT_SetTextColor(pMsg->hWin, GUI_MAKE_COLOR(0x00FFFFFF));
- TEXT_SetTextAlign(pMsg->hWin, GUI_TA_HCENTER | GUI_TA_VCENTER);
- TEXT_SetText(pMsg->hWin, str1);
- }
- /* Default callback message */
- default:
- TEXT_Callback(pMsg);
- }
- }