Thread: Windows and C++

  1. #1
    Registered User
    Join Date
    Sep 2003
    Posts
    8

    Windows and C++

    Well, like I said in my other post I just finished "Teach Yourself C++ in 21 Days". I'd like to now start to learn how to create programs that can do "useful" things in windows. So, are there any good books you would recommend or any useful links on the subject. Also if you could give a quick run through of just the basics of what I'll need to do to accomplish my goal, just because I'm a little lost on the subject right now. Also how do you pronounce "C#", I've been wondering this for a while. haha, thanks for all the help.
    -Peace

  2. #2
    Senior Member joshdick's Avatar
    Join Date
    Nov 2002
    Location
    Phildelphia, PA
    Posts
    1,146
    C# is pronounced "see sharp".

    As for "useful" programs, I think that's dangerous thinking. Sure, it might look more impressive to have a GUI and spiffy graphics, but it's much more important that you learn programming concepts. I suggest you wait until you have a very good grasp on a language before dressing up your programs.
    FAQ

    "The computer programmer is a creator of universes for which he alone is responsible. Universes of virtually unlimited complexity can be created in the form of computer programs." -- Joseph Weizenbaum.

    "If you cannot grok the overall structure of a program while taking a shower, you are not ready to code it." -- Richard Pattis.

  3. #3
    Registered User
    Join Date
    Sep 2003
    Posts
    8
    Thanks for the info. But when I say "useful" programs I don't mean GUI programs. Just programs that can do things in windows that will help with tasks. Like the ability to edit the registry, catalog files, I'm really interested in making networking progs and whatnot. So along the lines of that what do you recommend? Thanks.
    -Peace

  4. #4
    Amateur
    Join Date
    Sep 2003
    Posts
    228
    You should take a look at the Windows API, the reference on the subject is Programming Windows by Charles Petzold at Microsoft Press. However, I cannot tell more as I couldn't buy the book myself, they don't sell it here...
    MSDN is the greatest reference (but only a reference through because searching a good tutorial among all these files) on all Windows Programming.
    When you are finished with the book or have acquired some knowledge in the domain, you should learn, something you want among the following:
    - learn MFC
    - learn about COM and OLE
    - learn .NET programming
    - learn DirectX or OpenGL
    - learn sockets programming

    By the way, I don't think you will be able to learn all the APIs as it is huge...

  5. #5
    Registered User
    Join Date
    Sep 2003
    Posts
    8
    Ahh, thank you very much. I'll look into that book. I think I work best with books. Thanks again.
    -Peace

  6. #6
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398

    Thumbs up Petzold!

    The Petzold book is considered the "gold standard". It is both a tutorial and a reference. He assumes that you know C. He doesn't use C++, but don't let this bother you... You can use the WinAPI functions in C++. He doesn't assume any prior knowledge of Windows programming. Oh, the one thing that makes it a little less useful as a self-learning book, is that there are no questions/answers - exercises/solutions. I really liked the learning-structure that gives to the "21 Days" book.

    One warning - I was shocked to see how complicated his "Hello Windows" program is! I only recognized a few lines of code... it almost looked like another language.

    There is a very similar book by Herbert Schildt, called Windows Programming From the Ground Up. Some people hate Schildt, but this particular book is OK. I bought it because there was something I couldnt find in Petzold... Turns out it was in Petzold, but I couldn't find it... and the Schildt book had more details on this particular subject.

    [EDIT]
    BTW - Just in case you've never studied music... the # symbol is a from music. C# is one half-note up in pitch from a C. This is the same as D-flat, which is written as Db... Well, actually the b is written next to the note symbol rather than the letter "D". So, if you hear someone say D-flat, you'll know what they are talking about.
    Last edited by DougDbug; 09-26-2003 at 02:25 PM.

  7. #7
    Registered User
    Join Date
    Sep 2003
    Posts
    8
    Crap, I don't really know any C. Do you think I should learn C before I go to something like that? Also, do you have any ebooks for any good programming books. I respect Intellectual property so I read the first chapter or two and if I still like it then I go out and buy the book. If anyone has any good ebooks that they can share you can just email me or pm me. Thanks.
    -Peace

  8. #8
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398

    Talking NO!

    Crap, I don't really know any C. Do you think I should learn C before I go to something like that?
    NO!

    If you know C++, you know enough C. C++ is C with added features (mostly). There are probably some things that you haven't learned the C-way, but the C stuff in Petzold's book is simple.

    It's the use of the zillions of WinAPI functions, and the number of lines of "overhead" code that makes Windows programming difficult.
    Last edited by DougDbug; 09-26-2003 at 04:38 PM.

  9. #9
    Registered User
    Join Date
    Sep 2003
    Posts
    8
    Thanks man, I really do appreciate the help. Do you know of any places I could check out some ebooks?

  10. #10
    Amateur
    Join Date
    Sep 2003
    Posts
    228
    Widnows Programming does really not look like C for starters as most people programming with that add to the zillions of functions the zillions of redefined types and macros... With that is the "special" MS coding style which makes names long... so long...
    But I think the thing that took me most time to understand in Widnows programming was the COM architecture...

    So, a good piece of advice I could give you is that you should stick with the Windows-defined stuffs until you understand what it is really, then do what you want.

  11. #11
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398
    Sorry, I don't know of any ebooks. But here are the "famous" Sunlight tutorials.

Popular pages Recent additions subscribe to a feed