|

楼主 |
发表于 2024-11-20 16:20:03
|
显示全部楼层
WM_HWIN CreateFramewin_Main(void) {
WM_HWIN hWin;
WM_HTIMER hTimer;
hWin = GUI_CreateDialogBox(_aDialogCreate_Main, GUI_COUNTOF(_aDialogCreate_Main), _cbDialog_Main, WM_HBKWIN, 0, 0);
hTimer = WM_CreateTimer(WM_GetClientWindow(hWin), 0, 100, 0);
return hWin;
}
回调函数消息里:
switch (pMsg->MsgId) {
case WM_TIMER:
char buff[30];
sprintf(buff,"20%02d/%02d/%02d %02d:%02d",
system_status.time.year,system_status.time.month,system_status.time.day,
system_status.time.hour,system_status.time.minute);
TEXT_SetText(WM_GetDialogItem(pMsg->hWin,ID_TEXT_57), (const char *)buff);
WM_RestartTimer(pMsg->Data.v, 100);
break;
这是一个定时器,需要多个定时器刷不同的数据怎么处理啊? |
|