|
There are a few compatability issues that may cause you a few headaches.
The user interface is poor and not suited to MFC development at all. It is a major shift from the old ClassWizard of VC6.
For my C++ code I'm sticking with VC6, it's not worth the upgrade for all the productivity headaches.
Michael
Logic, my dear Zoe, merely enables one to be wrong with authority. - The Doctor
|
|
|
|
|
as the above post says, the IDE is totally different from VC6. it's more like VB7. i hate it, frankly.
there are some incompatibility issues between MFC versions, too.
i'm staying with VC6
-c
Being just contaminates the void. --Robyn Hitchcock
|
|
|
|
|
Oh man VC.net SUCKS so much comparing to VC6, well, at least I for one would say that. The IDE is poor designed, class wizard is gone, you will have such a hard and burdensome time to remove tied mamber variables or message handlers from your project, and one more funny thing is that, the "const" keyword for class member functions is no longer available, what a bloody joke.
Of course you can fix those by typing all codes into *.h and *.cpp manually, but why should you?
If you wanna do C#, ASP.net and VB.net, you need to upgrade to .net, if all you do is C++, not only it's a waste of money, but you will absolutely regret.
|
|
|
|
|
i should print pdf's in the background (without actually showing them).. my problem is that the only way i could achieve to do this is through the acrobat reader activeX control.. but this works for me just on a dialog box.. and loading fails if i want to hide the activeX control..
does anybody of you know a solution for my problem ?
my com - knowledge is totally small.. so i don't know if this is possible.. using the methods of an activeX control without showing it..
thanks in advance,
bernhard
"I'm from the South Bronx, and I don't care what you say: those cows look dangerous." U.S. Secretary of State Colin Powell at George Bush's ranch in Texas
|
|
|
|
|
Just call moveWIndow on it so its off the edge of your dialog box. Its visible, but not...
Roger Allen
Sonork 100.10016
If I had a quote, it would be a very good one.
|
|
|
|
|
How to change the menubar background color ?
|
|
|
|
|
Dear all,
I have a dialog based application, now i want to add new parts to the application by insert a MDI project. It looks like that the MDI window should be appeared by click a button in a dialog based application.
How should i do? How to deal with the problem of the dialog based main application window and the Mainfrm window?
Thanks in advance!
chen
|
|
|
|
|
How can I change the caption of a CDialogBar ?
I tried "m_DialogBar->SetWindowText("blah blah"); " since a CDialogBar is derived from CWnd, but this doesn't seem to work.
strangely this does work when I dock the dialogbar and then make it floating again.
Anybody knows how come ? Or even better how tochange the caption ?
thx,
wouter
I used to have a life ... now I have a computer
|
|
|
|
|
(Just a guess) Try issuing m_DialogBar->RedrawWindow() after changing the caption.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hi all, got stuck on Direct3D again, already. I have created my translation, rotation, scale and concatenation matrices and would like to create a world, projection and view matrix so that I can render a triangle defined in 3d space to the screen. So far my world matrix is equivelant to the Identity matrix (1,0,0,0)(0,1,0,0)(0,0,1,0)(0,0,0,1). I have the following code for my projection and view matrix respectively:
void CDXMaths::Projection(float nearplane, float farplane, float fov)
{
cosine = (float)cos(fov*0.5);
sine = (float)sin(fov*0.5);
quat = sine / (1.0f - (nearplane / farplane));
m_Projection = Empty();
m_Projection(0,0) = cosine;
m_Projection(1,1) = cosine;
m_Projection(2,2) = quat;
m_Projection(2,3) = sine;
m_Projection(3,2) = -quat * nearplane;
}
void CDXMaths::View(D3DVECTOR from, D3DVECTOR lookat, D3DVECTOR worldup, float roll)
{
m_View = Identity();
D3DVECTOR updir, rightdir, viewdir;
viewdir = Normalize(lookat - from);
rightdir = CrossProduct(worldup, viewdir);
updir = CrossProduct(viewdir, rightdir);
rightdir = Normalize(rightdir);
updir = Normalize(worldup);
m_View(0,0) = rightdir.x;
m_View(0,1) = updir.x;
m_View(0,2) = viewdir.x;
m_View(1,0) = rightdir.y;
m_View(1,1) = updir.y;
m_View(1,2) = viewdir.y;
m_View(2,0) = rightdir.z;
m_View(2,1) = updir.z;
m_View(2,2) = viewdir.z;
m_View(3,0) = -DotProduct(rightdir, from);
m_View(3,1) = -DotProduct(updir, from);
m_View(3,2) = -DotProduct(viewdir, from);
if (roll != 0.0f)
{
m_View = Multiply(RotateZ(-roll), m_View);
}
}
For the Projection matrix I set the field of view to 60 degrees (converted to radians) with a near plane of 1.0f and a far plane of 1000.0f. For the view matrix I set the from vector to (0,0,0), the lookat vector to (0,0,1), the worldup vector to (0,1,0) and the roll to 0.
I then set the D3DDevices geometry pipeline to these world, projection and view matrices (in that order, with appropriate flags). The code I then use to render is:
m_pD3DDevice->SetRenderState(D3DRENDERSTATE_LIGHTING, false);
if (SUCCEEDED(m_pD3DDevice->BeginScene()))
{
D3DLVERTEX v[3];
v[0] = D3DLVERTEX(D3DVECTOR(0,2,10), D3DRGB(1,0,0), D3DRGB(1,0,0), 0, 0);
v[1] = D3DLVERTEX(D3DVECTOR(2,-2,10), D3DRGB(0,1,0), D3DRGB(1,0,0), 0, 0);
v[2] = D3DLVERTEX(D3DVECTOR(-2,-2,10), D3DRGB(0,0,1), D3DRGB(1,0,0), 0, 0);
m_pD3DDevice->DrawPrimitive(D3DPT_TRIANGLELIST, D3DFVF_LVERTEX, (LPVOID)v, 3, NULL);
}
return m_pD3DDevice->EndScene();
However, I just get a black screen. Any ideas on where I am going wrong would be much appreciated. The problem is probably in my matrices somewhere, so if you have any idea where I can get information on defining these matrices properly(except microsoft website etc. cause its crap). I'd appreciate any pointers on this topic,
Many Thanks,
Alan.
"When I left you I was but the learner, now I am the master" - Darth Vader
|
|
|
|
|
Hello,
Do you have any idea how to decode AOL's .art file format? Is there any documentation somewhere on the Internet someone could point it to me?
Thanks,
Hiu Sing Ngai
|
|
|
|
|
|
I'm looking for a graphic library for visual c++ V5.0.
The intention is to plot two-dimensional graphs in a single manner and on-line processing.
Thanks,
Eric Manuel Rosales Pena Alfaro
PhD student
Unversity of Essex
Wivenhoe Park
Colchester, CO4 3SQ
Essex, Uk
email: emrosa@essex.ac.uk
tel: +44-01206-87311
|
|
|
|
|
Hi Emrosa,
I don't know if it will do exactly what your after, but have you tried the Free Image library[^]?
Dylan Kenneally
London, UK
|
|
|
|
|
There are some charting controls at CP.
/ravi
Let's put "civil" back into "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
|
Hello. I know that a two-dimensional array can be handles as one-dimensional array by converting the indexes to a single one. Supose you have the following:
int *table;
table=new int table[3*3];
When referencig table[2][2] by a single index
index=(2*3+2);
then
table[index] can be recalled.
Now, I'm having a three-dimensional array and because is faster to handle dynamic arrays, I can define it as:
int table1;
table1=new int table[3*3*3];
but I got lost finding the index conversion formulae...
Eric Manuel Rosales Pena Alfaro
PhD student
Unversity of Essex
Wivenhoe Park
Colchester, CO4 3SQ
Essex, Uk
email: emrosa@essex.ac.uk
tel: +44-01206-87311
|
|
|
|
|
Your old formulae was xPos + (yPos x Height). I believe your new formulae would therefore be: (xPos + (yPos x Width)) + (zPos x (Height x Width)). This could probably be further reduced.
"When I left you I was but the learner, now I am the master" - Darth Vader
|
|
|
|
|
Thanks for your help....I tried that but it did not work...however, you gave an idea and I put myself to think deeply and I just found this:
Let be a multidimensional array MArray[max1stdim][max2nddim]...[maxnthdim], the indexes referencing certain location be i1,i2,...,in.
If MArray is declared as
int MArray[max1stdim*max2nddim*...*maxnthdim];
then the index referencing the location (i1,i2,...in-1,in) will be:
index=(i1*max2nddim*max3rddim*...*maxnthdim)+(i2*max3rddim*...*maxnthdim)+...+(in-1)*maxnthdim+in
Then for an array MArray[4][3][2] declared as MArray[3*3*3], the single index to reference (i,j,k)will be:
index=(i*4*3)+(j*2)+k
I have tried this and it works!
Thanks again.....
Eric Manuel Rosales Pena Alfaro
PhD student
Unversity of Essex
Wivenhoe Park
Colchester, CO4 3SQ
Essex, Uk
email: emrosa@essex.ac.uk
tel: +44-01206-87311
|
|
|
|
|
Can ask one question? how can you have "an array MArray[4][3][2] declared as MArray[3*3*3]"? If you are trying to access the 3*3*3 MArray at position [4][3][2] using a single index then that is impossible, because the rows and columns will be indexed from 0 through to 2 for each x,y and z column, so 4 and 3 are invalid index positions. If you were trying to access the last record in a 3*3*3 matrix, the single index value you require is 26 (0 to 8, 9 to 17, 18 to 26). Using my equation earlier, if you were trying to index the last position in the 3d array, so XPos = 2, YPos = 2 and ZPos = 2, you would get:
(2 + (2 * 3)) + (2 * 3 * 3)) = 26.
the index position you desire. Martin has implemented the coded version of the equation (but in the opposite direction to the way I wrote my equation) :
b[i*(d2*d3) + j*d3 + k] = x;
i = ZPos
j = YPos
k = XPos
d2 = Height
d3 = Width
*Please note I made a small error before when I wrote (yPos + Height), this is probably why you couldn't get it to work, it should have read (yPos + Width), which I have now changed it to. Without this correction the formula would only *work* if the 3d array was a cube. It should now work regardless of dimensions.
Alan.
"When I left you I was but the learner, now I am the master" - Darth Vader
|
|
|
|
|
Sorry for the mistake...the dimensions of the array MArray[4][3][2] declared as MAarray[4*3*2]...and trying to access element Marray(3,3,2)....
The rest of the formula is correct and your correction as well...
Thanks,
|
|
|
|
|
Try this:
int d1 = 3;
int d2 = 4;
int d3 = 5;
BYTE x = 0;
BYTE *b = new BYTE[d1*d2*d3];
for (int i = 0; i < d1; i++) {
for (int j = 0; j < d2; j++) {
for (int k = 0; k < d3; k++) {
b[i*(d2*d3) + j*d3 + k] = x;
x++;
}
}
}
I hope it does what you need.
|
|
|
|
|
Thanks for your help....I have tried that and it did work...therefore, making a generalization for this, I just found this:
Let be a multidimensional array MArray[max1stdim][max2nddim]...[maxnthdim], the indexes referencing certain location be i1,i2,...,in.
If MArray is declared as
int MArray[max1stdim*max2nddim*...*maxnthdim];
then the index referencing the location (i1,i2,...in-1,in) will be:
index=(i1*max2nddim*max3rddim*...*maxnthdim)+(i2*max3rddim*...*maxnthdim)+...+(in-1)*maxnthdim+in
Then for an array MArray[4][3][2] declared as MArray[3*3*3], the single index to reference (i,j,k)will be:
index=(i*4*3)+(j*2)+k
I have tried this and it works!
Thanks again.....
Eric Manuel Rosales Pena Alfaro
PhD student
Unversity of Essex
Wivenhoe Park
Colchester, CO4 3SQ
Essex, Uk
email: emrosa@essex.ac.uk
tel: +44-01206-87311
|
|
|
|
|
Would be nice if you will write article about it and compare performance between different types of allocations and accesseing that memory.
|
|
|
|
|
How will I do that? What allocation and accesing methods?. Where will I submit the article?...Would you like to help me?
Thanks,
Eric Manuel Rosales Pena Alfaro
PhD student
Unversity of Essex
Wivenhoe Park
Colchester, CO4 3SQ
Essex, Uk
email: emrosa@essex.ac.uk
tel: +44-01206-87311
|
|
|
|
|