藏族寺庙金刚舞视频:CSplitterWnd在线程中的问题:m_nRows=0,为何?

来源:百度文库 编辑:高校问答 时间:2024/05/09 00:20:43
CPListView* plv=(CPListView*)pmainf->GetPListView(TH->hwndSplitter);【这个方法在工作者线程中】=>CWnd* CMainFrame::GetPListView(HWND hwnd)

{ CSplitterWnd* splitter=(CSplitterWnd*)CSplitterWnd::FromHandle(hwnd);

CWnd* wnd=splitter->GetPane(0,0);

if(wnd->IsKindOf(RUNTIME_CLASS(CPListView)))

{return wnd;}

else return NULL;

}其中:GetPane(0,0)=>IdFromRowCol(int row, int col),如下:

int CSplitterWnd::IdFromRowCol(int row, int col) const

{

ASSERT_VALID(this);

ASSERT(row >= 0);

ASSERT(row < m_nRows);=>出错了 调试观察m_nRows=0;为何???不过在BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext) {......}中调用却是2呀【已经有:m_Splitter.CreateStatic(this,2,1);】

ASSERT(col >= 0);

ASSERT(col < m_nCols);=>出错了调试观察m_nRows=0; 为何???

return AFX_IDW_PANE_FIRST + row * 16 + col;

}

vc就是难呀,谁知道为什么??一定万分感谢

系统出了问题