我的logManRightView是继承自CListView的。
void LogManRightView::OnInitialUpdate()
{
CListView::OnInitialUpdate();
// TODO: You may populate your ListView with items by directly accessing
// its list control through a call to GetListCtrl(). CListCtrl &m_loglistctrl = GetListCtrl();
CHeaderCtrl* hc = m_loglistctrl.GetHeaderCtrl(); //通过调试,发现hc指向为空}
通过调试发现hc指向为空,这是为什么?大伙帮忙看看有什么问题。
void LogManRightView::OnInitialUpdate()
{
CListView::OnInitialUpdate();
// TODO: You may populate your ListView with items by directly accessing
// its list control through a call to GetListCtrl(). CListCtrl &m_loglistctrl = GetListCtrl();
CHeaderCtrl* hc = m_loglistctrl.GetHeaderCtrl(); //通过调试,发现hc指向为空}
通过调试发现hc指向为空,这是为什么?大伙帮忙看看有什么问题。
BOOL logManRightView::PreCreateWindow(CREATESTRUCT& cs)
{
cs.style|=LVS_REPORT;
return CListView::PreCreateWindow(cs);
}
CListCtrl* m_loglistctrl = GetListCtrl();
CHeaderCtrl* hc = m_loglistctrl->GetHeaderCtrl(); //