1、首先创建一个基于单文档的Ribbon样式的MFC项目。
2、在**App::InitInstance()函数中获取当前的view类:
CMainFrame *p=(CMainFrame*)AfxGetMainWnd();
CminYongJianZhuView *pv=(CminYongJianZhuView *)p->GetActiveView();
3、第一个界面镶嵌在主界面的处理函数写在了**view.cpp中
CMainStartDLG *start=new CMainStartDLG(this);
start->Create(IDD_DIALOGmain,this);
start->ShowWindow(SW_SHOW);
start->MoveWindow(&rc);
pDlg=start;
isDlgOpen=TRUE;
4、调用3中的函数即可。可实现代码一开始运行就显示登录界面类似的功能。