Thread: Cli / Clr / Mfc / Atl / Gdi / Wtf?

  1. #1
    Jack of many languages Dino's Avatar
    Join Date
    Nov 2007
    Location
    Chappell Hill, Texas
    Posts
    2,332

    Cli / Clr / Mfc / Atl / Gdi / Wtf?

    So, I've been lurking around Windows programming for a few years. I have Petzold's Windows Programming 5th Edition and have been going through that, doing some samples.

    I know the book is a few years old now, but a lot of the info seems to still be appropriate for reading and learning.

    Today, if I were to start learning Windows GUI programming, what are my options? I'm pretty sure the latest and greatest might use C#, and that's yet another language I don't know.

    Plus, there seems to be several frameworks, and I get lost in all the jargon. Can anyone distill it in a succinct form?

    Thanks, Todd
    Mainframe assembler programmer by trade. C coder when I can.

  2. #2
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    CLI is the Common Language Interface, a specification of how languages under .Net have to represent their data types to be interoperable. CLR is the Common Language Runtime, the virtual machine of .Net. Neither are a windowing framework.
    .Net's windowing framework is WinForms. It's what you use under C#. (Unless you use GTK#, a binding of the GTK+ toolkit to C# developed by the Mono project.)

    MFC, the Microsoft Foundation Classes, are the ancient behemoth of frameworks.

    ATL, the Active Template Library, is a quite modern template library designed to ease the development of COM components, especially ActiveX components. WTL, which is an extra download, builds upon the ATL to provide a full application framework similar to MFC.

    GDI is the Graphics Device Interface, simply the graphics part of the Win32 SDK. It has been around as long as Windows itself. GDI+ is an alternative based on C++ classes. It's also the base for .Net's graphics capabilities.

    Aside from these, there's the non-MS stuff: Qt, GTK+ and wxWidgets are the most popular cross-platform toolkits.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  3. #3
    Jack of many languages Dino's Avatar
    Join Date
    Nov 2007
    Location
    Chappell Hill, Texas
    Posts
    2,332
    Thanks. Yeah, I forgot to add .NET and .COM and WPF to my list of unknowns. (I can look up the acronyms, I'm just trying to position what category they are in, like ATL - I got that it's a template library, but for what? )

    Quote Originally Posted by CornedBee
    "designed to ease the development of COM components"
    That doesn't help me!!

    And WTL? Sorry - I'm just getting deeper now!
    Mainframe assembler programmer by trade. C coder when I can.

  4. #4
    Jack of many languages Dino's Avatar
    Join Date
    Nov 2007
    Location
    Chappell Hill, Texas
    Posts
    2,332
    Is there a hierarchical picture of all this somewhere?
    Mainframe assembler programmer by trade. C coder when I can.

  5. #5
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Hierarchical?

    .Net
    -> WPF
    -> CLR
    -> CLI
    -> WinForms

    Win32
    -> GDI
    -> GDI+

    COM

    ATL
    -> WTL

    MFC


    Not very exciting, is it?

    Anyway, I suggest you spend some time on Wikipedia with these things.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  6. #6
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    GDI+ is an alternative based on C++ classes. It's also the base for .Net's graphics capabilities.
    I'm sure this is just an oversight but GDI+ is more than just GDI with classes. It has a lot of multi-media based functions that are far more robust and useful than the core GDI. GDI+ gives you the ability to load several different file formats as opposed to just BMPs. It also has an arsenal of windowing 'special effects' that you can use. There is a lot of information about GDI+, however, with the recent advent of Aero in Vista it may be useless. That is if Vista ever becomes the next XP.

    And I would place Win32 at the top of the hierarchy since without it all of the other stuff wouldn't even exist.

  7. #7
    Jack of many languages Dino's Avatar
    Join Date
    Nov 2007
    Location
    Chappell Hill, Texas
    Posts
    2,332
    I have MS VC++ 6.0 Pro at my disposal. Looks like the .NET and COM stuff are out of my reach at this point. (Unless I use VC Studio Express, that is).

    Is this correct?

    I've been reading up on COM on Wikipedia. It's a bit abstract on the whole matter. Not a very good article.
    Mainframe assembler programmer by trade. C coder when I can.

  8. #8
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    COM? AFAIK, ATL & COM can be used within VS6 even.
    However, .NET is out of your reach with it.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  9. #9
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,268
    Today, if I were to start learning Windows GUI programming, what are my options? I'm pretty sure the latest and greatest might use C#, and that's yet another language I don't know.
    Keep in mind that there is nothing wrong in sticking with basic win32 programming (The stuff in Petzold's book).

  10. #10
    Registered User
    Join Date
    Oct 2001
    Posts
    2,129
    I came upon this article the other day... sorry I didn't remember it before. I thought it was very good.

    Finally Understanding COM After Changing a Light Bulb

  11. #11
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by bithub View Post
    Keep in mind that there is nothing wrong in sticking with basic win32 programming (The stuff in Petzold's book).
    Only that it is an incredibly pain in the ass.
    It's better to use some kind of framework.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  12. #12
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,079
    Quote Originally Posted by Elysia View Post
    Only that it is an incredibly pain in the ass.
    It's better to use some kind of framework.
    I might say that depends on the complexity of what you're trying to accomplish. However in most cases, I would agree with you.
    Sent from my iPadŽ

  13. #13
    Jack of many languages Dino's Avatar
    Join Date
    Nov 2007
    Location
    Chappell Hill, Texas
    Posts
    2,332
    I checked with the Corp office. I can get a copy of any of the following.
    • Visual Studio 2005 Pro
    • Visual Studio .NET 2003 w/MSDN lib
    • Visual Studio .NET 2005 w/o the MSDN Lib


    What would be the best choice?
    Mainframe assembler programmer by trade. C coder when I can.

  14. #14
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Visual Studio 2005 and Visual Studio .NET 2005 is the same thing.
    Go for 2005. MSDN is available online anyway.
    With pro, you have access to MFC too, if you want to use it.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  15. #15
    Jack of many languages Dino's Avatar
    Join Date
    Nov 2007
    Location
    Chappell Hill, Texas
    Posts
    2,332
    OK, thanks. VS 2005 pro with Lib!!

    Thanks Elysia. You're a programming master! How the hell do you know every thing?
    Mainframe assembler programmer by trade. C coder when I can.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. MFC support in ATL project
    By Arkanos in forum Windows Programming
    Replies: 2
    Last Post: 01-29-2006, 05:15 PM
  2. WIndows programming?
    By hostensteffa in forum Windows Programming
    Replies: 7
    Last Post: 06-07-2002, 08:52 PM
  3. Release MFC Programs & Dynamic MFC DLL :: MFC
    By kuphryn in forum Windows Programming
    Replies: 2
    Last Post: 05-18-2002, 06:42 PM
  4. Beginning MFC (Prosise) Part III - Now What? :: C++
    By kuphryn in forum C++ Programming
    Replies: 5
    Last Post: 03-03-2002, 06:58 PM
  5. MFC is Challenging :: C++
    By kuphryn in forum C++ Programming
    Replies: 8
    Last Post: 02-05-2002, 01:33 AM