|
-
December 14th, 2006, 04:52 AM
#1
Creating array of buttons in Visual C++
Dear All
I have code in C# program:
int myHeight=30;
int myWidth=90;
Button[,] ba = new Button[2, 2];
for (int i=0; i<2;i++)
for (int j = 0; j < 2; j++)
{
ba[i, j] = new System.Windows.Forms.Button();
ba[i, j].Height = myHeight;
ba[i, j].Width = myWidth;
ba[i, j].Location = new Point( i * myWidth,j * myHeight);
ba[i, j].Text = i.ToString() + j.ToString();
panel1.Controls.Add(ba[i, j]);
}
How write it in VC++?
My problem is
Button[,] ba = new Button[2, 2];
I do not know how write it in VC++
thank you
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|