新手上路
- 积分
- 27
- 金钱
- 27
- 注册时间
- 2017-11-1
- 在线时间
- 4 小时
|

楼主 |
发表于 2017-11-8 11:02:56
|
显示全部楼层
WM_HWIN CreateWindowPage1(void) {
WM_HTIMER hTimer;
WM_HWIN hWin;
hWin = GUI_CreateDialogBox(_aDialogCreatePage1, GUI_COUNTOF(_aDialogCreatePage1), &_cbDialogPage1,0, 0, 0);
hTimer =WM_CreateTimer(WM_GetClientWindow(hWin),0,1000,0);
GUI_Delay(1000);
return hWin;
}//在创建page1时加入这段创建Timer
case WM_TIMER:
sprintf(Page2_adc,"%10.2f",TEMP_adc[1]);
TEXT_SetText(WM_GetDialogItem(pMsg->hWin,ID_TEXT_4),(const char *)Page2_adc);
sprintf(Page2_tem,"%10.2f",TEMP_tem[1]);
TEXT_SetText(WM_GetDialogItem(pMsg->hWin,ID_TEXT_3),(const char *)Page2_tem);
WM_RestartTimer(pMsg->Data.v,1000);
break;
//在这加个case和添加相关更新代码就好
如果有需要源代码或者还有不知道的可以在帖子里交流,我也是刚刚学习,咱们互相学习 |
|