Print Page | Close Window

SetTilte Error after calling SetLayout

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Docking Pane
Forum Description: Topics Related to Codejock Docking Pane
URL: http://forum.codejock.com/forum_posts.asp?TID=2695
Printed Date: 19 April 2024 at 5:28am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: SetTilte Error after calling SetLayout
Posted By: 9rap
Subject: SetTilte Error after calling SetLayout
Date Posted: 07 August 2005 at 4:48am

I found CXTPDockingPane's SetTitle error after calling paneManager SetLayout.The Error is in CString's GetData().

ASSERT(m_pchData != NULL);

the pchData ==NULL.

How can I do?

My code like the following:

int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{

...

 m_pPaneChat = m_paneManager.CreatePane(IDR_PANE_CHAT, CRect(0, 0,150, 120), xtpPaneDockBottom);
 m_pPaneChat->SetTitle(_T("Title1"));
 m_pPaneChat->SetOptions(xtpPaneNoCloseable); 

 CXTPDockingPaneLayout layoutNormal(&m_paneManager);
 if (layoutNormal.Load(_T("NormalLayout")))
    {
  m_paneManager.SetLayout(&layoutNormal);  ; ;
 }

 m_pPaneChat->SetTitle(_T("Title2"));

...

}




Replies:
Posted By: Oleg
Date Posted: 08 August 2005 at 4:07am

Don't use global pointers.

After SetLayout m_pPaneChat already invalid pointer.

call FindPane to find it.



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net