WIN32 DialobBox 编程问题
INT CALLBACK DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) {switch(uMsg) {
case WM_INITDIALOG:
return TRUE;
case WM_COMMAND:
switch(LOWORD(wParam)) {
case IDOK:
EndDialog(hwndDlg, LOWORD(wParam));
return TRUE;
default://注释1
return DefDlgProc(hwndDlg, uMsg, wParam, lParam);//注释2
}
break;
default://注释3
return DefDlgProc(hwndDlg, uMsg, wParam, lParam);//注释4
}
return FALSE;
}
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
DialogBox(hInstance, MAKEINTRESOURCE(IDD_DIALOG1), NULL, DialogProc);
return 0;
}
请问上面的代码哪个地方错了,如果把注释的地方都删掉,就可以运行。不然编译可以,但就不能运行。青高手赐教。