调试时OnInitDialog函数返回TRUE后不再往下执行,不能弹出对话框,请高手帮忙,谢谢
代码如下:CDialog::OnInitDialog();
// TODO: Add extra initialization here
//设置缺省值
UpdateData(FALSE);
GetDlgItem(IDC_PL)->SetWindowText("1000");
GetDlgItem(IDC_GL)->SetWindowText("80");
GetDlgItem(IDC_DK)->SetWindowText("20");
GetDlgItem(IDC_TXZY)->SetWindowText("25");
GetDlgItem(IDC_GDBSKD)->SetWindowText("10");
GetDlgItem(IDC_SPBSKD)->SetWindowText("10");
GetDlgItem(IDC_SPFWJ)->SetWindowText("90");
GetDlgItem(IDC_TXYJ)->SetWindowText("0");
GetDlgItem(IDC_JDD)->SetWindowText("120");
GetDlgItem(IDC_JDF)->SetWindowText("0");
GetDlgItem(IDC_JDM)->SetWindowText("0");
GetDlgItem(IDC_BWD)->SetWindowText("40");
GetDlgItem(IDC_BWF)->SetWindowText("0");
GetDlgItem(IDC_BWM)->SetWindowText("0");
GetDlgItem(IDC_XTHB)->SetWindowText("400");
GetDlgItem(IDC_TXJDGD)->SetWindowText("10");
((CComboBox*)GetDlgItem(IDC_TXJHFS))->SetCurSel(0);
CheckRadioButton(IDC_TZTFRADIO1,IDC_TZMCRADIO3,IDC_TZTFRADIO1);
GetDlgItem(IDC_MCQHSTATIC)->EnableWindow(FALSE);
GetDlgItem(IDC_MCQH)->EnableWindow(FALSE);
GetDlgItem(IDC_MCTZKDSTATIC)->EnableWindow(FALSE);
GetDlgItem(IDC_MCTZKD)->EnableWindow(FALSE);
GetDlgItem(IDC_OK)->EnableWindow(FALSE);
m_SendAmount++;
if (m_SendAmount > 1)
GetDlgItem(IDC_BEFOREDATA)->EnableWindow(TRUE);
else
GetDlgItem(IDC_BEFOREDATA)->EnableWindow(FALSE);
return TRUE;
[解决办法]
加断点,跟吧。看你的代码好像没有发现什么问题