strange Cbutton problem [modified]
-
hi all :) I have MFC application and a public method
void CProject::Something(CButtonDerivedClass bButton)
{
// No matter what is here
}When in OnInitDialog I call this method, I get error :
...
Something(m_bDerivedButton);
// bDerivedButton is an object of some CButton derived class
// and is public member variable of current class
...error : Error 1 error C2248: 'CObject::CObject' : cannot access private member declared in class 'CObject' c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxwin.h 1814 Please help if you can. thanks -- modified at 6:47 Wednesday 14th June, 2006
-
hi all :) I have MFC application and a public method
void CProject::Something(CButtonDerivedClass bButton)
{
// No matter what is here
}When in OnInitDialog I call this method, I get error :
...
Something(m_bDerivedButton);
// bDerivedButton is an object of some CButton derived class
// and is public member variable of current class
...error : Error 1 error C2248: 'CObject::CObject' : cannot access private member declared in class 'CObject' c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxwin.h 1814 Please help if you can. thanks -- modified at 6:47 Wednesday 14th June, 2006
At a guess, it looks like the compiler can't make a copy of your class. So, can you pass it as a pointer or reference ? Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
-
At a guess, it looks like the compiler can't make a copy of your class. So, can you pass it as a pointer or reference ? Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog