Get puzzled. .Net vs MFC

Started by
16 comments, last by jtagge75 15 years, 2 months ago
Quote:Original post by tonald
Sorry...
But I want to learn C++.
Should I use MFC or .NET
Thank you


You don't seem to understand... if MFC and .NET are both "on the table" as options then C++ is *not* on the table as an option... C++/CLI is the managed version of C++ (which would allow you to use the .NET framework), and it is not the same language as C++.

Your fundamental misunderstanding of this is the reason I suggested that you start with something like C#. It is a nicer language to work with, and it will ease you into the "curly braces" family of languages from your VB experiences.

If you definitely want to use C++, then .NET is not an option, and you need to use MFC or another native approach to your GUI development.
Advertisement
Quote:Original post by smitty1276
Quote:Original post by tonald
Sorry...
But I want to learn C++.
Should I use MFC or .NET
Thank you


You don't seem to understand... if MFC and .NET are both "on the table" as options then C++ is *not* on the table as an option... C++/CLI is the managed version of C++ (which would allow you to use the .NET framework), and it is not the same language as C++.

Your fundamental misunderstanding of this is the reason I suggested that you start with something like C#. It is a nicer language to work with, and it will ease you into the "curly braces" family of languages from your VB experiences.

If you definitely want to use C++, then .NET is not an option, and you need to use MFC or another native approach to your GUI development.


This is not entirely true. MFC is a C++ library so you could in fact use it with regular C++, though WHY anyone would want to go through that pain is beyond me. It was written pre-Standard C++ and so uses a bunch of idioms of the day ... similar to how Qt works.

But as everyone else said this is mostly a silly question. You won't use either one for gaming unless you wanna do Managed DirectX or C# programming. If you wanna be a tools programmer, I'd suggest going and learning C# as a lot of that side of the business has moved over to C#, but for game programming, it's pretty much 95% pure straight C++ with about 3% ASM and 2% Other. (And the ASM is just inlined into the C++ code.
Quote:Original post by keltor2243
Quote:Original post by smitty1276
Quote:Original post by tonald
Sorry...
But I want to learn C++.
Should I use MFC or .NET
Thank you


You don't seem to understand... if MFC and .NET are both "on the table" as options then C++ is *not* on the table as an option... C++/CLI is the managed version of C++ (which would allow you to use the .NET framework), and it is not the same language as C++.

Your fundamental misunderstanding of this is the reason I suggested that you start with something like C#. It is a nicer language to work with, and it will ease you into the "curly braces" family of languages from your VB experiences.

If you definitely want to use C++, then .NET is not an option, and you need to use MFC or another native approach to your GUI development.


This is not entirely true. MFC is a C++ library so you could in fact use it with regular C++, though WHY anyone would want to go through that pain is beyond me. It was written pre-Standard C++ and so uses a bunch of idioms of the day ... similar to how Qt works.

But as everyone else said this is mostly a silly question. You won't use either one for gaming unless you wanna do Managed DirectX or C# programming. If you wanna be a tools programmer, I'd suggest going and learning C# as a lot of that side of the business has moved over to C#, but for game programming, it's pretty much 95% pure straight C++ with about 3% ASM and 2% Other. (And the ASM is just inlined into the C++ code.

MFC has MVC unlike other existing Microsoft options.
Windows Forms/MFC Programming Differences
Anyways I totally second everything Toolmaker already stated above since that's what I would've said if he hadn't already!

[Edited by - daviangel on January 28, 2009 6:56:22 PM]
[size="2"]Don't talk about writing games, don't write design docs, don't spend your time on web boards. Sit in your house write 20 games when you complete them you will either want to do it the rest of your life or not * Andre Lamothe
Quote:Original post by keltor2243
This is not entirely true. MFC is a C++ library so you could in fact use it with regular C++
That's actually exactly what I said... [grin] I think my first sentence was confusing (even to me looking back)... I just meant that if the options include .NET, you have already ruled out pure C++.
Quote:Original post by keltor2243
This is not entirely true. MFC is a C++ library so you could in fact use it with regular C++, though WHY anyone would want to go through that pain is beyond me. It was written pre-Standard C++ and so uses a bunch of idioms of the day ... similar to how Qt works.


I had the pleasure (or misfortune) to work on a game editor that was all done in MFC. It was a serious learning curve to get what was going on but once you were past that it was a lot simplier then straight C++/Win32 to get new things running properly.



Quote:Original post by jtagge75
Quote:Original post by keltor2243
This is not entirely true. MFC is a C++ library so you could in fact use it with regular C++, though WHY anyone would want to go through that pain is beyond me. It was written pre-Standard C++ and so uses a bunch of idioms of the day ... similar to how Qt works.


I had the pleasure (or misfortune) to work on a game editor that was all done in MFC. It was a serious learning curve to get what was going on but once you were past that it was a lot simplier then straight C++/Win32 to get new things running properly.

Yeah it's because MFC is a MVC GUI framework, that uses the Document/View architecture which adds alot of extra files that complicates things IMO.
[size="2"]Don't talk about writing games, don't write design docs, don't spend your time on web boards. Sit in your house write 20 games when you complete them you will either want to do it the rest of your life or not * Andre Lamothe
Quote:Original post by Cygon
C++, just C++.

You need a C++ compiler like Visual C++ 2008 Express,
and the DirectX SDK, which can be freely downloaded from Microsoft.

Don't get this wrong, but if you're already having difficulties figuring out the difference between C++, C++/CLI, .NET and MFC (which can all be looked up on wikipedia) maybe you should look for a decent book that teaches you the basics step by step.

-

C++ = Programming language that compiles to machine code. Can use DirectX.

DirectX = Headers and code for C/C++, used to interface with your hardware (eg. 3D graphics card)

MFC = Headers and code for C/C++, used to create complex dialog-based windows applications.

.NET = similar to Java, bytecode language, bytecode compiler, large library of common code

C# = Programming language that compiles to the .NET bytecode language, requires a wrapper like XNA or SlimDX to use DirectX

C++/CLI = Programming language that compiles to the .NET bytecode language but can also use of C++ libraries.


Thank you very much
All of you help me a lot.
Quote:Original post by daviangel
Yeah it's because MFC is a MVC GUI framework, that uses the Document/View architecture which adds alot of extra files that complicates things IMO.


Yeah I would not use it again unless I really had to. If I couldn't use C# I would stick with Win32 and using dialogs so that I could use the dialog editor to create the windows.

This topic is closed to new replies.

Advertisement