The Horror the beautiful horror of moving EVC 4 projects to Visual Studio 2005

I have just finished moving a large Embedded Visual Studio 4 (MFC) project to Visual Studio 2005. It was somewhat a painful experienece which I would not want others to have to endure.

I am sure anybody else will have different problems but the solutions that helped me were

1. build a new Visual Studio 2005 MFC application

2. migrate the old app by opening it in VIsual Studio 2005 ( save the app )

3. delete all the code in the new application exept Stdafx.h

4. compare and merge your old stdafx.h and the new one ( really this should mean replacing your stfafx.h )

5 fix remaining build errors, the new compilers are great and will find enough embarrassing errors to make the exercise worth while. you will most likely have a few problems with SEH and sh* functions but they do drop out.

Doing the above will save you a lot of time, the changes in stdafx are quite extensive.

If you are running IE 7 before the steps above you will need to edit your registry

To add a new entry to

1HKEY\_LOCAL\_MACHINESOFTWAREMicrosoftWindowsCurrentVersionExtPreApproved 

called

 1{D245F352-3F45-4516-B1E6-04608DA126CC} 
 2```
 3
 4This will allow the mobile wizard to use the IE 7 html control
 5
 6The end results are an application which is approx 10-20% faster and we have intellisense woo hoo.
 7
 8b.
 9
10Addendum:
11
12//   ::CommandBar\_Show(m\_pWndEmptyCB->m\_hWnd, FALSE);// 2005 port
13
14   HWND cmdBar=::SHFindMenuBar(this\->GetSafeHwnd());
15
16   ::ShowWindow(cmdBar,SW\_HIDE);