void CMFCApplication1Dlg::OnBnClickedOk()
{
for (int i = 0; i < 100; ++i)
{
for (int j = 0; j < 100; ++j)
{
CButton* pButton3 = new CButton;
pButton[i][j] = pButton3;
}
}
CRect rect;
GetClientRect(&rect);
rect.top += 10;
rect.bottom = rect.top + 20;
rect.left += 10;
rect.right = rect.left + 20;
for (int i = 0; i < 20; ++i)
{
rect.left += +20;
rect.right = rect.left + 20;
rect.top = 0;
for (int j = 0; j < 20; ++j)
{
rect.top += 20;
rect.bottom = rect.top + 20;
bool ret = pButton[i][j]->Create(_T(""), WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, rect, this, 1993 + i * 100 + j);
ret = false;
}
}
}
