CDataExchange::CDataExchange

呼叫此成員函式 CDataExchange 建構物件。

CDataExchange(
   CWnd* pDlgWnd,
   BOOL bSaveAndValidate 
);

參數

  • pDlgWnd
    指標至包含控制項的父視窗。這通常是 CDialog衍生物件。

  • bSaveAndValidate
    如果 ,這個物件會驗證資料,重新命名成員則會從控制項中的資料。如果 ,這個物件從成員將資料移到控制項。

備註

建構 CDataExchange 物件將額外資訊儲存在資料交換的物件會傳遞至視窗的 CWnd::DoDataExchange 成員函式。

範例

CYourDataExchange dx(this, FALSE);
try
{ 
   DoDataExchange(&dx); 
} 
catch(CUserException* pe) 
{ 
   // some part of the exchange went wrong 
   // but the user has already been notified 
   pe->Delete();
} 

需求

Header: afxwin.h

請參閱

參考

CDataExchange 類別

階層架構圖