BOOL CxxxxDialog::OnInitDialog(){ CDialog::OnInitDialog(); // TODO : ここに初期化を追加してください CRect rect(0,0,400,300); // フレームウィンドウの作成情報(ビューだけを指定) CCreateContext context; context.m_pNewViewClass = RUNTIME_CLASS(CXXXView); // フレームウィンドウ〜ビュー作成 CFrameWnd* pFrame = static_cast< CFrameWnd* >( RUNTIME_CLASS(CFrameWnd)->CreateObject() ); pFrame->Create( NULL, NULL, WS_VISIBLE|WS_CHILD, rect, this, NULL, 0, &context ); /* XXXView = (CXXXView*)RUNTIME_CLASS(CXXXView)->CreateObject(); int x=0,y=0,width=400,height=300; rect.SetRect(x,y,x+width,y+height); if (!XXXView->Create(NULL, NULL, WS_CHILD | WS_VISIBLE, rect, pFrame, 10000, NULL)){ DestroyWindow(); } */ } |