怎么把dialog放进自己派生的View中?解决立即给分!
u2m 2003-09-03 05:35:04 自定义的一个CMyView,派生于CView.一个对话框派生于CDialogBar,
我动态的把CMyView生成,然后我想把这个DialogBar显示在CMyView的视图中,
我这样作为什么达不到目的?是哪里的问题那?
int CMyView::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CView::OnCreate(lpCreateStruct) == -1)
return -1;
// TODO: Add your specialized creation code here
if (!m_ControlDlg.Create(this, IDD_DIALOG1, WS_CHILD | WS_VISIBLE | CBRS_TOP| CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC,IDD_DIALOG1))
{
TRACE0("Failed to create Dialog bar\n");
return -1; // fail to create
}
return 0;
}