0
我有一个二维数组,包含一个矩阵的元素当我在VS2010中写入一个基于对话框的项目时,我想在编辑控件框中显示矩阵的内容,但我在里面添加了代码按钮控件 如下。VC++中的矩阵格式
void CtestCstrDlg::OnBnClickedButton1()
{
CString strTest(" "), strB,strC;
// TODO: Add your control notification handler code here
for(int i=0;i<4;i++)
{
for(int j=0;j<4;j++)
{
strB.Format(L"%d ", j);
strTest+=strB;
}
strTest+="\n";
}
m_edDisp.SetWindowTextW(strTest);
}
但我发现在运行时,如果我点击按钮,它只显示一行内容。 如何获得像方形
0 1 2 3
0 1 2 3
0 1 2 3
0 1 2 3
? 请帮我..
非常感谢Adams。它的工作........谢谢.... – user543265 2011-01-20 06:00:04