Print Page | Close Window

Problem of SplitterWnd

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=3307
Printed Date: 09 November 2025 at 1:00pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Problem of SplitterWnd
Posted By: qinzhw
Subject: Problem of SplitterWnd
Date Posted: 30 November 2005 at 2:57am

I want to create a extendable application UI like the TabbedView Sample. In which I can attach any window object to a tabcontrol,such as CView object,CHtmlView Object, CFormView object , FrameWnd Object etc. Let's pretend we don't know what exactly the object's class,we just know it's  CWnd-based, so if the object is FrameWnd-based, we should splitter it by a CSplitterWnd member. How to do that ? I mean how to add a splittered Frame to a tabcontrol? It seems hard.




Replies:
Posted By: qinzhw
Date Posted: 30 November 2005 at 3:54am

This problem has been resolved.

By default , a CView-based class generated by MFC has a protected constructor, 
when using CRuntimeClass::CreateObject() to creating an instance of such class, return value is null.  Just define the constructor as a public one CSplitterWnd::AddView will return OK.

 




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net