Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » Exception report while using CScrollView Collapse All
Subject Author Date
wang zheng May 14, 2004 - 8:58 PM

Hi, I am a beginer in MFC. I used prof-UI just like below:


//in MainFrm.h
....
CExtControlBar        m_wndSysStatusBar;
CExtWRB< CExtWFF<CStatusView > > m_wndInBarEdit;


//CStatusView is derived from CScrollView;



//in MainFram::OnCreate (...)
 ...
 if(!m_wndSysStatusBar.Create(
  _T("Bar"),
  this,
  ID_CTRL_SYSSTATUS
  )
 )
 {
  TRACE0("Failed to create m_wndSysStatusBar\n");
  return -1;  // fail to create
 }
 if( !m_wndInBarEdit.Create(NULL,
   NULL,
  WS_CHILD|WS_VISIBLE|WS_VSCROLL|WS_HSCROLL|ES_MULTILINE|ES_LEFT,
   CRect(0,0,0,0),
   &m_wndSysStatusBar,
   m_wndSysStatusBar.GetDlgCtrlID()
   )
  )
 {
  TRACE0("Failed to create m_wndInBarEdit\n");
  return -1;  // fail to create
 }
  
 ...

///////////////////////////////////////////


It looked fine in running while when program exited, VC.net 2003 DEBUG Model reported
exception in dbgheap.c
_CRTIMP int __cdecl _CrtIsValidHeapPointer(
        const void * pUserData
        )


and then reported memory leak.


What should i do?

Technical Support May 17, 2004 - 5:30 AM

Dear wang zheng,

You can create any window as a child of any other window. So, you can freely use any view inside the Prof-UIS resizable bar.


We are not sure what you are doing wrong because the information you provided is not enough.


We just sent you a sample project with resizable control bars, which contains the form view and the scroll view as child windows.