主线程是用MFC生成的一个基于对话框的程序,然后在对话框中一个按钮中调用API函数创建了一个线程,我想把线程
函数里的处理信息发反馈个对话框并在一个Edit里面显示。我用API的SetWindowText没成功,不知道应该怎么做?
还有我的工程不知道怎么了 无法设置断点调试了,总是变成白点,然后就出现汇编的代码了?

解决方案 »

  1.   

    One or more breakpoints cannont be set and have been disabled.Execution will stop at the 
    beginnig of the program.
    我把DEBUG删了重新编译 再设断点的时候还是出现这个错误!还有我要是向对话框发送消息 应该发送什么消息呢? 
      

  2.   

    我在对话框程序里为EDIT控件添加了一个EN_CHANG消息映射:
    void CCh15Demo1Dlg::OnChangeEdit17() 
    {
    // 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_messgae = "AAAAA";
    UpdateData(false);}然后用如下代码获得他的句柄:
    CEdit* pBoxOne;
    pBoxOne = (CEdit*) GetDlgItem(IDC_EDIT17);
    HEND hwnd = (HEND)pBoxOne->GetHandle();
    把这个句柄作为线程函数的参数传个线程函数:在线程函数里用SendMessage(hwnd,EN_CHANGE,NULL,NULL)向他发送消息。为什么没有响应呢?
      

  3.   

    CEdit* pBoxOne; 
    pBoxOne = (CEdit*) GetDlgItem(IDC_EDIT17); 
    HEND hwnd = (HEND)pBoxOne->GetSafeHwnd(); 
    试试这个!