<?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 : GetParent fails after move from Pane to CChildFram</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Docking Pane : GetParent fails after move from Pane to CChildFram]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 13 May 2026 10:01:27 +0000</pubDate>
  <lastBuildDate>Thu, 30 Nov 2006 01:54:48 +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=5641</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[GetParent fails after move from Pane to CChildFram : Hi,  grab code from  Sampl...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=5641&amp;PID=17792&amp;title=getparent-fails-after-move-from-pane-to-cchildfram#17792</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 5641<br /><strong>Posted:</strong> 30 November 2006 at 1:54am<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>grab code from</DIV><DIV>&nbsp;</DIV><DIV>Samples\ToolkitPro\MDITabWindow\MainFrm.cpp </DIV>]]>
   </description>
   <pubDate>Thu, 30 Nov 2006 01:54:48 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=5641&amp;PID=17792&amp;title=getparent-fails-after-move-from-pane-to-cchildfram#17792</guid>
  </item> 
  <item>
   <title><![CDATA[GetParent fails after move from Pane to CChildFram : I&amp;#039;m having trouble moving...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=5641&amp;PID=17771&amp;title=getparent-fails-after-move-from-pane-to-cchildfram#17771</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2461">ContactGT</a><br /><strong>Subject:</strong> 5641<br /><strong>Posted:</strong> 29 November 2006 at 12:00pm<br /><br /><DIV><FONT face=Arial size=2><SPAN =458255116-29112006>I'm having trouble moving views between Docking panes and childframes. I have the following code that moves the active view between a Pane and a CChildFrame.</SPAN></FONT></DIV><DIV><FONT face=Arial size=2><SPAN =458255116-29112006></SPAN></FONT>&nbsp;</DIV><DIV><FONT face=Arial size=2><SPAN =458255116-29112006></SPAN></FONT>&nbsp;</DIV><DIV><FONT face=Arial size=2><SPAN =458255116-29112006>CView *activeView = (CView*) GetFocus();</SPAN></FONT></DIV><DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV><DIV><FONT face=Arial size=2>&nbsp;if (pane-&gt;IsClosed() &amp;&amp; !pane-&gt;IsFloating())<BR>&nbsp;{<BR>&nbsp;&nbsp;// View is in childframe as pane is not visible (closed and not floating)<BR>&nbsp;&nbsp;pane-&gt;Attach(activeView);<BR>&nbsp;&nbsp;m_paneManager.ShowPane(pane);</FONT></DIV><DIV>&nbsp;</DIV><DIV><FONT face=Arial size=2>&nbsp;&nbsp;CChildFrame *activeChild = (CChildFrame*) GetActiveFrame();<BR>&nbsp;&nbsp;activeChild-&gt;SendMessage(WM_CLOSE);</FONT></DIV><DIV>&nbsp;</DIV><DIV><FONT face=Arial size=2>&nbsp;&nbsp;pane-&gt;SetFocus();<BR>&nbsp;&nbsp;*bInFrame = false;<BR>&nbsp;}<BR>&nbsp;else<BR>&nbsp;{<BR>&nbsp;&nbsp;// Pane is visible, so move to a child window<BR>&nbsp;&nbsp;CChildFrame *child = createCircaView(activeView-&gt;GetRuntimeClass());</FONT></DIV><DIV>&nbsp;</DIV><DIV><FONT face=Arial size=2>&nbsp;&nbsp;// Move the view onto the new childframe and move the new (unrequired) view<BR>&nbsp;&nbsp;// into the pane that is going to be destroyed.<BR>&nbsp;&nbsp;activeView-&gt;SetParent(child);<BR>&nbsp;&nbsp;child-&gt;SetActiveView(activeView);</FONT></DIV><DIV>&nbsp;</DIV><DIV><FONT face=Arial size=2>&nbsp;&nbsp;// Now activate and update the childframe<BR>&nbsp;&nbsp;m_MTIClientWnd.Refresh();</FONT></DIV><DIV>&nbsp;</DIV><DIV><FONT face=Arial size=2>&nbsp;&nbsp;// Close the relevant pane<BR>&nbsp;&nbsp;m_paneManager.ClosePane(pane);<BR>&nbsp;&nbsp;*bInFrame = true;<BR>&nbsp;}</FONT></DIV><DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV><DIV><FONT face=Arial><FONT size=2>This code<SPAN =458255116-29112006> seems to</SPAN>&nbsp;work<SPAN =458255116-29112006> in so much as it moves the view correctly between a pane and a CChildFrame</SPAN>, but the problem is later in my code, if the view is in a CChildFrame, then when I ask the view for -&gt;GetParent(), I expect to get a pointer to a CChildFrame, but instead, I get a pointer to CXTPDockingPaneManager.&nbsp;<SPAN =458255116-29112006>If I ask for -&gt;GetParentFrame()<SPAN =458255116-29112006>, I get the CMainFrame!. </SPAN></SPAN>How do I&nbsp;<SPAN =458255116-29112006>get the CChildFrame parent of my View? Perhaps it is not getting set </SPAN><SPAN =458255116-29112006>using the SetParent() call above?</SPAN></FONT></FONT></DIV>]]>
   </description>
   <pubDate>Wed, 29 Nov 2006 12:00:42 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=5641&amp;PID=17771&amp;title=getparent-fails-after-move-from-pane-to-cchildfram#17771</guid>
  </item> 
 </channel>
</rss>