<?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 : IsValid, IsClosed, Handle</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Docking Pane : IsValid, IsClosed, Handle]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 13 May 2026 10:08:27 +0000</pubDate>
  <lastBuildDate>Tue, 21 Mar 2006 15:55:32 +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=3827</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[IsValid, IsClosed, Handle : I have a question about the suggested...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=3827&amp;PID=11590&amp;title=isvalid-isclosed-handle#11590</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1866">Stratiotes</a><br /><strong>Subject:</strong> 3827<br /><strong>Posted:</strong> 21 March 2006 at 3:55pm<br /><br /><P>I have a question about the suggested method to use in this case.</P><P>I had the following code to capture the current pane rectangle:</P><P>&nbsp;CXTPDockingPane * pPane = m_paneManager.FindPane(IDR_MY_PANE);<BR>&nbsp;if( pPane != NULL &amp;&amp; pPane-&gt;IsValid() )<BR>&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;CRect rectPane( pPane-&gt;GetPaneWindowRect() );</P><P>&nbsp;&nbsp;&nbsp; // do something with rectPane<BR>}</P><P>Now a problem came when the user clicked on the "x" to close the pane and then it came to this code - it throws an exception on the GetPaneWindowRect.&nbsp;&nbsp; Which led me to wonder why it was not NULL and still valid even after being closed - is that intentional?</P><P>Second question, I thought it would be easy to fix by adding a pPane-&gt;GetSafeHwnd(); to the if-test but then the build failrue indicates that GetSafeHwnd is a protected member and cannot be called here.&nbsp; So I looked thru the header file and found the &nbsp;IsClosed() method and add a !pPane-&gt;IsClosed() to the test and that resolves the issue.&nbsp;&nbsp; Is that the preferred method for handling this situation?</P><P>Thanks<BR></P><P>&nbsp;</P>]]>
   </description>
   <pubDate>Tue, 21 Mar 2006 15:55:32 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=3827&amp;PID=11590&amp;title=isvalid-isclosed-handle#11590</guid>
  </item> 
 </channel>
</rss>