|
-
April 12th, 1999, 07:04 AM
#1
Class multiple constructor
Hi,
I have created a class, derived from CView MFC base class.
I have the default constructor as usual.
I want to get CDC* pDC and CPrintInfo* pInfo objects at the creation of
this class.
I have tried to utilize another constructor but without success.
When I create this class from a Generic C++ class instead from a MFC, I can
have more than one class constructor. If I do that with a MFC derived
class, I can have multiple constructor.
Why ?
Thanks for any help
Claude
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CFondPrint::CFondPrint()
{
}
CFondPrint::CFondPrint(CDC* pDC, CPrintInfo* pInfo)
{
// Printing class library in action
pPage = new CPage(pInfo->m_rectDraw, pDC);
// Times New Roman font
pPage->SetFont("Times New Roman");
}
-
April 12th, 1999, 09:26 AM
#2
Re: Class multiple constructor
Hint: Normaly Views are in the Doc/View-Framework always created dynamicaly on the heap over the default-constructor. -> DECLARE_DYNCREATE-MACRO
Mike
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|