• Advertisement

Archived

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

Setting up gl in a pic box

This topic is 5098 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

I just finished writing a wrapper for gl in an mdi environment. It can also render to the background of a dialog box. I want to try to get it to render to a picture box in a dialog box but the dc i get from the pic box seems incompatible with gl - it seems that the pixelformat could not be set. Anyone know how i could get it to render or am i using the wrong control? tia

Share this post


Link to post
Share on other sites
Advertisement
I know what you are talking about.

I did it along time ago.

If i remember correctly, i got some example source for exactly that from PlanetSourceCode.com under the C++ section. I think i just typed in OpenGL and it was there!

Also, on that example, i belive he used a text box to put the opengl window on, with it disabled so you couldnt type. All i know was it worked so there might be a reason he used a text box, there might not.

If you cant find it, another thing you could do is just create the regular OpenGL window and make it a child of the dialog box. Then just use SetWindowPos() and it will be as if it is really included in the dialog box. That is how i have done some things before and it looks really nice. But i guess your first idea would be easier, so check it out!

Good Luck

"What we do in life, echos in eternity" -- Gladiator

Share this post


Link to post
Share on other sites

  • Advertisement