Hi, I am using Visual Studio 2008 and I am writing an MFC Dialog Based Application.
I have two trobules - the program uses brushes to draw the lines throw the points from the CPoint table - but the density of points may be vary every time. So my idea was to start in class the table with 10 points and expand the table every 10 next points, the expanding code looks so:
if (which_move1 % 10 == 0) {
CPoint *temp;
temp = new CPoint[which_move1 + 10];
for (int i = 0; i < which_move1; i++) {
temp[i] = way1[i];
}
way1 = temp;
temp = new CPoint[which_move2 + 10];
for (int i = 0; i < which_move2; i++) {
temp[i] = way2[i];
}
way2 = temp;
}
else;
And I am getting the error C2440: '=' : cannot convert from 'CPoint *' to 'CPoint [10]'
The program uses first 4 point on OnPaint function, which works before OnInitDialog so I need to start with created table.
----------------------
The second problem is - in the program I have 2 dialogs with two seperate classes. First class defines object z, and the second y. First I am writing data to this CPoint table at first class, then opens the second dialog with question if user wants to save those points. How to get access to the object z from second class?