Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Docking Pane
  New Posts New Posts RSS Feed - SetTilte Error after calling SetLayout
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

SetTilte Error after calling SetLayout

 Post Reply Post Reply
Author
Message
9rap View Drop Down
Newbie
Newbie


Joined: 07 March 2005
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote 9rap Quote  Post ReplyReply Direct Link To This Post Topic: SetTilte Error after calling SetLayout
    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"));

...

}



Edited by 9rap
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.148 seconds.