Solved

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

Posted on 2010-09-24
12
2,805 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
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 

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
 
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Windows 10 Scheduled Tasks 11 98
windbg taking it's time 32 93
reboot server with scheduled time and week base 4 34
Graph API & MS Apps 1 21
This article shows a few slightly more advanced techniques for Windows 7 gadget programming, including how to save and restore user settings for your gadget and how to populate the "details" panel that is displayed in the Windows 7 gadget gallery.  …
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
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…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

856 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