派生于基类CMDIChildWndEx的CChildFrame类不绘制子窗口?
MDI程序 通过在CChildFrame创建Tab视图 实现Excel效果。
在VC6中正常,但是转移到VS2010中 CChildFrame基类由CMDIChildWnd变为CMDIChildWndEx后。
发现 m_TabTtrl的OnPaint()函数没有调用,而在VC6中 该函数调用了。
因此在VS2010中显示不出来,如何解决????
CTabCtrl m_TabTtrl;
在CChildFrame::OnCreate()
{
if(!m_TabTtrl.Create(CRect(0,0,0,0),this,IDX_TABLEVIEW_CTRL))
{
TRACE0("Failed to create table ctrl\n");
return -1; // fail to create
}
RecalcLayout();
}
class CTabCtrl : public CWnd
{
..................
afx_msg void OnPaint();
..........
}