Advertisement

newbie problem

Started by January 07, 2004 06:36 AM
1 comment, last by USB 21 years, 2 months ago
I am trying to get the NeHE base code to work in Borland Builder 6. I have downloaded the port from lesson one, compiled and built the project successfully. However when I run the application it crashes at this point in the code if (!(PixelFormat = ChoosePixelFormat(hDC,&pfd))) // Did windows find a matching pixel format? There is a couple of what look to be flashes of new windows, and I am dumped back to the IDE. In the code I placed a while(1); loop to see if I could stop the final exit for the application, but I do not seem to get to it. if (!(PixelFormat = ChoosePixelFormat(hDC,&pfd))) // Did windows find a matching pixel format? { while(1); // !! do not reach this !! KillGLWindow(); // Reset the display MessageBox(NULL,"Can''t find a suitable pixelformat.","ERROR",MB_OK|MB_ICONEXCLAMATION); return false; // Return false } In addition to trying this approach I have tried several different Borland Builder components, and all seem to have a similar problem... this includes the demo application .exe''s that accopanied the commponets. I would be very greatful for any suggestions on what I should try. cheers
if you are using the forms from cbuilder, everytime NeHe mentions the hdc, read "Form1->Handle" (or whatevr you named it). That way you can set up opengl to work with the window cbuilder created for you
Advertisement
I just tried the demo projects on a friends computer that has the same setup as me (win2000, BBC++). They worked fine with no problems.

I think that I or previously installed software has chaged/over written dll''s or lib''s and my stuff is just not working no matter what. Another possibility is that there is some hardware problem or setting error.

I think I will hold tight, as I am getting a new computer in 2 weeks, and will be reinstalling an OS and BBC++. Hopefully going back to default setups and having a newer computer will fix the problem.

I susspect I could work on this for 2 weeks and be no further ahead... get the new computer running and be on my way again.

thanks for your suggestion.


This topic is closed to new replies.

Advertisement