2.0mainfram

来源:互联网 发布:淘宝直播系统抽奖连击 编辑:程序博客网 时间:2024/05/21 01:51

BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
 CRect rect;
 GetWindowRect(rect);
 ScreenToClient(rect);
 m_wndSplitter.CreateStatic(this,1,2);
 m_wndSplitter.CreateView(0,1,RUNTIME_CLASS(CMyFromView),CSize(rect.Width()/3,rect.Height()),pContext);  
 m_wndSplitter.SetColumnInfo(0, rect.Width()/3*2, 0);
 m_wndSplitter2.CreateStatic(&m_wndSplitter,2,1,WS_CHILD | WS_VISIBLE,m_wndSplitter.IdFromRowCol(0, 0));
 m_wndSplitter2.CreateView(0,0,RUNTIME_CLASS(CMyListView),CSize(rect.Width()/3*2,rect.Height()/5*3),pContext);
 m_wndSplitter2.CreateView(1,0,RUNTIME_CLASS(CMyEditView),CSize(rect.Width()/3*2,rect.Height()/5*2),pContext);  
   // return CFrameWnd::OnCreateClient(lpcs, pContext);
 return TRUE;
}

LRESULT CMainFrame::OnFormNotifyList(WPARAM wParam,LPARAM lParam)
{
 ::SendMessage(m_wndSplitter2.GetPane(0,0)->GetSafeHwnd(),UM_NOTIFYLIST_REFRESH,wParam,NULL);
 return TRUE;
}