Jump to content
  • Advertisement
Sign in to follow this  
Basiror

Modal dialog with openglview

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

hi i am trying to implement a modal dialog that has a COpenGlView which is derived from CView may problem is i need a OpenglView in a popup window to choose textures from *working on a editor* and i can t get it to work with a model dialog i have been searching google for a while now, no luck :( is there are way to implement a CView in a modal dialog? or should i create a view without a parent and if so how could i accomplish this? do you have some tutorials about this? msdn wasn t very helpful on this topic:( id really appreciate any help you could give me

Share this post


Link to post
Share on other sites
Advertisement
In the InitInstance() function in CWinApp derived class theres a function called CSingleDocTemplate(...) associates Doc and View to a Window (the resource ID). Have a look at this, personally I'd say its the way to go.

Share this post


Link to post
Share on other sites
The CSingleDocTemplate class is sent to AddDocTemplate, and only groups a CView, a CDocument and a CFrameWnd. It's so that MFC can create a document and a view on it's own, and put the view in the CFrameWnd.

I'd look into overriding the OnInitDialog() message handler. It's called every time your dialog box is shown, and is probably the best place to create a view, if that's possible...

Share this post


Link to post
Share on other sites
hi insanity didn t see you for a long time


back to topic:

i think the CView approach as a really bad idea, creating a simple dialog with a static control and replacing this control with a openglcontrol should do the job i think thx anyways

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!