//....
CDlgNewFolder dlg;
dlg.m_pSoap = pDevice->m_pSoap;
strcpy(dlg.m_szParentPath,strSub);  
UpdateData(TRUE);
char szNewFolderPath[MAX_PATH],szNewName[MAX_PATH];
strcpy(szNewName, dlg.m_szFolderName);
if(dlg.DoModal() != IDOK) return;
//....
提示没有定义,到底怎么回事啊!

解决方案 »

  1.   

    你在什么类中使用的?
    呵呵,参见MSDN中的定义:CWnd::UpdateData,如果是从CWnd继承的类,必须包含#include "StdAfx.h"
      

  2.   

    UpdateData是CWnd的函数,不知你的这段代码在那里执行?
      

  3.   

    我是在单击右键->"新建目录"的函数中做的要弹出一个Dialog,设置以下,所以要用到Dialog中的一个Edit做标题,所以UpdateData(TRUE);让m_szFolderName得到
      

  4.   

    Call this member function to initialize data in a dialog box, or to retrieve and validate dialog data.BOOL UpdateData(
       BOOL bSaveAndValidate = TRUE 
    );其中,bSaveAndValidate是: 
    Flag that indicates whether dialog box is being initialized (FALSE) or data is being retrieved (TRUE). 返回值:
    Nonzero if the operation is successful; otherwise 0. If bSaveAndValidate is TRUE, then a return value of nonzero means that the data is successfully validated.注意:
    The framework automatically calls UpdateData with bSaveAndValidate set to FALSE when a modal dialog box is created in the default implementation of CDialog::OnInitDialog. The call occurs before the dialog box is visible. The default implementation of CDialog::OnOK calls this member function with bSaveAndValidate set to TRUE to retrieve the data, and if successful, will close the dialog box. (If the Cancel button is clicked in the dialog box, the dialog box is closed without the data being retrieved.)
      

  5.   

    不会吧,在哪里用UpdateData()呀?
    如果你这个代码是在对话框中的话,就检查一下有没有DDX和DDV.
      

  6.   

    UpdateData(FALSE);表示将变量中的数据放入控件窗口;
    UpdateData(TRUE);表示将控件窗口中的数据取到变量中并进行合法性检查。
    你有控件及其变量吗?
      

  7.   

    谢谢各位的热心!我已经作好了,是UpdateData(TRUE)放的地方不对!