Click to See Complete Forum and Search --> : Error when trying Good C++ in .Net


rickfdr
February 19th, 2003, 10:07 AM
I have a project which has been working in C++ 6.0 and I opened it in C++ .Net to test an upgrade. I am getting alot of errors, all of the same general type.

When a check box on the dialog called IDC_1 is clicked, the function On1() is called.

In the header file MyDialog.h, under the "Generated message map functions" section, there is the line:
afx_msg BOOL On1();

In the BEGIN_MESSAGE_MAP (again, generated by visual studio) section of MyDialog.cpp, there is the line:
ON_BN_CLICKED(IDC_1, On1)

When trying to compile in C++ .NET, I am getting the following:
"error C2440: 'static_cast': cannot convert from 'BOOL(__thiscall CMyDialog::*)(void)' to 'AFX_PMSG' None of the functions with this name in scope match the target type"

Is anyone familiar with this problem?

Thanks in advance for your help and suggestions!

Rick

Andreas Masur
February 19th, 2003, 11:44 AM
Although I cannot give you the complete solution to your problem, there is a big difference between Visual Studio .NET and Visual Studio 6.0.

.NET contains a completely new MFC dll (Version 7) which is incompatible with the old one (Version 4.2)...