G
Ghost
Hi all, I wrote a program in C# and now I have to "translate" it i
visual C++ (MFC) using .NET, but I had a little problem:
*ERRORS*
error C3181: 'CTestDlg' : invalid operand for __typeof, expected
fully defined managed type
error C3363: 'void CTestDlg::BtnAboutClick(System::Object __g
*,System::EventArgs __gc *)' : cannot create a delegate handler fo
'System::EventHandler' from a non-member function or a member of a
unmanaged class
error C2227: left of '->Add' must point to class/struct/union
*SOURCE LINES*
ResourceManager* resources = new ResourceManager(__typeof(CTestDlg));
btnAbout->Click += new EventHandler(this, &CTestDlg::BtnAboutClick);
Control::Controls->Add(btnAbout);
My .h file is:
class CTestDlg: public CDialog
{
//lots of code.....
}
I'm wasting my time on these errors but I don't know how can I fi
them, could someone help me?
Thank you for the help (I hope
-
Ghos
visual C++ (MFC) using .NET, but I had a little problem:
*ERRORS*
error C3181: 'CTestDlg' : invalid operand for __typeof, expected
fully defined managed type
error C3363: 'void CTestDlg::BtnAboutClick(System::Object __g
*,System::EventArgs __gc *)' : cannot create a delegate handler fo
'System::EventHandler' from a non-member function or a member of a
unmanaged class
error C2227: left of '->Add' must point to class/struct/union
*SOURCE LINES*
ResourceManager* resources = new ResourceManager(__typeof(CTestDlg));
btnAbout->Click += new EventHandler(this, &CTestDlg::BtnAboutClick);
Control::Controls->Add(btnAbout);
My .h file is:
class CTestDlg: public CDialog
{
//lots of code.....
}
I'm wasting my time on these errors but I don't know how can I fi
them, could someone help me?
Thank you for the help (I hope
-
Ghos