我自己编了一个没有文档视图结构的打印程序,可是在编译时报错
pFrame->Create(NULL,"Curve Print Preview",WS_OVERLAPPEDWINDOW,CRect(0,0,0,0));error C2660: 'Create' : function does not take 4 parameters
请高手指点一下,错在哪了
pFrame->Create(NULL,"Curve Print Preview",WS_OVERLAPPEDWINDOW,CRect(0,0,0,0));error C2660: 'Create' : function does not take 4 parameters
请高手指点一下,错在哪了
{
public:
CPrintFrame(); // protected constructor used by dynamic creation
DECLARE_DYNCREATE(CPrintFrame)// Attributes
public:
CPrintView *m_pView;
CDialog *m_pCallerDlg;
CWnd *m_pWnd;
// Operations
public:// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CPrintFrame)
protected:
virtual void OnDraw(CDC* pDC); // overridden to draw this view protected:
virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);
//}}AFX_VIRTUAL// Implementation
protected:
virtual ~CPrintFrame();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif // Generated message map functions
public:
//{{AFX_MSG(CPrintFrame)
afx_msg void OnDestroy();
// NOTE - the ClassWizard will add and remove member functions here.
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
因为CView下的create为
virtual BOOL Create(LPCTSTR lpszClassName,
LPCTSTR lpszWindowName,
DWORD dwStyle,
const RECT& rect,
CWnd* pParentWnd, UINT nID,
CCreateContext* pContext = NULL);
LPCTSTR lpszClassName,
LPCTSTR lpszWindowName,
DWORD dwStyle,
Const RECT& rect,
CWnd* pParentWnd,
UINT nID,
CCreateContext* pContext = NULL
);