在下列的回调函数使用时出错,不知为何?int CALLBACK xCallback(long xmitlen,int buflen,char *buf,long flen)
{
   CString s;
   s.Format("%d",xmitlen);
   CDownload_vcDlg dlg;
   dlg.TxSize=s;
   dlg.RefreshStatus(); //不掉用RefreshStatus没有错误
   return 0;
}void CDownload_vcDlg::RefreshStatus()
{
CWnd* pWnd = GetDlgItem(IDC_EDIT3);
pWnd->SetWindowText(TxSize);}

解决方案 »

  1.   

    CWnd* pWnd = GetDlgItem(IDC_EDIT3);
    可以这样转换吗?
      

  2.   

    就是给文本框EDIT3填充字符串TXSize,单独验证这两个语句没有问题。
      

  3.   

    呵呵,如果可以将程序发到:[email protected],我帮你看看!
      

  4.   

    将代码
    CWnd* pWnd = GetDlgItem(IDC_EDIT3);
    pWnd->SetWindowText(TxSize);
    换成AfxMessageBox(TxSize);
    没有问题,是这两句代码的问题么?可是怎么改呢?
      

  5.   

    to: property1(路标) 
    请说明白点,如何使其显示出来,就CDownload_vcDlg一个窗体啊,已经显示了。
      

  6.   

    to: vcleaner(我没做大哥已经很久了.......) 
    老兄,这下发过去了,请指正,万分感谢!