Hi,
I posted the message (c other thread). Here follows the code causing the problem.
class containing the function......
Code:
class CDeleteWrd : public CDialog
{
// Construction
public:
CDeleteWrd(CWnd* pParent = NULL);
void SetPointer2Doc(CXMTrainerDoc* pD) {pDoc = pD;};
// Dialog Data
//{{AFX_DATA(CDeleteWrd)
enum { IDD = IDD_DELETEWORD };
CListBox m_ElemList;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CDeleteWrd)
protected:
virtual void DoDataExchange DataExchange*pDX);
// DDX/DDV support
//}}AFX_VIRTUAL
public:
// Implementation
protected:
CXMTrainerDoc* pDoc;
// Generated message map functions
//{{AFX_MSG(CDeleteWrd)
virtual BOOL OnInitDialog();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
class calling function.....
void CXMTrainerView::OnWordlistDeleteword()
{
CXMTrainerDoc* pDoc = GetDocument();
CDeleteWrd dlg(this);
dlg.SetPointer2Doc(pDoc);
dlg.DoModal();
}
I tried to pass this pointer to the class by a (newly created )constructor, but then i get the message :constructor doesn't take 2 parameters.
Hope this is sufficient to explain the problem.
Thnx