I need to create a number of edit boxes once the user clicks on a button. I'm ok with making one but if I want 5, I can't use the loop. What is the proper way to make them?
The source code crashes at run time, once the user hits Button2:
I want to try and do that with static text later too.
// TODO: Add your control notification handler code here
CEdit* pEdit = new CEdit;
int x1=325, y1=100, x2=425, y2=125, i=1;
for(i; i<5; i++)
pEdit->Create(WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_BORDER,
CRect(x1,y1, x2, y2), this, i);
y1 = y1 + 50;
y2= y1 + 50;