Click here to Skip to main content
16,011,374 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralNewbie to Direct3D question Pin
Joel Holdsworth2-Jul-02 5:24
Joel Holdsworth2-Jul-02 5:24 
GeneralRe: Newbie to Direct3D question Pin
Mike Nordell2-Jul-02 8:05
Mike Nordell2-Jul-02 8:05 
Generalanother mdi question Pin
ns2-Jul-02 5:09
ns2-Jul-02 5:09 
Generalhaving trouble creating two docs for a CFormView MDI Pin
ns2-Jul-02 4:39
ns2-Jul-02 4:39 
GeneralRe: having trouble creating two docs for a CFormView MDI Pin
Chris Losinger2-Jul-02 4:41
professionalChris Losinger2-Jul-02 4:41 
GeneralRe: having trouble creating two docs for a CFormView MDI Pin
ns2-Jul-02 4:53
ns2-Jul-02 4:53 
Thanks so much for the interest. I used class wizard to make my view and doc files (the second doc)


The example with CView that works has:

from .h
protected:
CMDIBillView(); // protected constructor used by dynamic creation
DECLARE_DYNCREATE(CMDIBillView)

and from .cpp

IMPLEMENT_DYNCREATE(CMDIBillView, CView)

CMDIBillView::CMDIBillView()
{
}


I just noticed that:
The implement line was missing in my view code (CFOrmView based)
so I added
IMPLEMENT_DYNCREATE(CMDIKVView, CFormView)

plus the other changes noted below. Now only 1 error:

C:\Trainer\mditalk\MDIKVView.cpp(16) : error C2512: 'CMDIKVView' : no appropriate default constructor available




My second view class has the following relevant code (I moved the constructor to protected and added dyncreate - it didnt show up by default as is does in a CView based example I made)

From the .h file:

protected:
CMDIKVView(CWnd* pParent /*=NULL*/); // protected constructor used by dynamic creation
DECLARE_DYNCREATE(CMDIKVView)

From the cpp file:
CMDIKVView::CMDIKVView(CWnd* pParent /*=NULL*/)
: CDialog(CMDIKVView::IDD, pParent)
{
//{{AFX_DATA_INIT(CMDIKVView)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}



The example with CView that works has:

from .h
protected:
CMDIBillView(); // protected constructor used by dynamic creation
DECLARE_DYNCREATE(CMDIBillView)

and from .cpp

IMPLEMENT_DYNCREATE(CMDIBillView, CView)

CMDIBillView::CMDIBillView()
{
}


I just noticed that:
The implement line was missing in my view code (CFOrmView based)
so I added
IMPLEMENT_DYNCREATE(CMDIKVView, CFormView)

plus the other changes noted below. Now only 1 error:

C:\Trainer\mditalk\MDIKVView.cpp(16) : error C2512: 'CMDIKVView' : no appropriate default constructor available

GeneralRe: having trouble creating two docs for a CFormView MDI Pin
ns2-Jul-02 5:45
ns2-Jul-02 5:45 
GeneralRe: having trouble creating two docs for a CFormView MDI Pin
Chris Losinger2-Jul-02 6:27
professionalChris Losinger2-Jul-02 6:27 
Generalpassing variables between Doc and View in MDI Pin
2-Jul-02 4:24
suss2-Jul-02 4:24 
GeneralRe: passing variables between Doc and View in MDI Pin
#realJSOP2-Jul-02 4:31
professional#realJSOP2-Jul-02 4:31 
GeneralRe: passing variables between Doc and View in MDI Pin
ns2-Jul-02 4:42
ns2-Jul-02 4:42 
GeneralRe: passing variables between Doc and View in MDI Pin
2-Jul-02 5:03
suss2-Jul-02 5:03 
Generalwant to set a variable from a view in a different document Pin
ns2-Jul-02 4:14
ns2-Jul-02 4:14 
GeneralRe: want to set a variable from a view in a different document Pin
#realJSOP2-Jul-02 4:33
professional#realJSOP2-Jul-02 4:33 
QuestionWrong drive count ? Pin
chen2-Jul-02 3:38
chen2-Jul-02 3:38 
AnswerRe: Wrong drive count ? Pin
Mike Nordell2-Jul-02 6:31
Mike Nordell2-Jul-02 6:31 
General*.AXW ( Wizard) from DirectX 8.1 and Visual Studio 7.0 Pin
Braulio Dez2-Jul-02 3:35
Braulio Dez2-Jul-02 3:35 
GeneralRe: *.AXW ( Wizard) from DirectX 8.1 and Visual Studio 7.0 Pin
Jeremy Falcon2-Jul-02 6:41
professionalJeremy Falcon2-Jul-02 6:41 
GeneralProcess Status Pin
Phil.Benson2-Jul-02 2:51
professionalPhil.Benson2-Jul-02 2:51 
GeneralRe: Process Status Pin
Scott H. Settlemier2-Jul-02 3:10
Scott H. Settlemier2-Jul-02 3:10 
GeneralRe: Process Status Pin
#realJSOP2-Jul-02 3:14
professional#realJSOP2-Jul-02 3:14 
GeneralRe: Process Status Pin
Phil.Benson2-Jul-02 3:22
professionalPhil.Benson2-Jul-02 3:22 
Generaluser selects text printed by drawtext Pin
2-Jul-02 2:50
suss2-Jul-02 2:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.