DoDataExchange中的//{{AFX_DATA_MAP()起什么作用?
void CMyDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CMyDlg)
DDX_Control(pDX, IDC_STATIC_SM, m_SM_Rect);
DDX_Control(pDX, IDC_EDIT1, m_edit1);
//}}AFX_DATA_MAP
DDX_Control(pDX, IDC_CHECK1, m_chk_List1);
DDX_Control(pDX, IDC_BUTTON_GOBOTTOM, m_cmd_GoBottom);
}
如上在DoDataExchange中写在//{{AFX_DATA_MAP()间的DDX_Control()以绿色显示,而写在外边的去以黑色显示,它们到底有什么区别,我只知道会在类向导的显示成员变量中体现出来,相信应该还有其它的重大差别,请赐教
问题点数:200、回复次数:3Top
1 楼IamReason(理由)回复于 2002-08-23 09:07:00 得分 60
关注Top
2 楼key(程序狂吐)回复于 2002-08-23 09:13:23 得分 70
ClassWizard and AppWizard insert specially formatted comment delimiters in your source code files to mark the places in your files that ClassWizard can write to. AFX_DATA_MAP is used to mark the beginning and end of dialog data exchange (DDX) function calls in a dialog class’s DoDataExchange member function:
Top
3 楼goatyy()回复于 2002-08-23 09:18:32 得分 70
//{{AFX_DATA_MAP()它是标识让类向导能在此insert code;
而下边的宏,是处理数据交换的;
Top




