going into windows programming

This is a discussion on going into windows programming within the C++ Programming forums, part of the General Programming Boards category; What is the best way to learn C++ windows API? I'm looking for books(any suggestions??), while reading the relisoft tutorials. ...

  1. #1
    Linux Forever
    Join Date
    Oct 2002
    Posts
    373

    going into windows programming

    What is the best way to learn C++ windows API? I'm looking for books(any suggestions??), while reading the relisoft tutorials. Relisoft is confusing me, they don't have enough comments. The hardly have any!

    Any suggestions?
    This war, like the next war, is a war to end war.

  2. #2
    Registered User matheo917's Avatar
    Join Date
    Sep 2001
    Posts
    279
    I must definately recommand the book by Charles Petzold "Programming Windows" and I'm sure a lot of people would as well ---> Petzold is the man and he knows how to pass on info about Win API

  3. #3
    Linux Forever
    Join Date
    Oct 2002
    Posts
    373
    Im still kind of a newbie that can do dos non-graphics. I've been programming text games for 1/3 of a year and am bored of dos. Being still a newbie, what will i need to learn before reading that book?

    *edit*
    I am looking at the getting started page now, through amazon. It says i should know C first. Should i stick to DOS graphics before i learn WIN API? Because i cannot get a decent tutorial that works with Dev C++ 4, all have errors in them. I have the borland compiler, but i cannot figure out how to set it up. Currently, i cannot even do playsound() due to compiler erros.
    Last edited by Blizzarddog; 03-04-2003 at 04:26 PM.
    This war, like the next war, is a war to end war.

  4. #4
    Registered User SAMSAM's Avatar
    Join Date
    Nov 2001
    Posts
    218
    petzold,s book is detailed , desiplined, correct, and covers many
    corners. i got it a few years ago and even now, its still so
    relevant. if only other writers would write like him who is writing
    for beginners ,and not for his peers(to impress).

    unfortunatley for you blizzarddog, its written in C which is just
    the way i like it. but i am sure you will still learn a lot from it.

    cheers!
    Last edited by SAMSAM; 03-04-2003 at 04:37 PM.

  5. #5
    Registered User matheo917's Avatar
    Join Date
    Sep 2001
    Posts
    279
    i would recommand getting (at first) a different compiler, for instance Microsoft Visual C++ (.NET or 6.0) but that's not a necessity...

    anyway, ideally it would be best to fairly efficient with either C or C++ (use of classes especially) prior to starting this book, because mastering WIN API is an enourmous task which enbodies a heavy use of abstraction, but nonetheless it's your choice

    to answer your question on sticking do Dos graphics: well, you see, the whole idea of "making windows" pop up on the screen has to do with a great knowledge of designing screen interfaces, whether it would be under Dos or Windows, so i would say it's kind of irrelevant if you dive in a bit deeper into "Dos" graphics or not...........


    anyway........... why don't you visit the "Windows Programming" forum on this website and try to ask more detailed questions there, as well as searching the board itself ---> i'm sure you'll find a lot of discussions with similar questions

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

    Thumbs up

    Petzold!!!

    what will i need to learn before reading that book?
    The C code in Petzold's book is not that difficult. But, the windows specific functions and structures can be complex and there are lots of 'em! (His first "Hello Windows" example is about 50 lines of code!) You can get the book now and start playing with the windows stuff. If find you need to learn more C++ to impliment your programs, you can dig back into it.

    Should i stick to DOS graphics before i learn WIN API?
    I don't think so. Simple graphics are easy once you've got a windows program... I think you could a a circle in that "Hello Windows" window with one additional line.

    The one reason I can think of to learn "DOS graphics" is to learn a multi-platform graphics library.
    Last edited by DougDbug; 03-04-2003 at 04:58 PM.

  7. #7
    Linux Forever
    Join Date
    Oct 2002
    Posts
    373
    I have VC++ Standard. But it hogs to much space. The setup file alone is 256 megabytes. Then installed its like 500 megs! We have a 13 gig harddrive and we will resort to that if needed. Dev C++ can't even do playsound(). And even DOS graphicss are impossible with it. So i have to stick to text. That is until i can get enough free space to get VC++ back up and running.
    This war, like the next war, is a war to end war.

  8. #8
    Geek. Cobras2's Avatar
    Join Date
    Mar 2002
    Location
    near Westlock, and hour north of Edmonton, Alberta, Canada
    Posts
    113
    DOS Graphics are impossible with VC++ as well.. you need a true DOS, or at least DOS protected mode, compiler, to do DOS graphics - at least as far as I know. (i.e. one like DJGPP)
    As for playsound() is that from DirectX? if it is, I believe you need to download the DirectX SDK (which is like 120mb or something if I remember correctly..) and I'm not sure if it works with anything other than VC++ or not.. I believe it does but I never tried.
    James G. Flewelling
    Rgistered Linux User #327359
    Athabasca University Student (BSc. CIS)

    http://catb.org/~esr/faqs/smart-questions.html
    http://catb.org/jargon/

    http://www.ebb.org/ungeek
    ---GEEK CODE---
    Version: 3.12
    GCS/IT/M d- s+:++ a-->->>+>++>+++>? C++++>$ UL++>++++$ P++>++++ L++>++++$
    E W++ N o? K? w++(--)>--- O? M? V? PS--(---) PE Y+ PGP? t 5? !X R(*)>++
    tv-->! b++(+++)>++++ DI? D+++(---)>++++$ G e*>++$ h++>*$ r!>+++ y?
    ----/GEEK CODE----
    upd: 2005-02-11

  9. #9
    Linux Forever
    Join Date
    Oct 2002
    Posts
    373
    Playsound() is supposed to work with normal dos.
    This war, like the next war, is a war to end war.

  10. #10
    Registered User
    Join Date
    Feb 2003
    Posts
    162
    try MFC....we were orginally were learning API, but it was just so tedious...2 pages of code ot make a window with a title, and our name in the center.....MFC is alot easier imo, and looks cooler

  11. #11
    Geek. Cobras2's Avatar
    Join Date
    Mar 2002
    Location
    near Westlock, and hour north of Edmonton, Alberta, Canada
    Posts
    113
    > playsound() is supposed to work with normal dos.
    Ah, okay.. but is it part of some API or something? If it is, do you actually have the API or something? Also it may be that if it's for DOS, you might aactually need a DOS compiler (like DJGPP) to get it to work, because I believe Dev-C++ only does windows console apps? And those aren't true DOS, so alot of stuff made for true DOS won't work right.
    James G. Flewelling
    Rgistered Linux User #327359
    Athabasca University Student (BSc. CIS)

    http://catb.org/~esr/faqs/smart-questions.html
    http://catb.org/jargon/

    http://www.ebb.org/ungeek
    ---GEEK CODE---
    Version: 3.12
    GCS/IT/M d- s+:++ a-->->>+>++>+++>? C++++>$ UL++>++++$ P++>++++ L++>++++$
    E W++ N o? K? w++(--)>--- O? M? V? PS--(---) PE Y+ PGP? t 5? !X R(*)>++
    tv-->! b++(+++)>++++ DI? D+++(---)>++++$ G e*>++$ h++>*$ r!>+++ y?
    ----/GEEK CODE----
    upd: 2005-02-11

  12. #12
    Registered User matheo917's Avatar
    Join Date
    Sep 2001
    Posts
    279
    to respond to Jamsan's post:

    that's one way of going about learning to program in "Windowed Environmnet" however you don't really learn the inner workings with just MFC as you would if you dedicate time to learn Win API, in result what would you do if writing a program using MFC you would encounter the problem that would require the full understanding of API??? with just the MFC knowledge you would probably go for " a walk" (lol)


    anyway, don't forget ( EASINESS != QUALITY)

  13. #13
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,642
    Here's what I did.....buy/read the Petzold book (its awsome). Look up the API's on MSDN as you read about them and type in the examples and try out some of your own stuff. Go through the entire book this way and really get to know the Win32 API and what message-loop programming in C is all about (which what Xlib programming is about in X-Windows). With that foundation - learn MFC. If you understand C based Win32 programming you will appreciate the C++ framework that MFC provides and be able to apply it easiear/better than those who jumped right into MFC first.
    I apply this same argument to those who want to lear C++ before learning C. If I may extend this analogy even more, we (my wife and I) just read that you shouldn't put you're newborns in "walker" type gadgets. Apparently because learning to walk before you learn to crawl ain't good.

    gg
    Last edited by Codeplug; 03-04-2003 at 08:53 PM.

  14. #14
    Linux Forever
    Join Date
    Oct 2002
    Posts
    373
    Am i to young to understand the book? I was born in 1991. Not really, but i can't give out my real age. Im much younger then fifteen.
    This war, like the next war, is a war to end war.

  15. #15
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,642
    If you know how to read you're good to go. If you don't consider yourself an expert at C programming you might want to start there before jumping into C++ (or windows programming for that matter).

    gg

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Windows 98/2000 programming in Windows XP
    By Bill83 in forum Windows Programming
    Replies: 3
    Last Post: 07-22-2005, 02:16 PM
  2. Dialog Box Problems
    By Morgul in forum Windows Programming
    Replies: 21
    Last Post: 05-31-2005, 05:48 PM
  3. dual boot Win XP, win 2000
    By Micko in forum Tech Board
    Replies: 6
    Last Post: 05-30-2005, 02:55 PM
  4. SDL and Windows
    By nickname_changed in forum Windows Programming
    Replies: 14
    Last Post: 10-24-2003, 12:19 AM
  5. IE 6 status bar
    By DavidP in forum Tech Board
    Replies: 15
    Last Post: 10-23-2002, 05:31 PM

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