Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Issues:Converting VC++ 6.0 projects to visual studio 2005

Status
Not open for further replies.

deodatt

Newbie level 2
Joined
Jun 10, 2010
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
pune
Activity points
1,305
Hi,
I need to convert my existing vc++ 6.0 project to visual studio 2005.
This is my second project to which I am trying to upgrade, but there are new some problems that i am facing..
lot of errors i have resolved in this conversion or upgrade.
please help me in resolving these errors as this may help lot of people in trouble.
I hope all people who will reply to this post will continue to post the Replays to all the related errors to contribute Collaborated effort :)

posting one error here:
1>d:\extendedmfcclasses\source\basedialog.cpp(69) : error C2440: 'static_cast' : cannot convert from 'void (__thiscall CBaseDialog::* )(WPARAM,LPARAM)' to 'LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)'

and in .cpp file it points to this line.
BEGIN_MESSAGE_MAP(CBaseDialog, CDialog)
//{{AFX_MSG_MAP(CBaseDialog)
ON_BN_CLICKED(ID_DEFAULT_HELP, OnHelp)
ON_WM_HELPINFO()
ON_MESSAGE(UM_FW_CHANGE_MESSAGEBOX_POSITION, ChangeMessageBoxPosition) //}}AFX_MSG_MAP
ON_REGISTERED_MESSAGE(_afxMsgMouseWheel, OnRegisteredMouseWheel)
END_MESSAGE_MAP()

This code works fine in VC++ 6.0 however it gives this error while building in Visual Studio 2005.


thanks in advance for reply..
:)
 

Re: Issues:Converting VC++ 6.0 projects to visual studio 200

This may help

**broken link removed**
 

Re: Issues:Converting VC++ 6.0 projects to visual studio 200

microKernel said:
This may help

**broken link removed**

>>
11-Jun-10 02:33 AM
Hi friends, I think I have got the solution for this problem.
here what I had to change lies in the declaration and the definition of the function ChangeMessageBoxPosition.
I had to change the return type of this function from void to LRESULT.

Conclusion:
I think that whenever we are facing the problem related to 'static cast' and in error if we get the reference to or pointers to sdk library or MFC library saying " cannot convert to...." then we should see first the return types and then the receiving parameters also.
My this conclusion may not be correct for every situation but I think that this may help to some people.

I will regularly post all the errors I get and if I get the solution for them, I will post them too.

microKernel, Thanks and I appreciate your reply.
:)


-Deodatt Deo.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top