IsValid, IsClosed, Handle |
Post Reply |
Author | |
Stratiotes
Newbie Joined: 21 March 2006 Location: United States Status: Offline Points: 1 |
Post Options
Thanks(0)
Posted: 21 March 2006 at 3:55pm |
I have a question about the suggested method to use in this case. I had the following code to capture the current pane rectangle: CXTPDockingPane * pPane = m_paneManager.FindPane(IDR_MY_PANE); // do something with rectPane 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. Which led me to wonder why it was not NULL and still valid even after being closed - is that intentional? Second question, I thought it would be easy to fix by adding a pPane->GetSafeHwnd(); to the if-test but then the build failrue indicates that GetSafeHwnd is a protected member and cannot be called here. So I looked thru the header file and found the IsClosed() method and add a !pPane->IsClosed() to the test and that resolves the issue. Is that the preferred method for handling this situation? Thanks
|
|
Mark
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |