loading-obj-models-in-mfc - DevMaster.net Forums

Need your help guys, this is just a test program i am trying to do to see if i could load multiple obj models, i have been trying to figure out why this program would not work, it compiles okay...but when i run it the MFC dialog comes up and after i click okay the opengl window comes up and then disappears within a second..i posted the code because i have been trying to figure out why it does this , maybe another set of eyes could tell me what i have done wrong. void CsatelliteTest1Dlg::OnBnClickedOk() { // TODO: Add your control notification handler code here glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH); //set out options to RGB, double buffered and depth glutCreateWindow("Satellite Assembly"); //give the glut window a title // set glut callback functions glutDisplayFunc(display); //set our display callback glutReshapeFunc(resize); //set out resize callback glutKeyboardFunc(keyboard); //set out keyboard callback this ->ShowWindow(SW_HIDE); // hide the mfc starter when the glut window opens glMatrixMode(GL_PROJECTION); gluPerspective( /* field of view in degree */ 22.0, /* aspect ratio */ 640.0 / 480.0, /* Z near */ 1.0, /* Z far */ 1000.0); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glutMainLoop(); //start the glut main loop } MainClass gl; void CsatelliteTest1Dlg::resize( int w, int h) { gl.resize(w, h); } void CsatelliteTest1Dlg::display( void ) { gl.display(); MainClass::loadmodels(); } void CsatelliteTest1Dlg::keyboard( unsigned char key, int x, int y) { gl.keyboard(key,x,y); } int screen_width=640; int screen_height=480; #define ESCAPE 27 #define NUM_MODELS 6 #define NBOD 18 //Model torsoModel; typedef float float3[3]; typedef float float4[4]; float3 locationlist[NBOD]; float4 orientationlist[NBOD]; GLMmodel* model[NUM_MODELS]; GLuint model_list[NUM_MODELS]; /* display list for object */ char * model_file[NUM_MODELS]; /* name of the obect file */ GLboolean facet_normal = GL_FALSE; /* draw with facet normal? */ GLfloat smoothing_angle = 90.0; /* smoothing angle */ GLfloat scale = 1.0; /* scaling factor */ GLdouble pan_x = 0.0; GLdouble pan_y = 0.0; GLdouble pan_z = 0.


Mfc Docking Framework - Bookshelf

VC++ MFC Extensions by Example

VC++ MFC Extensions by Example

For an example of this, please refer to my artical "Making MFC Docking Bars Cool " in the 5/99 issue of WDJ (Windows Developer's Journal) availble at web ...

Understanding C++ for MFC

Understanding C++ for MFC

The behavior of a toolbar is now handled by the framework. For example, the user can slide the toolbar or dock it on other sides of the window. ...

Windows developer's journal

Windows developer's journal

Making MFC Docking Bars Cool ... This article will show that you can make your existing docking bars look just as cool with surprisingly little effort and ...

Windows forms programming in C#

Windows forms programming in C#

All this is available in the design environment so that you can see what the docking and splitting will look like at design time. MFC, on the other hand, ...

InfoWorld

InfoWorld

The Microsoft Foundation Classes (MFC), Visual C++'s application framework, also drops VBX support, but includes extensive support for OCXes. ...

Day-by-day Report Directory


MFC Docking Framework - CodeProject
An easy to use MFC Docking framework and more... It also shows an applicable method to mix up WTL and MFC.; Author: Quynh Nguyen; Section: Toolbars ...

Microsoft Foundation Class Library - Wikipedia, the free ...
MFC 7, 8 and 9 bridge elements of MFC with the .NET Framework to aid developers ... has de-emphasized MFC, it remains a popular and widely used framework. ...

Docking Pane Splitter Tracker
Codejock Professional Software Solutions, Feature-Rich Components and GUI Frameworks for Visual C++ MFC and ActiveX COM

DataMekanix - Docking Windows Made Easy
Home of CSizingControlBar - a MFC library of resizable control bars. Free source code for creating docking windows, samples, programming manual, FAQ, and more.

Views in a Sizeable Docking Control Bar (CSizingControlBar ...
A fairly simple way to incoporate views into sizing control bars; Author: Rob Finch; Section: Toolbars & Docking windows; Chapter: Desktop Development