MDI and ChildViews derived from different CFormView 
Author Message
 MDI and ChildViews derived from different CFormView

Hi, I am beginner in MFC.

It is possible in MDI (without doc/view support) create ChildViews  derived
from different CFormView

I try to do:

CMainFrame* pFrame = STATIC_DOWNCAST(CMainFrame, m_pMainWnd);

pFrame->CreateNewChild(      RUNTIME_CLASS(CChildFrame1), IDR_TestTYPE,
m_hMDIMenu, m_hMDIAccel);


class CChildFrame1 : public CMDIChildWnd


      . . .

      CChildView1 m_wndView;

      . . .


class CchildView1 : public CFormView


      . . .


in: int CChildFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)

      if (!m_wndView.Create("STATIC", "Hi", WS_CHILD | WS_VISIBLE,

       CRect(0, 0, 20, 20), this, 1234,NULL ) )


            return -1;



error C2248: 'CFormView::Create' : cannot access protected member declared
in class 'CFormView'

Is possible in MDI app create some ChildViews  derived  from different
CFormView at one time ??

How to do it better.

Thank You.

Fri, 13 Aug 2004 02:57:42 GMT  
 [ 1 post ] 

 Relevant Pages 

1. MDI and ChildViews derived from different CFormView

2. Different dialog-template resource for a class derived form CFormView

3. MDI View derived from CFormView?

4. Multiple MDI windows each with a different CFormView.

5. ChildView of a ChildView ?

6. Disable Scrolling in CFormView derived class

7. Saving window size for CFormView derived SDI application

8. ShowScrollBar Not work for CFormView Derived class

9. Changing palette on CFormView-derived class/app.

10. removing scrollbars from CFormView derived view

11. Deriving a New Base Class From CFormView

12. How to get rid of border and menu in SDI derived from CFormView


Powered by phpBB® Forum Software