• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3367
  • Last Modified:

Converting a Visual C++ 6.0 MFC application to Visual Studio 2010

I have an MFC application that I built with Visual C++ 6.0 and I'd like to build it now with Visual Studio C++ 2010 Express.  When I double click the 6.0 .dsw file Visual Studio 2010 is called and brings up a window:

The project 'C:\Program Files\Microsoft Visual Studio\MyProjects_VS10\dfm\dfm.dsp' must be converted to the current Visual C++ project format. After it has been converted, you will not be able to edit this project in previous versions of Visual Studio.

Convert and open this project?

When I say Yes, it immediately throws the error:

The project file 'C:\Program Files\Microsoft Visual Studio\MyProjects_VS10\dfm\dfm.dsp'  cannot be loaded.

Does anyone know what I might be running into here?

Thanks for any help.
0
steva
Asked:
steva
  • 6
  • 6
1 Solution
 
rockiroadsCommented:
I am not sure if the same rules apply here

With VB.6 in order to use with 2010, you had to first upgrade to 2008 then upgrade to 2010. There was no direct upgrade path to 2010.

I dont know if you can get a hold of VC++ 2008 Express version and try then using that to upgrade to?
0
 
stevaAuthor Commented:
Ugh!  But thanks for that. Let's see if anyone else has some input.
0
 
rockiroadsCommented:
Ok, have a look at the vb part I was talking about http://www.experts-exchange.com/Programming/Languages/Visual_Basic/Q_26451610.html?cid=1133 with number of links. Perhaps there is a C++ version of it somewhere especially on the msdn pages

Also if you are using the express edition you may have a few issues with using MFC. Read stuff here http://www.microsoft.com/express/support/support-faq.aspx

Visual C++ 2008 Express Edition
      Does Visual C++ 2008 Express Edition include MFC and ATL?      No, MFC and ATL are not included with Visual C++ 2008 Express. MFC and ATL will be included in Visual Studio 2008 Standard and above editions.

You might need to manually rewrite this using the newer controls or find a full version of visual studio.
0
Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

 
stevaAuthor Commented:
Thanks rocki,

The problems your links describe in going from vb6 to .NET are just that, going to .NET. But  I don't want to take my C++ to .NET I just want to support the code with a better IDE.  The code should all stay win32.

But the MFC issue is a problem because I'm running VS 2010 Express and Microsoft wants something like $800 for the Pro version.
0
 
rockiroadsCommented:
Ok, I thought using visual studio 2010 would require use of .net as that is the framework it uses. Maybe Im mistaken as I have not tried the C++ IDE on that. (I have 2010 pro though I didnt have to pay for it).
0
 
stevaAuthor Commented:
No, I think you have control over what VS2010 emits.  For new projects, for example you can specify Win32 and generate all winapi code or you can specify CLR and generate .NET.  You'll also get .NET, I think,  if you specify Win32 but use .NET classes, like System::String or System::Xml::XmlTextReader.

By the way, how did you get 2010 Pro for free?
0
 
rockiroadsCommented:
I have MSDN which was given to me.

What if you downloaded a trial of 2010 pro? and try go from there? http://www.microsoft.com/visualstudio/en-us/download
0
 
stevaAuthor Commented:
But a trial will run out and then they'll want $800, which I'll have to pay because all my code will need 2010 Pro to be supported.  

Anyway, thanks for the discussion.  I gave you the points.
0
 
rockiroadsCommented:
thanks

I suggested the trial just so you can see if you can migrate your code successfully or not. Is this code for personal use or company? if its the latter then tell them what they have to do in order to use it.

Was having a look for workarounds. Wasnt sure if using parts of the trial would work with express. Probably not. But did find this. http://www.codeproject.com/KB/MFC/MFCinVisualStudioExpress.aspx Supposedly shows to how compile MFC with express.
0
 
stevaAuthor Commented:
Yes, you're right.  I should probably make sure the trial version does the conversion before putting out the money.  

The code is for a business but it's My business so there's no one to go ask for the money.

The Code Project article on compiling MFC with Express was interesting.  That may be a solution.

Thanks again.
0
 
rockiroadsCommented:
ok m8. good luck with that.

perhaps consider the time it takes to look at your migration issues. would it be quicker if you perhaps rewrote it? maybe dotnet is not an option for you. But then if you got lots of apps/large apps it would probably take way too long.
0
 
stevaAuthor Commented:
The software doesn't need .NET.  It runs fine now without it. The main motivation for going to 2010 is the modern IDE.  The goal is to eventually sell the software and it would be more attractive if it was already on 2010 than making the buyer convert it themselves or find a version of  V6.

I think the solution is to bite a bullet and get the full 2010 version.  2010 seems to have a wizard to convert from V6 but I just couldn't do it here with my Express version because of the MFC.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 6
  • 6
Tackle projects and never again get stuck behind a technical roadblock.
Join Now