I am using the Create function to make edit boxes during run-time. The following code doesn't work. I want to make an array of edit boxes but it won't do it. How can I do this?
CEdit *MyBox[1] = new CEdit;
MyBox[1]->Create (ES_CENTER | WS_BORDER | ES_READONLY | WS_CHILD | WS_TABSTOP | WS_VISIBLE, CRect(1,1,20,20), this, 1057);
int WordLength = m_Word.GetLength();
for (m_Looper = 1; m_Looper <= WordLength; m_Looper++)
{
Left = Left + 20;
Top = Top + 20;
Right = Right + 20;
Bottom = Bottom + 20;
CEdit *MyBox[m_Looper] = new CEdit;
MyBox[m_Looper]->Create (ES_CENTER | WS_BORDER | ES_READONLY | WS_CHILD | WS_TABSTOP | WS_VISIBLE, CRect(Left,Top,Right,Bottom), this, 1057);
}
UpdateData(FALSE);
CEdit *MyBox[1] = new CEdit;
MyBox[1]->Create (ES_CENTER | WS_BORDER | ES_READONLY | WS_CHILD | WS_TABSTOP | WS_VISIBLE, CRect(1,1,20,20), this, 1057);
int WordLength = m_Word.GetLength();
for (m_Looper = 1; m_Looper <= WordLength; m_Looper++)
{
Left = Left + 20;
Top = Top + 20;
Right = Right + 20;
Bottom = Bottom + 20;
CEdit *MyBox[m_Looper] = new CEdit;
MyBox[m_Looper]->Create (ES_CENTER | WS_BORDER | ES_READONLY | WS_CHILD | WS_TABSTOP | WS_VISIBLE, CRect(Left,Top,Right,Bottom), this, 1057);
}
UpdateData(FALSE);