|

楼主 |
发表于 2021-7-23 16:45:39
|
显示全部楼层
static void _cbDialog1(WM_MESSAGE * pMsg) {
int NCode;
int Id;
// USER START (Optionally insert additional variables)
static GUI_AUTODEV AutoDev; /* 内存设备 */
static PARAM Param;
static int tDiff,t0;
// USER END
switch (pMsg->MsgId) {
case WM_INIT_DIALOG:
/*初始化*/
GUI_SetBkColor(GUI_WHITE);
GUI_Clear();
// WM_CreateTimer(pMsg->hWin,0,500,0);
GUI_MEMDEV_CreateAuto(&AutoDev);/*创建自动内存设备*/
case WM_PAINT:
//GUI_RotatePolygon(Param.aPoints, _aNeedle, countof(_aNeedle), Param.Angle);
break;
// case WM_TIMER:
// t0 = GUI_GetTime();
// tDiff = GUI_GetTime() - t0;
// Param.Angle = _GetAngle(tDiff)* DEG2RAD;
// WM_InvalidateWindow(pMsg->hWin);
// WM_RestartTimer(pMsg->Data.v,500);
// break;
case WM_NOTIFY_PARENT:
Id = WM_GetId(pMsg->hWinSrc);
NCode = pMsg->Data.v;
switch(Id) {
case ID_BUTTON_1: // Notifications sent by 'Button'
switch(NCode) {
case WM_NOTIFICATION_CLICKED:
// USER START (Optionally insert code for reacting on notification message)
WM_HideWindow(hWin1);
// USER END
break;
case WM_NOTIFICATION_RELEASED:
// USER START (Optionally insert code for reacting on notification message)
// USER END
break;
// USER START (Optionally insert additional code for further notification handling)
// USER END
}
break;
// USER START (Optionally insert additional code for further Ids)
// USER END
}
break;
// USER START (Optionally insert additional message handling)
// USER END
default:
WM_DefaultProc(pMsg);
break;
}
} |
|