对应复选框的消息处理如下所示:编译一直出现八个错误,请大神帮我看下是逻辑问题还是语法上错误了,看了好久了。
我的想法是:选一个复选框的时候失能掉另一个复选框,在取消刚刚选中的复选框时再重新使能刚刚失能掉的复选框。下面是2个组的复选框(4个复选框),
case GUI_ID_CHECKBOX1:
if(NCode==WM_NOTIFICATION_RELEASED)
{
if(CHECKBOX_IsChecked(WM_GetDialogItem(pMsg->hWin, GUI_ID_CHECKBOX1)==1)
{
WM_DisableWindow(WM_GetDialogItem(pMsg->hWin, GUI_ID_CHECKBOX2));
}
else if(CHECKBOX_IsChecked(WM_GetDialogItem(pMsg->hWin, GUI_ID_CHECKBOX1)==0)
{
WM_EnableWindow(WM_GetDialogItem(pMsg->hWin, GUI_ID_CHECKBOX2));
}
}
break;
case GUI_ID_CHECKBOX2:
if(NCode==WM_NOTIFICATION_RELEASED)
{
if(CHECKBOX_IsChecked(WM_GetDialogItem(pMsg->hWin, GUI_ID_CHECKBOX2)==1)
{
WM_DisableWindow(WM_GetDialogItem(pMsg->hWin, GUI_ID_CHECKBOX1));
}
else if(CHECKBOX_IsChecked(WM_GetDialogItem(pMsg->hWin, GUI_ID_CHECKBOX2)==0)
{
WM_EnableWindow(WM_GetDialogItem(pMsg->hWin, GUI_ID_CHECKBOX1));
}
}
break;
case GUI_ID_CHECKBOX3:
if(NCode==WM_NOTIFICATION_RELEASED)
{
if(CHECKBOX_IsChecked(WM_GetDialogItem(pMsg->hWin, GUI_ID_CHECKBOX3)==1)
{
WM_DisableWindow(WM_GetDialogItem(pMsg->hWin, GUI_ID_CHECKBOX4));
}
else if(CHECKBOX_IsChecked(WM_GetDialogItem(pMsg->hWin, GUI_ID_CHECKBOX3)==0)
{
WM_EnableWindow(WM_GetDialogItem(pMsg->hWin, GUI_ID_CHECKBOX4));
}
}
break;
case GUI_ID_CHECKBOX4:
if(NCode==WM_NOTIFICATION_RELEASED)
{
if(CHECKBOX_IsChecked(WM_GetDialogItem(pMsg->hWin, GUI_ID_CHECKBOX4)==1)
{
WM_DisableWindow(WM_GetDialogItem(pMsg->hWin, GUI_ID_CHECKBOX3));
}
else if(CHECKBOX_IsChecked(WM_GetDialogItem(pMsg->hWin, GUI_ID_CHECKBOX4)==0)
{
WM_EnableWindow(WM_GetDialogItem(pMsg->hWin, GUI_ID_CHECKBOX3));
}
}
break;
出错内容如下:4对如下两个的错误
....emWinemWinTaskMainTask_Network.c(381): error: #18: expected a ")"
....emWinemWinTaskMainTask_Network.c(388): error: #127: expected a statement
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
一周热门 更多>