没有遇到过这种问题,你要一个对话框上放这么多控件做什么??????这么多控件的话最好是用动态生成的,手动要弄死人了另外 你可以试试CWnd::SubclassDlgItem()函数 BOOL CAboutDlg::OnInitDialog() { CDialog::OnInitDialog(); // IDC_BUTTON1 is the ID for a button on the // dialog template used for CAboutDlg. m_myButton.SubclassDlgItem(IDC_BUTTON1, this); return TRUE; // Return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }这样可以后期绑定,加在OnInitDialog里,应该没有数量限制了
没有数量限制 测试用100个编辑控件都没有问题 Edit中显示0 说明DDX执行了. 估计是读文件的问题.申明变量 int m_q[100]; 构造函数初始化 for(int i = 0; i < 100; i++) { m_q[i] = i; } DoDateExchange for(int i = 0; i < 100; i++) { DDX_Text(pDX, IDC_EDIT1 + i, m_q[i]); }
BOOL CAboutDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// IDC_BUTTON1 is the ID for a button on the
// dialog template used for CAboutDlg.
m_myButton.SubclassDlgItem(IDC_BUTTON1, this); return TRUE; // Return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}这样可以后期绑定,加在OnInitDialog里,应该没有数量限制了
Edit中显示0 说明DDX执行了.
估计是读文件的问题.申明变量
int m_q[100];
构造函数初始化
for(int i = 0; i < 100; i++)
{
m_q[i] = i;
}
DoDateExchange for(int i = 0; i < 100; i++)
{
DDX_Text(pDX, IDC_EDIT1 + i, m_q[i]);
}
来这里领分啊
http://community.csdn.net/Expert/topic/4571/4571719.xml?temp=.977276