class CDzVodProgramView : public CFormView
CPtrList* m_pDragList;void CDzVodProgramView::OnInitialUpdate()
{
CFormView::OnInitialUpdate();
AddList();
}
void CDzVodProgramView::AddList()
{
int intModelRootID;
CString strChaName;
for(int i=0;i<2;i++)
{
strChaName.Format("aa%d",i);
intModelRootID=i;
AddPage(intModelRootID,strChaName);
adoRst.MoveNext();
}
}
void CDzVodProgramView::AddPage(int dwChaID,CString strChaName) 

CLmyRectWnd* pRectWnd;
pRectWnd=new CLmyRectWnd;//注CLmyRectWnd的基类是CWnd,主要是CStatic的方框
pRectWnd->m_nChaID =dwChaID;
pRectWnd->m_strChaName=strChaName;
pRectWnd->Create(NULL, "", 0, CRect(0, 0, 0, 0), this,0);
m_pDragList->AddTail(pRectWnd);
}CDzVodProgramView这里能正确显示出几个方框void CDzVodProgramView::OnSelchange() 
{
// TODO: Add your control notification handler code here

DelPage();
AddList();
this->Invalidate(TRUE);
}
void CDzVodProgramView::DelPage()
{
POSITION pos=m_pDragList->GetHeadPosition(); 
  while(pos)
{
CLmyRectWnd *pRectWnd=(CLmyRectWnd*)m_pDragList->GetNext(pos);
delete pRectWnd;
}
m_pDragList->RemoveAll();
}CDzVodProgramView删除原来的方框重新创建,为什么不能显示,高手们帮解决呀