Help understanding .NET

This is a discussion on Help understanding .NET within the Windows Programming forums, part of the Platform Specific Boards category; After studying the C++ language for some time, I want to create a GUI in Visual C++ 2003 .NET I'm ...

  1. #1
    Registered User
    Join Date
    Dec 2001
    Posts
    47

    Help understanding .NET

    After studying the C++ language for some time, I want to create a GUI in Visual C++ 2003 .NET I'm not sure exactly what I am supposed to use. I can't find very many tutorials that work from a "Hello World" tutorial up. And I don't know if .NET is has native GUI API's or I'm supposed to use MFC (which I can't find an updated MFC book that's been written in the past 4 years).

    Of the sites I have found it goes C++/MFC or C#/.NET. C++ can't use .NET? C++ still uses MFC? I'm dumbfounded.

    Tutorials or just general info would be very helpful.

  2. #2
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,265
    C++ can use .NET, but most people choose to stick with MFC (or the native windows API). As for an MFC book, the best is "Programming Windows with MFC" by Jeff Prosise. I've never used .NET so I can lead you to any good tutorials for that, but someone else here can probably oblige.

  3. #3
    Registered User
    Join Date
    Jun 2004
    Posts
    42

    In some cases, MFC is out of date.

    Microsoft seems to stop to update MFC but technical support is available. I think if you want to build normal business application program, C# is the best choice in Win32 platform.

    Using C# to write a GUI "hello world" program is very easy just like VB. Drag a static control to the form to display the "hello world" information, or you can directly invoke MessageBox function to display the information.


    "Programming Microsoft .NET" by Jeff Prosise is recommended to understand actual .NET programming skills. "Essential .NET" by Don Box and "Applied Microsoft .NET Framework Programming" by Jeffery Richter are the best two books for understanding the internal mechanism of .NET platform.

  4. #4
    Even death may die... Dante Shamest's Avatar
    Join Date
    Apr 2003
    Location
    Malaysia
    Posts
    970
    If you're going to use .NET, you'll have to make sure your target user has installed the .NET framework in his computer. It won't run without it.

    If you use MFC, you have to distribute the necessary MFC DLLs along with your application.

    If you use pure API, most of the time you just need to distribute the .exe itself.

  5. #5
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,139
    With C++ you can do different things:

    C++ Win32 Application

    C++ MFC Application ( Framework including Window Classes )

    Managed C++ ( .NET Framework including Window Classes )


    C++ can use .NET. The reason most sites use C# as examples is that unmanaged C++ has one advantage to C#: it's faster. If you give up that advantage and use managed C++, you have all the drawbacks of C++ without the advantages, so it would be better to use C# from the start.

    Managed C++ ( meaning C++.NET ) is usefull when interoparating with unmanaged C++ code or when the preprocessor and macros are extensivly used. If this is not the case, you are way better off using C#, or, if you need that extra bit of speed, normal C++ ( maybe with MFC support ).
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

  6. #6
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,265
    "If you use MFC, you have to distribute the necessary MFC DLLs along with your application"
    No you dont. Every single windows version since windows 3.11 has the MFC dll file included already.

  7. #7
    Registered User
    Join Date
    Dec 2001
    Posts
    47
    well, the reason I went with C++ is simple, Linux. I may use MFC now to create applications, but later, I would like keep myself open to being able to develop Linux or cross-platform applications also.
    Last edited by subnet_rx; 09-02-2004 at 04:24 PM.

  8. #8
    BMJ
    BMJ is offline
    Banal internet user BMJ's Avatar
    Join Date
    Aug 2002
    Location
    Chicagoland
    Posts
    1,380
    Quote Originally Posted by nvoigt
    The reason most sites use C# as examples is that unmanaged C++ has one advantage to C#: it's faster.
    This is true most of the time.

    Personally I find C# to be very straightforward and awesome for GUI applications, but sometimes MC++ is useful because I'm more familiar with C++ than C#.

    Managed C++ and C# both use CLR and interops, they are both adequate for creating .NET applications.

    Also, currently C# assemblies using v1.0 or 1.1 of the .NET framework are compiled completely into MSIL, whereby MC++ is compiled into a mixture of MSIL and x86. But .NET 2.0 will allow C# to compile assemblies as platform specific x86, IA64, or AMD64 (.NET 2.0 will provide 64-bit runtimes)

    As .NET continues to evolve, MC++ will become less and less useful IMHO. (except for small interop functionality and any low-level data processing)



    btw, C# isn't "anti-Linux"... in fact, technically C# is standardized and not platform-specific. See www.mono-project.com
    Last edited by BMJ; 09-02-2004 at 04:31 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. migrate from .Net 2.0 to .Net 3.0
    By George2 in forum C# Programming
    Replies: 3
    Last Post: 07-25-2007, 05:07 AM
  2. Some .NET Distribution Stats
    By nickname_changed in forum C# Programming
    Replies: 2
    Last Post: 05-14-2005, 04:41 AM
  3. IE 6 status bar
    By DavidP in forum Tech Board
    Replies: 15
    Last Post: 10-23-2002, 06:31 PM
  4. .net
    By ygfperson in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 02-15-2002, 01:15 AM
  5. Visual J#
    By mfc2themax in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 10-08-2001, 03:41 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21