Solved

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

Posted on 2010-09-24
12
2,681 Views
Last Modified: 2013-11-27
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
Comment
Question by:steva
  • 6
  • 6
12 Comments
 
LVL 65

Expert Comment

by:rockiroads
ID: 33755495
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
 

Author Comment

by:steva
ID: 33755615
Ugh!  But thanks for that. Let's see if anyone else has some input.
0
 
LVL 65

Accepted Solution

by:
rockiroads earned 500 total points
ID: 33757302
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
 

Author Comment

by:steva
ID: 33758301
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
 
LVL 65

Expert Comment

by:rockiroads
ID: 33758383
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
 

Author Comment

by:steva
ID: 33758411
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 65

Expert Comment

by:rockiroads
ID: 33758436
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
 

Author Comment

by:steva
ID: 33758574
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
 
LVL 65

Expert Comment

by:rockiroads
ID: 33758598
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
 

Author Comment

by:steva
ID: 33759187
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
 
LVL 65

Expert Comment

by:rockiroads
ID: 33759417
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
 

Author Comment

by:steva
ID: 33760405
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

In this article, I will show how to use the Ribbon IDs Tool Window to assign the built-in Office icons to a ribbon button.  This tool will help us to find the OfficeImageId that corresponds to our desired built-in Office icon. The tool is part of…
zlib is a free compression library (a DLL) on which the popular gzip utility is built.  In this article, we'll see how to use the zlib functions to compress and decompress data in memory; that is, without needing to use a temporary file.  We'll be c…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now