HELP: GLAUX on MFC with MDI

dear friends,
please excuse me, i want to ask u, some of mhy problem.
Well, right now, i’ll try to build opengl app using MDI on MFC. When i try buil using gl and glu, it’s absolutely succeed.
But when i try to using glaux, i’ve got a problem.
When i create a new document, the object that i’ve already built and showed on the first document, suddenly gone, why ??
I’ve already use some setup coding from the other one

thank’s

Have you added the glaux.lib to the linker?
Do you have the glaux.h include file

#include <gl\gl.h>
#include <gl\glu.h>
#include <gl\glaux.h>

Also what version of MS VC++ are you using?

I think you problem is that glaux has OWN window message loop.

yap, i’ve already coould build a solid 3d object using glaux.
But when i’ll try to make a new document, the object that already exist on the first window couldn’t not appear on my new window.
I’ve already made some app using MDI on MFC with gl and glu, and it’s work, i could made some object and always appear whenever i make a new document.
But when i using glaux the problem when i make a new document was confusing me.
Is there any special treatment ??

It maybe your use of english but it is not clear what you mean…

  1. When you say new document, you mean a new program?
    I think maybe what your problem maybe is that you are not closing the old project file and creating a new one for your new program.

  2. It will help us to know who’s frame work you are using to build your program. I personaly have been using the frame work from nehe’s site.

  3. You could email me the source code of what you are trying to do, and I could look at it and tell you what is wrong.

  4. Is this your first time using C/C++? and Microsoft VC++?

Originally posted by andyazis:
yap, i’ve already coould build a solid 3d object using glaux.
But when i’ll try to make a new document, the object that already exist on the first window couldn’t not appear on my new window.
I’ve already made some app using MDI on MFC with gl and glu, and it’s work, i could made some object and always appear whenever i make a new document.
But when i using glaux the problem when i make a new document was confusing me.
Is there any special treatment ??

Try this:

  1. Open the file you use as your frame work.
  2. Create a new project file, with the name of the new program you want to create
  3. Select create an application.
  4. save as the frame work file with the same name as the project.
  5. add the renamed file to your new project.
  6. Do all of your new changes to the new file that you created.