【求助】return语句的返回
程序代码:
void Main_OnCommand(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify) { switch(id) { case IDC_BUTTONADD: { TCHAR str1[256]; int gettext=GetDlgItemText(hwnd,IDC_EDITADD,str1,sizeof(str1)); if(0==gettext) { MessageBox(hwnd,TEXT("未填入任何项!"),TEXT("错误"),MB_OK|MB_ICONERROR); return; } HWND hwndCombo1=GetDlgItem(hwnd,IDC_COMBO1); ComboBox_InsertString(hwndCombo1,0,str1); SetDlgItemText(hwnd,IDC_EDITADD,TEXT("")); MessageBox(hwnd,TEXT("添加成功!"),TEXT(str1),MB_OK|MB_ICONEXCLAMATION); } break; case IDC_BUTTONDEL: { HWND hwndCombo1=GetDlgItem(hwnd,IDC_COMBO1); int intIndex=ComboBox_GetCurSel(hwndCombo1); if(CB_ERR==intIndex) { MessageBox(hwnd,TEXT("没有任何项被选中!"),TEXT("错误"),MB_OK|MB_ICONERROR); return; } ComboBox_DeleteString(hwndCombo1,intIndex); MessageBox(hwnd,TEXT("删除成功!"),TEXT(""),MB_OK|MB_ICONEXCLAMATION); } break; default: break; } }
这里return语句是让跳出哪个语句?是case语句?switch语句?还是直接跳出这个函数?