The mechanism is called dynamic data exchange. When you call the UpdateData method, it inturn sets the member of the CDataExchange class and calls DoDataExchange. DDX is nothing more than global functions that internally call SetDlgItemText or GetDlgItemText.
/ ,
CEdit* pBoxOne;
pBoxOne = (CEdit*) GetDlgItem(IDC_EDIT1);
pBoxOne->SetDlgItemText("asd");