<?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 : Destroying a pane instead of closing</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Docking Pane : Destroying a pane instead of closing]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 13 May 2026 04:34:20 +0000</pubDate>
  <lastBuildDate>Thu, 06 Jan 2005 02:55:09 +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=1577</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[Destroying a pane instead of closing : It&amp;#039;s a matter of when you&amp;#039;re...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1577&amp;PID=4624&amp;title=destroying-a-pane-instead-of-closing#4624</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=903">Alex G.</a><br /><strong>Subject:</strong> 1577<br /><strong>Posted:</strong> 06 January 2005 at 2:55am<br /><br />It's a matter of when you're destroying the pane. Try it if you're processing 'XTPN_CLOSE_PANE' notification - it will fail.]]>
   </description>
   <pubDate>Thu, 06 Jan 2005 02:55:09 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1577&amp;PID=4624&amp;title=destroying-a-pane-instead-of-closing#4624</guid>
  </item> 
  <item>
   <title><![CDATA[Destroying a pane instead of closing : Thats kind of strange that you...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1577&amp;PID=4615&amp;title=destroying-a-pane-instead-of-closing#4615</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=15">spike</a><br /><strong>Subject:</strong> 1577<br /><strong>Posted:</strong> 05 January 2005 at 2:34pm<br /><br /><P>Thats kind of strange that you say the pointer is in use after the Close. This is my code which seems to work fine.</P><P>FOREACH_ARRAY( m_arrOptionalPaneID, i )<BR>&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;CXTPDockingPane *pPane = m_pPaneManager-&gt;FindPane( m_arrOptionalPaneID<EM> );<BR>&nbsp;&nbsp;&nbsp;m_pPaneManager-&gt;ClosePane( m_arrOptionalPaneID<EM> );</P><P>&nbsp;&nbsp;&nbsp;if( pPane )<BR>&nbsp;&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;m_pPaneManager-&gt;DestroyPane( pPane );<BR>&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;}</P><P>Edit: Actually they use&nbsp; SAFE_PTR call, which probly validates that the pointer. So it should be safe, nevertheless you have your solution.<BR></P><P><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by Alex G." alt="Originally posted by Alex G." style="vertical-align: text-bottom;" /> <strong>Alex G. wrote:</strong><br /><br />This is the optimized way <IMG src="http://forum.codejock.com/smileys/smiley4.gif" border="0"> <BR><BR>else if ( wParam == XTP_DPN_ACTION ) <BR>&nbsp;&nbsp;&nbsp;&nbsp;{ <BR>&nbsp;&nbsp;&nbsp;&nbsp;XTP_DOCKINGPANE_ACTION *action = XTP_DOCKINGPANE_ACTION*)lParam; <BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;action-&gt;pPane-&gt;Detach(); <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;pFileBrowserTreeView-&gt;DestroyWind ow(); <BR>&nbsp;&nbsp;&nbsp;&nbsp;pFileBrowserTreeView = NULL; <BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;if ( action-&gt;action == xtpPaneActionClosed ) <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;GetDockingPaneManager()- &gt;DestroyPane( action-&gt;pPane ); <BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;return TRUE; <BR>&nbsp;&nbsp;&nbsp;&nbsp;} <BR><BR></td></tr></table> </P></EM></EM><span style="font-size:10px"><br /><br />Edited by spike</span>]]>
   </description>
   <pubDate>Wed, 05 Jan 2005 14:34:58 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1577&amp;PID=4615&amp;title=destroying-a-pane-instead-of-closing#4615</guid>
  </item> 
  <item>
   <title><![CDATA[Destroying a pane instead of closing : This is the optimized way    else...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1577&amp;PID=4521&amp;title=destroying-a-pane-instead-of-closing#4521</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=903">Alex G.</a><br /><strong>Subject:</strong> 1577<br /><strong>Posted:</strong> 23 December 2004 at 2:23pm<br /><br />This is the optimized way  <img border="0" src="http://forum.codejock.com/smileys/smiley4.gif" border="0"><br /><br />else if ( wParam == XTP_DPN_ACTION ) <br />&nbsp;&nbsp;&nbsp;&nbsp;{ <br />&nbsp;&nbsp;&nbsp;&nbsp;XTP_DOCKINGPANE_ACTION *action = XTP_DOCKINGPANE_ACTION*)lParam; <br /><br />&nbsp;&nbsp;&nbsp;&nbsp;action-&gt;pPane-&gt;Detach();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  <br /> &nbsp;&nbsp;&nbsp;&nbsp;pFileBrowserTreeView-&gt;DestroyWind ow();<br />&nbsp;&nbsp;&nbsp;&nbsp;pFileBrowserTreeView = NULL;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;if ( action-&gt;action == xtpPaneActionClosed ) <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;GetDockingPaneManager()- &gt;DestroyPane( action-&gt;pPane ); <br /><br />&nbsp;&nbsp;&nbsp;&nbsp;return TRUE; <br />&nbsp;&nbsp;&nbsp;&nbsp;}<br /><br /> ]]>
   </description>
   <pubDate>Thu, 23 Dec 2004 14:23:29 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1577&amp;PID=4521&amp;title=destroying-a-pane-instead-of-closing#4521</guid>
  </item> 
  <item>
   <title><![CDATA[Destroying a pane instead of closing : Thanks for your help !  It works...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1577&amp;PID=4520&amp;title=destroying-a-pane-instead-of-closing#4520</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=903">Alex G.</a><br /><strong>Subject:</strong> 1577<br /><strong>Posted:</strong> 23 December 2004 at 2:08pm<br /><br />Thanks for your help !<br /><br />It works fine this way :<br /><br />LRESULT FileBrowserFrame::OnDockingPaneNotify(WPARAM wParam, LPARAM lParam)<br />  {<br />  ..<br />  ..<br />  else if ( wParam == XTP_DPN_ACTION )<br />&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;XTP_DOCKINGPANE_ACTION *action = XTP_DOCKINGPANE_ACTION*)lParam;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;if ( action-&gt;action == xtpPaneActionClosed )<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;GetDockingPaneManager()- &gt;DestroyPane( action-&gt;pPane  );<br />  <br />&nbsp;&nbsp;&nbsp;&nbsp;return TRUE;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />  }]]>
   </description>
   <pubDate>Thu, 23 Dec 2004 14:08:36 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1577&amp;PID=4520&amp;title=destroying-a-pane-instead-of-closing#4520</guid>
  </item> 
  <item>
   <title><![CDATA[Destroying a pane instead of closing : you shold destroy it and return...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1577&amp;PID=4518&amp;title=destroying-a-pane-instead-of-closing#4518</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 1577<br /><strong>Posted:</strong> 23 December 2004 at 7:46am<br /><br /><P>&nbsp;you shold destroy it and return XTP_ACTION_NOCLOSE</P>]]>
   </description>
   <pubDate>Thu, 23 Dec 2004 07:46:33 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1577&amp;PID=4518&amp;title=destroying-a-pane-instead-of-closing#4518</guid>
  </item> 
  <item>
   <title><![CDATA[Destroying a pane instead of closing : I tried that of course too. But...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1577&amp;PID=4515&amp;title=destroying-a-pane-instead-of-closing#4515</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=903">Alex G.</a><br /><strong>Subject:</strong> 1577<br /><strong>Posted:</strong> 23 December 2004 at 5:31am<br /><br /><img border="0" src="http://forum.codejock.com/smileys/smiley2.gif" border="0"> I tried that of course too. But the pointer to the pane is still in use after the notification :<br /><br />void CXTPDockingPaneManager::ClosePane(CXTPDockingPane* pPane)<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (pPane == NULL) return;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (m_pSite-&gt;SendMessage(XTPWM_DOCKINGPANE_NOTIFY, XTP_DPN_CLOSEPANE, (LPARAM)pPane) == XTP_ACTION_NOCLOSE)<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SAFE_CALLPTR(pPane-&gt;m_pPare ntContainer, RemovePane(pPane));&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />}<br /> ]]>
   </description>
   <pubDate>Thu, 23 Dec 2004 05:31:54 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1577&amp;PID=4515&amp;title=destroying-a-pane-instead-of-closing#4515</guid>
  </item> 
  <item>
   <title><![CDATA[Destroying a pane instead of closing : Well then you should call DestroyPane...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1577&amp;PID=4509&amp;title=destroying-a-pane-instead-of-closing#4509</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=15">spike</a><br /><strong>Subject:</strong> 1577<br /><strong>Posted:</strong> 22 December 2004 at 9:12pm<br /><br />Well then you should call DestroyPane in the XTPN_CLOSE_PANE (sp?) notifcation in OnDockingPaneNotify.]]>
   </description>
   <pubDate>Wed, 22 Dec 2004 21:12:54 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1577&amp;PID=4509&amp;title=destroying-a-pane-instead-of-closing#4509</guid>
  </item> 
  <item>
   <title><![CDATA[Destroying a pane instead of closing : Hello,  how can I destroy the...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1577&amp;PID=4507&amp;title=destroying-a-pane-instead-of-closing#4507</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=903">Alex G.</a><br /><strong>Subject:</strong> 1577<br /><strong>Posted:</strong> 22 December 2004 at 2:23pm<br /><br />Hello,<br /><br />how can I destroy the pane instead of closing it ?<br /><br />Of course I know about the method DestroyPane in class<br />DockingPaneManager...<br /><br />Assume I want to destroy the pane after the user depressed the pane's close button.<br /><br />Thanks in advance !<br /><br />Alex<br />]]>
   </description>
   <pubDate>Wed, 22 Dec 2004 14:23:43 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1577&amp;PID=4507&amp;title=destroying-a-pane-instead-of-closing#4507</guid>
  </item> 
 </channel>
</rss>