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?
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.
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
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 05:26 PM.
This war, like the next war, is a war to end war.
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 05:37 PM.
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
Petzold!!!
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.what will i need to learn before reading that book?
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.Should i stick to DOS graphics before i learn WIN API?
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 05:58 PM.
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.
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
Playsound() is supposed to work with normal dos.
This war, like the next war, is a war to end war.
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
> 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
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)
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 09:53 PM.
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.
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