15,979
社区成员
发帖
与我相关
我的任务
分享
m_pView = new CPicView;
m_pDlg = new CDlgCtr;
CRect rc;
GetClientRect(&rc);
rc.bottom -= 50;
m_pView->Create(NULL,NULL,WS_CHILD|WS_VISIBLE,rc,this,1234);
GetClientRect(&rc);
m_pDlg->Create(MAKEINTRESOURCE(IDD_DIALOG_CTR),this);
rc.top += rc.bottom - 50;
m_pDlg->MoveWindow(rc);
m_pDlg->ShowWindow(SW_SHOW);
m_pDlg->SetViewP(m_pView);//把主对话框中的m_pView指针传递给 模式对话框 ,模式对话框通过该指针对视图操作
void CDlgCtr::SetViewP(CPicView* ptr)
{
m_pView = ptr;//保存视图类的指针
}