GIDForums  

Go Back   GIDForums > Computer Programming Forums > MS Visual C++ / MFC Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 27-Mar-2009, 10:44
graffy76 graffy76 is offline
New Member
 
Join Date: Mar 2009
Posts: 1
graffy76 is on a distinguished road

Child Windows in CSplitterFrame


Hello,

I'm using VC++6 to write an OpenGL MFC app. The app has two views: One view to render the OpenGL animations, the other to provide textual feedback (corrdinates, frame rate, etc.).

I want to render the feedback information using OpenGL's 2Dtext (instead of GDI) in a separate OpenGL rendering context. I could do my animation and my feedback both in the same context, but it's not what I'd prefer. Unfortunately, you can only have one rendering context per window. That means I need a second window.

I was browsing VC++ 6's code examples and came across the ViewerEx example which shows how to implement two view classes in a static splitter frame window. I tried it and can render my OpenGL code in one of the frames easily enough, but because the splitter frame window is simply one window accommodating two views, I am still limited to only one rendering context. So, my feedback view loses it's DC because the animation view steals it when the splitter frame window is created.

I see in the documentation that the Splitter frame window can use CWnd objects (creating one child window per splitter pane) instead of CView objects. If I could do that, I could create two windows, each with a separate DC and separate OGL rendering context.

This would solve the problem. However, I'm not sure how to make the CWnd object work as a pane in a splitter frame (the documentation was a bit vague). Also, is it possible to create a document "subtemplate" to link my existing view classes to the new splitter pane child windows? That way, I can still use my view class implementation for managing my OpenGL rendering instead of trying to do it using a CWnd object...

Of course, any code examples would be appreciated.

Thanks.
 
 

Recent GIDBlogProblems with the Navy (Enlisted) by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How To Remove Linux And Install Windows? rockaway Computer Software Forum - Windows 3 06-Mar-2008 21:00
problem with spawnl() and system() balajiramani C Programming Language 3 25-Jan-2007 07:49
child windows? bass FLTK Forum 1 26-Oct-2005 18:04
apache php no longer working (MX??) XP?? ChicoMendez Apache Web Server Forum 5 30-Aug-2004 10:51

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 01:38.


vBulletin, Copyright © 2000 - 2010, Jelsoft Enterprises Ltd.