The MDI mfc version has the same problems last time I tried it. Try calling setUpViewerAsEmbeddedInWindow on your viewer. If you problems go away you're hitting threading issues.
2009/1/8 Brad Huber <br...@procerusuav.com>: > Umit, > > > > Thanks. The SDI application that I have created so far is very simple and > does nothing more than what the MDI example app does. As far as I can tell > there is no difference in the way the example creates/uses/deletes the cOSG > object and the way I am doing it, yet I get assertions or exceptions on > exit. > > > > Anyone else? > > > > Thanks > > -Brad > > > > From: osg-users-boun...@lists.openscenegraph.org > [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Ümit Uzun > Sent: Thursday, January 08, 2009 2:08 PM > To: OpenSceneGraph Users > Subject: Re: [osg-users] MFC SDI Example > > > > Hi Brad, > > I created SDI MFC project in OSG. But this was commercial and complicated to > understand you very well. Because it was SDI dll to call from anywhere you > need and you then delete it if you don't need to much. > > I haven't understood the assertion faults very well but you should only > understand the cOSG class creation style. You will use it in your SDI > project and be careful to delete everything while you are destroying your > dialog. And be careful about the threads sleeping time to be activeted. > Because sometimes sleeping times can't be enough to be threads get > activated, so it may create assertion fault as you say. > > Hope this helps. Regards. > > 2009/1/8 Brad Huber <br...@procerusuav.com> > > Hello all, > > > > Does anyone know where one might find an example project of using > MFC/OSG/SDI? > > > > If anyone has one sitting around on their machine I would be interested if > you can email it to me as well. > > > > I've already tried adapting the MFC MDI example to an SDI project but I seem > to be hitting some snags where the app won't exit properly. > > > > It either asserts the window as being still valid when it shouldn't be > [CWnd::WalkPreTranslateTree's ASSERT(hWndStop == NULL || > ::IsWindow(hWndStop))] or it get's "The activation context being deactivated > is not the most recently activated one" exception within osg53-osgGAd.dll > after I've deleted all osg items. > > > > I'm a little bit baffled why I'm getting this. > > > > Anyway does anyone have any SDI examples? > > > > Thanks > > -Brad > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > -- > Ümit Uzun > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > -- The truth is out there. Usually in header files. _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org