wich book to start windows programming??

This is a discussion on wich book to start windows programming?? within the A Brief History of Cprogramming.com forums, part of the Community Boards category; Hello , I want to start learning Windows Programming. I heard there are 3 ways of creating windowed programs: 1. ...

  1. #1
    csd@auth
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    71

    Question wich book to start windows programming??

    Hello , I want to start learning Windows Programming.

    I heard there are 3 ways of creating windowed programs:
    1. Win32 API
    2. using MFC classes
    3. with CLI C++ or .NET or whatever it is called..

    As a starter,
    I chose the first way because it begins from the basics and it deepens more than the others.

    I borrowed the so-called book "Programming Windows" Charles Petzold.

    Can you tell me if I chose the right way? What else would you suggest me to do ?

    p.s. this book is really huge and i don't want to learn so many things I won't use later...

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Aside from the three choices you show, there are various "third party" libraries that allow you to develop not only Windows applications, but also apps that work on for example Linux. wxWidgets is one of those.

    MFC is relatively easy to get an application going with. The direct Win32 API is a bit more "complicated", but if you do understand it, it's going to help with any and all other layers (because somewhere, someway, that's essentially the only way to actually do anything).

    As to books, I've heard good things about the Charles Petzold books, so it's certainly not a bad thing.

    When it comes to "learning more than you need", it very much depends on what you want to do - but graphical user interface applications are ALWAYS going to be somewhat of a complicated project [unless the application is REALLY simple].

    --
    Mats

  3. #3
    csd@auth
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    71
    OK, thanks for your answer, one last thing to clarify:

    Is it like what it is said " learn first C to understand basic stuff ( pointers etc) and the continue with c++"
    so here, learn win32 api and then go with mfc or whatever?

  4. #4
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    Yes, except that unlike the C-before-C++ advice, this one is actually a good idea.
    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

  5. #5
    csd@auth
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    71
    Quote Originally Posted by CornedBee View Post
    Yes, except that unlike the C-before-C++ advice, this one is actually a good idea.
    Heh, I've no more hesitations now!

    @ CornedBee : Your laconic phrase totally convinced me!

  6. #6
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by CornedBee View Post
    Yes, except that unlike the C-before-C++ advice, this one is actually a good idea.

    I agree with this completely and the above to some extent. C++ is a different language than C - it can be used in a very similar way, but for "correct use" of C++, it should be considered a completely different language.

    When it comes to "learn Win32 API first, then MFC", there's some truth in that - if you can write code for Win32, then MFC is really trivial for most things, both because it does the same things as the API, and because the MFC "simplifies" things - there are many things that are just a single call in MFC, whilst half a dozen calls in Win32 API.

    The problem comes when the MFC framework isn't doing enough/the-right-thing for what you want your application to do...

    --
    Mats

  7. #7
    Deathray Engineer MacGyver's Avatar
    Join Date
    Mar 2007
    Posts
    3,211
    Not to get into another debate with C vs C++, but I think it's easier to move from C to C++ than it is the other way around. Regardless, C++ is a separate language, although it allows you to write everything in a C-style format.

  8. #8
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    Quote Originally Posted by MacGyver View Post
    I think it's easier to move from C to C++ than it is the other way around.
    I would disagree, simply because of the number of features C++ has that C doesn't, but that's not the point. The point is that learning C in order to learn C++ is nonsense. If you want to learn C++, learn C++.
    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

  9. #9
    Deathray Engineer MacGyver's Avatar
    Join Date
    Mar 2007
    Posts
    3,211
    Quote Originally Posted by CornedBee View Post
    I would disagree, simply because of the number of features C++ has that C doesn't, but that's not the point.
    That was my point. If you're a C programmer writing a C++ program, the classes that make up the C++ library are quite safer and easier to use than many C counterparts.

    Also, as a last resort, if you get stuck with something, you can always write it out the C way, so you're not always fully stuck (even if that isn't advisable).

    Going from C++ to C, you end up realizing that all kinds of nice features don't exist, and you're stuck doing relatively simple things in a very round-about and low level manner than what you may be used to. By the end of the day, if you've grown accustomed to C++ features, you'll probably stick with them and discard C, depending upon your end goals.

    Quote Originally Posted by CornedBee View Post
    The point is that learning C in order to learn C++ is nonsense. If you want to learn C++, learn C++.
    While you'll learn to do things properly in a C++ sense if you learn C++ first, you'll have a lot of confusion as to why C++ provides backwards compatability with many C features.... ie. Why do some functions need C style strings? etc. etc..

    But overall, your code should be safer from a C++ perspective. Outside of C vs C++, I think learning C leads you to a closer view of machine architecture and how things run more closer to reality. If you wish to learn assembly at one point, I would think you're better off learning C. C++ uses a lot of C tricks behind the scenes to get stuff done, but it's a little harder to see what's going on if you're not well grounded in the basics.

    If you just want to write programs in C++ because you like the language, go for it.

    After all, what languages you learn depends upon your end goals.

  10. #10
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    I never saw the difference going to C from C++. You go through a few more motions to do the same thing, a lot of pointer passing, but it's not drastically different. It just gets me in the mindset to use C++ techniques while using a C library.

  11. #11
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,859
    Quote Originally Posted by kantze View Post
    Hello , I want to start learning Windows Programming.

    I heard there are 3 ways of creating windowed programs:
    1. Win32 API
    2. using MFC classes
    3. with CLI C++ or .NET or whatever it is called..

    As a starter,
    I chose the first way because it begins from the basics and it deepens more than the others.

    I borrowed the so-called book "Programming Windows" Charles Petzold.

    Can you tell me if I chose the right way? What else would you suggest me to do ?

    p.s. this book is really huge and i don't want to learn so many things I won't use later...
    You can also create Windows apps with VB6.
    VB.NET and C# are covered under .NET.

    Petzoid is a good start into WIN32. MSDN is vital as well (though much harder to use...).

    I would also get a copy of MS Visual Studio. Is the only IDE ('compiler') I have used professionally. Knowing how to fully use your IDE is an important/vital skill.

    If I was starting now, I would start learning C# for a career or C++ WIN32 then MFC for a hobby. Depends on what you want to program

    I learnt WIN32, then MFC (then VB, C# ect). This has allowed me to understand the advantages of the various APIs/Frameworks and choose the right tool for the job.

    My personal choice for apps is a combo of WIN32 C++ / MFC. MFC for the quick development time and WIN32 for the bits MFC can't reach.
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Borland C++ Editor, Where to start a Windows Application?
    By Mythic Fr0st in forum Windows Programming
    Replies: 2
    Last Post: 03-26-2007, 09:40 PM
  2. how to make my program run on windows start up
    By kantze in forum A Brief History of Cprogramming.com
    Replies: 7
    Last Post: 03-24-2007, 12:14 PM
  3. looking for Windows Programming in C book...
    By o0obruceleeo0o in forum Windows Programming
    Replies: 7
    Last Post: 10-15-2002, 08:38 AM

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