<?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 : CXTDockWindow and views</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : CXTDockWindow and views]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sun, 19 Apr 2026 17:49:06 +0000</pubDate>
  <lastBuildDate>Mon, 16 Feb 2004 11:42:59 +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=442</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[CXTDockWindow and views : Hi! I have an SDI app and have...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=442&amp;PID=1044&amp;title=cxtdockwindow-and-views#1044</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=245">ddyer</a><br /><strong>Subject:</strong> 442<br /><strong>Posted:</strong> 16 February 2004 at 11:42am<br /><br /><P>Hi!&nbsp; I have an SDI app and have views in panes.&nbsp; They work whether you open or close the views, etc.&nbsp;&nbsp; I stole this trick from Oleg.&nbsp; Below is a function to place in your mainfrm.cpp that creates a panel window based on a particular view.&nbsp; The view is then created and attached to your document.&nbsp; It will receive all your doc update&nbsp;messages and whatnot:</P><P>&nbsp;</P><FONT face="Courier New, Courier, mono"><P><FONT face="Courier New, Courier, mono" size=1>FrameWnd* CMainFrame::CreateView(CRuntimeClass *type)<BR></FONT><FONT face="Courier New, Courier, mono" size=1>{<BR></FONT><FONT size=1><FONT face="Courier New, Courier, mono">CFrameWnd *pFrame = </FONT><FONT face="Courier New, Courier, mono" color=#0000ff>new</FONT><FONT face="Courier New, Courier, mono"> CFrameWnd;<BR></FONT></FONT><FONT face="Courier New, Courier, mono" size=1>CCreateContext context;<BR></FONT><FONT size=1><FONT face="Courier New, Courier, mono">::ZeroMemory(&amp;context, </FONT><FONT face="Courier New, Courier, mono" color=#0000ff>sizeof</FONT><FONT face="Courier New, Courier, mono">(context));</FONT></FONT></P><P><FONT face="Courier New, Courier, mono" size=1>context.m_pNewViewClass = type;<BR></FONT><FONT face="Courier New, Courier, mono" size=1>context.m_pCurrentDoc = NULL;<BR></FONT><FONT face="Courier New, Courier, mono" size=1>context.m_pCurrentFrame = GetParentFrame();</FONT></P><P><FONT face="Courier New, Courier, mono" size=1></FONT></P><P><FONT face="Courier New, Courier, mono" size=1>CDocManager *pManager = AfxGetApp()-&gt;m_pDocManager;<BR></FONT><FONT size=1><FONT face="Courier New, Courier, mono" color=#0000ff>if</FONT><FONT face="Courier New, Courier, mono"> (pManager != NULL) {<BR></FONT></FONT><FONT face="Courier New, Courier, mono" size=1>&nbsp;&nbsp;&nbsp;&nbsp; POSITION posTemplate = pManager-&gt;GetFirstDocTemplatePosition();<BR></FONT><FONT size=1><FONT face="Courier New, Courier, mono" color=#0000ff>&nbsp;&nbsp;&nbsp;&nbsp; if</FONT><FONT face="Courier New, Courier, mono"> (posTemplate != NULL) {<BR></FONT></FONT><FONT face="Courier New, Courier, mono" size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CDocTemplate *pTemplate = pManager-&gt;GetNextDocTemplate(posTemplate);<BR></FONT><FONT face="Courier New, Courier, mono" size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; POSITION posDoc = pTemplate-&gt;GetFirstDocPosition();<BR></FONT><FONT size=1><FONT face="Courier New, Courier, mono" color=#0000ff>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if</FONT><FONT face="Courier New, Courier, mono"> (posDoc != NULL) {<BR></FONT></FONT><FONT face="Courier New, Courier, mono" size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CccAnalyzeDoc *mydoc = (CccAnalyzeDoc *)pTemplate-&gt;GetNextDoc(posDoc);<BR></FONT><FONT face="Courier New, Courier, mono" size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; context.m_pCurrentDoc = mydoc;<BR></FONT><FONT size=1><FONT face="Courier New, Courier, mono" color=#0000ff>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if</FONT><FONT face="Courier New, Courier, mono"> (m_doc == NULL)<BR></FONT></FONT><FONT face="Courier New, Courier, mono" size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; m_doc = mydoc;<BR></FONT><FONT face="Courier New, Courier, mono" size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR></FONT><FONT face="Courier New, Courier, mono" size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR></FONT><FONT face="Courier New, Courier, mono" size=1>}<BR><BR></FONT><FONT size=1><FONT face="Courier New, Courier, mono">pFrame-&gt;Create(NULL, NULL,<BR>&nbsp;&nbsp;&nbsp;&nbsp; WS_CHILD|WS_VISIBLE|WS_CLIPCHILDREN|WS_CLIPSIBLINGS, CRect(0, 0, 0, 0),<BR>&nbsp;&nbsp;&nbsp;&nbsp; </FONT><FONT face="Courier New, Courier, mono" color=#0000ff>this</FONT><FONT face="Courier New, Courier, mono">, NULL, 0, &amp;context);<BR></FONT></FONT><FONT face="Courier New, Courier, mono" size=1>pFrame-&gt;ModifyStyleEx(WS_EX_CLIENTEDGE, 0, SWP_FRAMECHANGED);<BR></FONT><FONT face="Courier New, Courier, mono" size=1> pFrame-&gt;GetWindow(GW_CHILD)-&gt;ModifyStyleEx(WS_EX_CLIEN TEDGE, 0,<BR>&nbsp;&nbsp;&nbsp;&nbsp; SWP_FRAMECHANGED);<BR><BR></FONT><FONT size=1><FONT face="Courier New, Courier, mono" color=#0000ff>return</FONT><FONT face="Courier New, Courier, mono"> pFrame;<BR></FONT></FONT><FONT face="Courier New, Courier, mono" size=1>}</FONT></P><P><FONT size=2></FONT>&nbsp;</P><P><FONT size=2>Then, to create a view in your "onDockingPaneNotify" routine, just do:</FONT></P><P><FONT face="Courier New, Courier, mono" size=1>switch (pPane-&gt;GetID()) {</FONT></P><P><FONT face="Courier New, Courier, mono" size=1>&nbsp;...</FONT></P><P><FONT face="Courier New, Courier, mono" size=1>&nbsp;&nbsp;&nbsp;&nbsp; case&nbsp;IDR_PANE_MYPANE:<BR></FONT><FONT face="Courier New, Courier, mono" size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pPane-&gt;Attach(CreateView(RUNTIME_CLASS(myViewClass)));<BR></FONT><FONT face="Courier New, Courier, mono" size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;&nbsp;</FONT></P><P><FONT face="Courier New, Courier, mono" size=1>&nbsp;...</FONT></P><P><FONT face="Courier New, Courier, mono" size=1>}</FONT></P><P><FONT size=2></FONT>&nbsp;</P></FONT><span style="font-size:10px"><br /><br />Edited by ddyer</span>]]>
   </description>
   <pubDate>Mon, 16 Feb 2004 11:42:59 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=442&amp;PID=1044&amp;title=cxtdockwindow-and-views#1044</guid>
  </item> 
  <item>
   <title><![CDATA[CXTDockWindow and views : Hi! I&amp;#039;m having trouble getting...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=442&amp;PID=1012&amp;title=cxtdockwindow-and-views#1012</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=367">bobo</a><br /><strong>Subject:</strong> 442<br /><strong>Posted:</strong> 13 February 2004 at 9:14am<br /><br /><P>Hi!</P><P>I'm having trouble getting my CXTDockWindow to work with a view in my SDI application. I'm using the method explained in KB 005.007 to create my frame and view. I'm sharing document between the main&nbsp;view and the view in my docking window. All messages gets routed correctly when the window is docked, but as soon as&nbsp;I "undock" the window it gets silent.</P><P>Any ideas?</P><P>- Bobo</P>]]>
   </description>
   <pubDate>Fri, 13 Feb 2004 09:14:32 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=442&amp;PID=1012&amp;title=cxtdockwindow-and-views#1012</guid>
  </item> 
 </channel>
</rss>