Domodal出不来把,跟踪进去就知道结果了

解决方案 »

  1.   

    对,就是执行到 nResponse = dlg.DoModal();
    就不知跳到哪里去了,to kingzai:
               怎么跟踪进去啊?
      

  2.   

    1、是不是资源ID被改了?如果对话框ID被改动了,MFC会返回失败
    2、消息映射是不是自己手动加上去的?
    3、“就是执行到 nResponse = dlg.DoModal();就不知跳到哪里去了”??
       程序退出了吗?
      

  3.   

    在nResponse = dlg.DoModal();前面加AfxMessageBox还可以出得来消息框,加到后面就什么也没有了,
    to: kingzai(),
    刚才一直按F11调试,
    我在调试窗口下,好像执行到
    CreateDialogIndirect是就提示什么溢出,程序就继续不下去了
      

  4.   

    我现在发现是在程序中加了一个处理消息EN_CHANGE (edit box )得函数,结果就出现上述问题,我如果去掉上述代码,程序就正常了,不知为何?
    消息代码如下:
    void CTemperatureDlg::OnChangeInput() 
    {
    // TODO: If this is a RICHEDIT control, the control will not
    // send this notification unless you override the CDialog::OnInitDialog()
    // function and call CRichEditCtrl().SetEventMask()
    // with the ENM_CHANGE flag ORed into the mask.

    // TODO: Add your control notification handler code here
    m_input_string.GetWindowText (m_input_temp);
    m_temp_in=atof(m_input_temp);
    if (m_radio_check==0)
    {
    m_temp_out=m_temp_in*5/9+32;
    }
    else
    {
    m_temp_out=9*(m_temp_in-32)/5;
    }
    m_output_temp.Format ("%f",m_temp_out);
    m_input_string.SetWindowText (m_input_temp);
    m_output_string.SetWindowText (m_output_temp);    Invalidate(true);
    }