Archived

This topic is now archived and is closed to further replies.

Fullscreen to windowed

This topic is 4988 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

This may seem like an aparent question, but the answer I cannot find. Within the initial tutorials switching between fullscreen and windowed mode *F1* genterates an error. I think there is a problem killing the window. I have copied over create window and kill window from a working application but the problem still occurs. Has anyone found the reason for this problem and rectified it?

Share this post


Link to post
Share on other sites
quote:
the new window contains the desktop

The window background isn''t redrawn (normally the opengl view will be there), the last drawn image at that place is the new background (which is in yur case the desktop).
The problem is that the hDC and hRC are not set up correctly when you resize the window, check if you release the old hDC and hRC and check if you correctly set up the hDC and hRC (not any diffirent from the first time, when you open the app).

WWW.TREEPENGUIN.TK

Share this post


Link to post
Share on other sites
I copied over a working version of create window, where the hDC and hRC are created. Then I copied a working version of Kill window.. *both copied from the old lesson 6 oh NeHe*
but still the error is given. The error used to be in lesson two but its fixed now... how was it fixed?

Share this post


Link to post
Share on other sites
If you want to become a good programmer and learn lots.

DO NOT COPY AND PASTE!
You learn nothing by doing this.

Trust me I tried it once.
You learn more if you type up the code.

Or try and write it yourself.
Experiment all you can with the code also.
And try, to test it often to make sure you didn''t do something you shouldn''t have.

-BLades

Share this post


Link to post
Share on other sites
never mind... turns out a few others have had the same problem... not easily rectified.

I copied and pasted thinking if I used the exact code it would work properly. Plus it saved me time as I had a vast amount of other code to implement.

Share this post


Link to post
Share on other sites