Iceman55555
Programmer
Here is what I’m trying to do…
I create an array like this
CButton squareArray[8][8];
I create buttons (CButtons) for my dialog and I would like to put those buttons into an array. When I create variables that are assosicated with the buttons (in this case, I made a variable called m_button1), they are lines that look like this...
DDX_Control(pDX, IDC_BUTTON1, m_button1);
When I try to assign the array position to the button, I get an error. Here is the line that causes an error
squareArray[1][1] = m_button1;
After trying something like this, I get this error
error C2582: 'CButton' : 'operator =' function is unavailable
I'm guessing you just can't do it, but can anyone give me some help or suggest anything else I might be able to do?
I was thinking about somehow assigning the array position to the button ID. I tried something like this for the hell of it...
DDX_Control(pDX, IDC_BUTTON1, squareArray[1][1]);
but that didn't work at all! If anyone can help I would surely appriciat it!!!
Thanks to whoever can help!
I create an array like this
CButton squareArray[8][8];
I create buttons (CButtons) for my dialog and I would like to put those buttons into an array. When I create variables that are assosicated with the buttons (in this case, I made a variable called m_button1), they are lines that look like this...
DDX_Control(pDX, IDC_BUTTON1, m_button1);
When I try to assign the array position to the button, I get an error. Here is the line that causes an error
squareArray[1][1] = m_button1;
After trying something like this, I get this error
error C2582: 'CButton' : 'operator =' function is unavailable
I'm guessing you just can't do it, but can anyone give me some help or suggest anything else I might be able to do?
I was thinking about somehow assigning the array position to the button ID. I tried something like this for the hell of it...
DDX_Control(pDX, IDC_BUTTON1, squareArray[1][1]);
but that didn't work at all! If anyone can help I would surely appriciat it!!!
Thanks to whoever can help!