<?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 : Questi&#111;n about DockPane, CView &amp; &#068;ocument</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : Questi&#111;n about DockPane, CView &amp; &#068;ocument]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Fri, 10 Apr 2026 17:34:23 +0000</pubDate>
  <lastBuildDate>Mon, 28 Nov 2005 22:03:56 +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=2496</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[Questi&#111;n about DockPane, CView &amp; &#068;ocument : This works fine. But if you open...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2496&amp;PID=9871&amp;title=question-about-dockpane-cview-document#9871</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1640">stranzl</a><br /><strong>Subject:</strong> 2496<br /><strong>Posted:</strong> 28 November 2005 at 10:03pm<br /><br /><P>This works fine.&nbsp; But if you open and close more than one document thus destroying and creating the pane with a new view/doc attached, the application crashes when you exit.&nbsp; What is the proper function call sequence for "unattaching" the view after call AttachView?&nbsp; I'm getting a crash in the DocumentTemplate class when my app closes.</P>]]>
   </description>
   <pubDate>Mon, 28 Nov 2005 22:03:56 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2496&amp;PID=9871&amp;title=question-about-dockpane-cview-document#9871</guid>
  </item> 
  <item>
   <title><![CDATA[Questi&#111;n about DockPane, CView &amp; &#068;ocument : Thank you, thoughI&amp;#039;ve implemented...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2496&amp;PID=7589&amp;title=question-about-dockpane-cview-document#7589</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1290">freesong</a><br /><strong>Subject:</strong> 2496<br /><strong>Posted:</strong> 08 July 2005 at 10:39am<br /><br /><P><FONT size=3>Thank you, though&nbsp;I've implemented this days before.</FONT></P><P><FONT size=3>I don't know if your method could attach newly created view to the viewlist of the document.</FONT></P><P><FONT size=3><IMG src="http://forum.codejock.com/smileys/smiley1.gif" border="0">I use app_ptr to get existed doc_ptr, and existed view_ptr, so I can construct a context, by this way I succeed in completing one doc- severay view structure.</FONT></P><P><FONT size=3><IMG src="http://forum.codejock.com/smileys/smiley18.gif" border="0"></FONT></P><P>&nbsp;</P><span style="font-size:10px"><br /><br />Edited by freesong</span>]]>
   </description>
   <pubDate>Fri, 08 Jul 2005 10:39:20 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2496&amp;PID=7589&amp;title=question-about-dockpane-cview-document#7589</guid>
  </item> 
  <item>
   <title><![CDATA[Questi&#111;n about DockPane, CView &amp; &#068;ocument : Hi, Ok, just a simple example: in...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2496&amp;PID=7548&amp;title=question-about-dockpane-cview-document#7548</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=976">pascal</a><br /><strong>Subject:</strong> 2496<br /><strong>Posted:</strong> 07 July 2005 at 3:18pm<br /><br /><P>Hi,</P><P>Ok, just a simple example:</P><P>in your Applic.h:<BR><strong><FONT color=#0000ff size=1>CMultiDocTemplate* m_pTemplate;</FONT></strong></P><P>in your Applic.cpp:</P><FONT size=2><P></FONT><strong><FONT color=#0000ff size=1>m_pTemplate = new CMultiDocTemplate(IDR_MAINFRAME,<BR>RUNTIME_CLASS(CYourDocument),<BR>RUNTIME_CLASS(CYourFrame),<BR>RUNTIME_CLASS(CYourView));<BR><BR>AddDocTemplate(m_pTemplate);</FONT><FONT size=2></P></FONT></strong><P>What happened? you have created a document template, which will help you to create some views (CYourView) inside some frame windows (CYourframe) which are linked to a document (CYourDocument)</P><P>Now we will create programatically a new view attached to the document. We have saved the templates's pointer to use it anywhere in the application class.<BR>First, we create a document:<BR><FONT color=#0000ff><FONT size=1><strong>CDocument* pDocument = m_pTemplate-&gt;CreateNewDocument();<BR>ASSERT_VALID(pDocument);<BR></strong></FONT></FONT><FONT color=#0000ff><FONT size=1><strong><BR></strong></FONT><FONT size=2><FONT color=#000000>then, we create the frame and give it the document because the frame will create the view in the method OnCreateClient(...):</FONT><BR></FONT><FONT size=1><strong>CFrameWnd *pFrameWnd = m_pTemplate-&gt;CreateNewFrame( pDocument, NULL );<BR></strong></FONT><FONT size=1><strong>ASSERT_VALID(pFrameWnd);</strong></FONT></P></FONT><P><FONT color=#0000ff><FONT size=1><FONT color=#000000 size=2>And a least, we call the InitialUpdate frame.</FONT><BR><strong>m_pTemplate-&gt;InitialUpdateFrame( pFrameWnd, pDocument );</strong></FONT></P></FONT><FONT size=2><P>You have now a new MDI window. If you want to create a view inside a docking pane, that is very easy <IMG src="http://forum.codejock.com/smileys/smiley36.gif" border="0">&nbsp;and you will find in this site a lot of example. A simple example now (from the MainFrm.cpp):</P><FONT size=2><P><FONT color=#0000ff size=1><strong>CXTPDockingPane* pwndPane = m_paneManager.CreatePane(<BR>IDR_PANE_SETTINGS, // Pane ID<BR>rcLeftPane, // Bounding rectangle<BR>xtpPaneDockLeft);</strong></FONT></P><P><FONT color=#0000ff size=1><strong>ASSERT(pwndPane);</strong></FONT></P></FONT><FONT size=2><P></FONT><FONT size=1><FONT color=#0000ff><strong>pwndPane</strong></FONT><FONT color=#0000ff> -&gt;<strong>AttachView( this, RUNTIME_CLASS(CYourView), m_pDocument, NULL);</strong></FONT></FONT></P><P><strong><FONT color=#0000ff size=1>//m_pDocument can be created from a template class</FONT></strong></P><P>Now you have a docking pane with a view attached to a document. If you need to use your own frame (and not a CFrameWnd), have a look at the method "AttachView".</P><P>&nbsp;</P><P>I Hope I helped you</P><P>regards</P></FONT><P><FONT size=2></FONT>&nbsp;</P>]]>
   </description>
   <pubDate>Thu, 07 Jul 2005 15:18:25 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2496&amp;PID=7548&amp;title=question-about-dockpane-cview-document#7548</guid>
  </item> 
  <item>
   <title><![CDATA[Questi&#111;n about DockPane, CView &amp; &#068;ocument : Hi, Does anyonehas ideas, don&amp;#039;t...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2496&amp;PID=7410&amp;title=question-about-dockpane-cview-document#7410</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1290">freesong</a><br /><strong>Subject:</strong> 2496<br /><strong>Posted:</strong> 02 July 2005 at 10:36am<br /><br /><P>Hi, Does anyone&nbsp;has ideas, don't hesitate, just reply it.</P><P>I'm wondering how the virtual function of <strong><FONT color=#ff0000>OnCreateClient</FONT></strong> can pass the <FONT color=#0000ff><strong>CCreateContext</strong> </FONT>object correctly.</P><P>How to construct it, wow, I'm bothering with it.</P>]]>
   </description>
   <pubDate>Sat, 02 Jul 2005 10:36:16 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2496&amp;PID=7410&amp;title=question-about-dockpane-cview-document#7410</guid>
  </item> 
  <item>
   <title><![CDATA[Questi&#111;n about DockPane, CView &amp; &#068;ocument : I&amp;#039;d like to create two DocPanesatthe...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2496&amp;PID=7409&amp;title=question-about-dockpane-cview-document#7409</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1290">freesong</a><br /><strong>Subject:</strong> 2496<br /><strong>Posted:</strong> 02 July 2005 at 5:44am<br /><br /><P><FONT size=3>I'd like to create two DocPanes&nbsp;at&nbsp;the begin of&nbsp;program&nbsp;starting up, and I&nbsp;intend to&nbsp;add the imbeded views to the doc's view list,&nbsp; thus I can manage&nbsp;all views more easily,&nbsp;but error was occured for the doc obj. itself was&nbsp;not initialized.</FONT></P><P><FONT size=3>who know how the MFC framework could concord the doctemplate, doc, MainFrame, and views, why I cannot associate my newly created views with the Doc?&nbsp;&nbsp;</FONT></P><P><FONT size=3>I tried to use <FONT color=#000066><strong>CCreateContext</strong></FONT>, but at the time, I can use this-&gt;GetActiveDocument(), or use this-&gt;GetActiveView()-&gt;GetDocument() in MainFrame to obtain the right Doc ptr.</FONT></P><P><FONT size=3>I'm Waiting for the correct methods.</FONT></P><P><FONT color=#ff0000 size=3><strong>Best Regards</strong></FONT></P><P>&nbsp;</P><span style="font-size:10px"><br /><br />Edited by freesong</span>]]>
   </description>
   <pubDate>Sat, 02 Jul 2005 05:44:08 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2496&amp;PID=7409&amp;title=question-about-dockpane-cview-document#7409</guid>
  </item> 
 </channel>
</rss>