<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : Problem In SDI Splitter(&#070;ormView&amp;TabView)</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : Problem In SDI Splitter(&#070;ormView&amp;TabView)]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Mon, 20 Apr 2026 22:32:35 +0000</pubDate>
  <lastBuildDate>Sun, 20 Mar 2005 22:54:34 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=1995</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[Problem In SDI Splitter(&#070;ormView&amp;TabView) : In SDI, spiltter into two parts,...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1995&amp;PID=5828&amp;title=problem-in-sdi-splitterformviewtabview#5828</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1059">zeronow</a><br /><strong>Subject:</strong> 1995<br /><strong>Posted:</strong> 20 March 2005 at 10:54pm<br /><br /><P>In SDI, spiltter into two parts, top is a formview and bottom is a framewnd, the framewnd only has a tabview,<BR>I want to dynacially create a htmlview in the tabview, but can not show anything, below is the code,<BR>Who can help me.</P><P><BR>BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT /*lpcs*/,<BR>&nbsp;CCreateContext* pContext)<BR>{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SIZE size1; <BR>&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CRect rect;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GetClientRect(&amp;rect); </P><P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; size1.cx = rect.right/2 ;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; size1.cy = rect.bottom/2;</P><P>&nbsp; m_wndSplit.CreateStatic(this, 2,1,WS_CHILD|WS_VISIBLE|WS_CLIPCHILDREN|WS_CLIPSIBLINGS, AFX_IDW_PANE_FIRST );<BR>&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp; m_wndSplit.CreateView(0,0,RUNTIME_CLASS(CMyFormView), size1,<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  pContext);</P><P>&nbsp;&nbsp;&nbsp;&nbsp; // Create the view using a CFrameWnd derived class.<BR>&nbsp;&nbsp;&nbsp;&nbsp; m_wndSplit.CreateView(1,0,RUNTIME_CLASS(CMyFrameWndBar), size1, <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  pContext);<BR>&nbsp;</P><P>&nbsp;&nbsp;&nbsp; m_wndSplit.RecalcLayout();<BR>&nbsp;&nbsp;&nbsp; RecalcLayout();<BR>&nbsp;&nbsp;&nbsp;&nbsp; return TRUE;<BR>}</P><P>//CMyFrameWndBar : public CXTFrameWnd<BR>BOOL CMyFrameWndBar::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext) <BR>{</P><P>&nbsp;&nbsp;&nbsp; pContext-&gt;m_pNewViewClass = RUNTIME_CLASS(CMyTabView);<BR>&nbsp;&nbsp;&nbsp;&nbsp; m_MyTabView = (CMyTabView *) CreateView(pContext, AFX_IDW_PANE_FIRST);</P><P>&nbsp;&nbsp;&nbsp;&nbsp; if (m_MyTabView == NULL)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return FALSE;</P><P>&nbsp;&nbsp;&nbsp;&nbsp; return CXTFrameWnd::OnCreateClient(lpcs, pContext);<BR>}</P><P>//class CMyTabView : public CXTTabView<BR>int CMyTabView::OnCreate(LPCREATESTRUCT lpCreateStruct) <BR>{<BR>&nbsp;if (CXTTabView::OnCreate(lpCreateStruct) == -1)<BR>&nbsp;&nbsp;return -1;<BR>&nbsp;/* //if add below code, if i add Navigate when active, error happen.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CRuntimeClass *pNewViewClass1 = RUNTIME_CLASS(CMyWebView); <BR>&nbsp;CRuntimeClass *pNewViewClass2 = RUNTIME_CLASS(CMyWebView); <BR>&nbsp;AddView("Wicked Code",pNewViewClass1,NULL,NULL,-1,-1);<BR>&nbsp;AddView("Creating Sophisticated Tabbed",pNewViewClass2,NULL,NULL,-1,-1);<BR>&nbsp;GetTabCtrl().SetMinTabWidth(64);<BR>&nbsp;GetTabCtrl().ModifyStyleEx(WS_EX_CLIENTEDGE,0,0);<BR>&nbsp;SetActiveView(1);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; */ <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //</P><P>&nbsp;return 1; //0<BR>}</P><P><BR>class CMyWebView : public CHtmlView</P><P>//I want to dynacially create a htmlview in the tabview, but can not show.<BR>void CMainFrame::OnDynNewHtmlView() <BR>{<BR>&nbsp;// TODO: Add your command handler code here</P><P>&nbsp;CCreateContext createContext;</P><P>&nbsp;pNewViewClass3 = RUNTIME_CLASS(CMyWebView); <BR>&nbsp;// <BR>&nbsp;createContext.m_pNewViewClass = pNewViewClass3;<BR>&nbsp;createContext.m_pCurrentDoc = NULL;<BR>&nbsp;//createContext.m_pCurrentDoc = MyFrameWndBar-&gt;GetActiveDocument();</P><P>&nbsp;createContext.m_pNewDocTemplate = NULL;<BR>&nbsp;//<BR>//&nbsp;CMyWebView* pNewView =  MyFrameWndBar-&gt;m_MyTabView-&gt;CreateTabView(pNewViewClas s3, NULL, &amp;createContext);<BR>&nbsp; int  nReturn=(MyFrameWndBar-&gt;m_MyTabView)-&gt;AddView("test",p NewViewClass3,NULL,&amp;createContext,-1,-1); <BR>&nbsp; (MyFrameWndBar-&gt;m_MyTabView)-&gt;SetActiveView(2);<BR>&nbsp; //&nbsp;m_wndSplit.RecalcLayout();<BR>&nbsp;&nbsp; // RecalcLayout();<BR>&nbsp;m_listViews.AddTail((CView*)pNewViewClass3);<BR>}</P>]]>
   </description>
   <pubDate>Sun, 20 Mar 2005 22:54:34 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1995&amp;PID=5828&amp;title=problem-in-sdi-splitterformviewtabview#5828</guid>
  </item> 
 </channel>
</rss>