Migrate VC++ 6.0 MFC code to C#.NET Guide?

I have written a huge amount of generic tools in VC++ 6.0 that derive from MFC classes.  Needless to say, I love my tools, but now I'm facing a situation where I cannot use my existing code for my largest client.  I am *required* to use C#.NET.  I've been porting my most critical classes to C#.NET and I'm having some success, but it's slow and painful.  In all my searching, I cannot find any good resource for migration.  What I'm looking for is just this:  A table that shows two columns, Column 1: MFC, Win32, etc., Column 2: C#.NET Equivalent.  For example (I know these are pretty obvious...):

Win32:
GetSystemMetrics = System.Windows.Forms.SystemInformation

MFC:
CRect = System.Drawing.Rectangle
CWnd::GetClientRect = System.Windows.Forms.ClientRectangle
CArray = System.Collections.CollectionBase (sortof)

etc.

  I've spent over 20 hours in the past month searching for such a beast, can anyone help?  Thanks!

Douglas Holt
douglasholt@cox.net
DouglasHoltAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Chester_M_RagelCommented:
0
DouglasHoltAuthor Commented:
 Useful, yes.  I've read it.  The differences between C++ and C# I've gotten past.  I'm looking for a listing that shows the MFC classes and how they translate to C#.NET, which would be Windows.Forms.  Also, there are lots of Win32 commands that I've always used, and now I have to figure out how the .NET framework exposes these functions.  I can't find a translation table anywhere.  I am slowly building my own, but there are tons left and I have to research each one separately.   It's killing me for time.

  Keep the ideas rolling!!!  Thanks again.
0
DouglasHoltAuthor Commented:
Another note:  I'm slowly coming to the conclusion that there are no decent guides for migrating from VC++ with MFC to C# with Windows.Forms because C# with Windows.Forms is severly lacking compared to VC++ with MFC.  Please, someone tell me I'm wrong!!!
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Chester_M_RagelCommented:
I think you are true about fact. But I can't accept the reason for that...
0
DouglasHoltAuthor Commented:
Chester,

  Sorry, I'm don't quite understand your last comment...  I still need to migrate my code to C#.NET using Windows.Forms, my client *requires* it.  I'm just trying to understand why there are no migration guides.  And if there are, where are they?  Any help in the right direction will be of great value.
0
Chester_M_RagelCommented:
I found a palce at last I think :)... I said so b'cos you can find equivalents for most of the MFC in C#..

http://www.flounder.com/csharpfactoids.htm
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
DouglasHoltAuthor Commented:
<< I found a palce at last I think :)...  >>

  Excellent!  Yes, just what I've been looking for.  I'll contribute the map I've been creating to his efforts...

<< I said so b'cos you can find equivalents for most of the MFC in C#.. >>

  Sorry, I guess I was just frustrated at the moment due to lack of template classes like CArray.  Using CollectionsBase to create a strongly typed array is a lot of work when you're used to one line like the following:

typedef CArray<CMyClass, CMyClass> CMyClassArray;

  Oh, so elegant and extremely powerful.  But alas, C# has no way to do this.  I would love to be shown the light if I'm missing something!

  Thanks again for your help, I accept your answer and award you the points!

Douglas Holt
douglasholt@cox.net


0
Chester_M_RagelCommented:
Thats true.. I think they are comming up with good template classes in .NET Framework 2.0..

I'm happy that you got a good guide fo finish your work... Good luck,

Chester.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.