Best way to learn Windows programming ?

The Partridge Family were neither partridges nor a family. Discuss.
Post Reply
Neto_D_Walker
Posts: 3
Joined: April 20th, 2013, 8:12 pm

Best way to learn Windows programming ?

Post by Neto_D_Walker » April 20th, 2013, 8:20 pm

I cannot seem to figure Chili's framework... i mean, i can understand the codes he gives us... but i dont get why he is putting other things in other files and such things... and i dont get why some codes must be after the compose frame... i need help O.e :shock:

Musi
Posts: 106
Joined: November 25th, 2012, 1:06 am

Re: Best way to learn Windows programming ?

Post by Musi » April 21st, 2013, 1:17 am

Putting things in separate files is good in many ways, it makes the codes easier to read, usually easier to debug and it will re-compile faster because only the files that have been edited need to be compiled instead of the whole project.

The different files group together related code, like Windows.cpp has all the code for creating a window and a message loop (every Windows program needs these), the D3DGraphics files contain all the code to set up DirectX and also contains any drawing functions.
Musi

There are 10 types of people that understand binary.
Those that do, and those that don't.

Neto_D_Walker
Posts: 3
Joined: April 20th, 2013, 8:12 pm

Re: Best way to learn Windows programming ?

Post by Neto_D_Walker » April 21st, 2013, 12:33 pm

It makes sense as the compiler wont have to debug it again... but what about the rest of the framework ? im just at tutorial 12, is he going to explain the rest of the codes at his framework ? will he teach us to build our own framework ?

Musi
Posts: 106
Joined: November 25th, 2012, 1:06 am

Re: Best way to learn Windows programming ?

Post by Musi » April 21st, 2013, 4:25 pm

He goes over the framework in the intermediate lessons i think. It's basically made to separate the Win32 code and the DirectX code from you game logic.

To understand what the windows.cpp file does I'd recommend reading "Windows Programming fifth edition" by Charles Petzold, it has all you need to know about creating a window and the message loop. As for DirectX you could get a DirectX 9 book, but in my opinion you'd be better finishing the tutorials and then start learning DirectX 11 cause the way things are done has changed a fair bit. That's if your graphics card supports it of course.
Musi

There are 10 types of people that understand binary.
Those that do, and those that don't.

Neto_D_Walker
Posts: 3
Joined: April 20th, 2013, 8:12 pm

Re: Best way to learn Windows programming ?

Post by Neto_D_Walker » April 24th, 2013, 5:01 pm

I see, thanks for the help... I plan to master C++ in DOS first, then I'll read the book :D

User avatar
DreamBliss
Posts: 30
Joined: March 27th, 2013, 11:48 pm
Location: Lost on the Way
Contact:

Re: Best way to learn Windows programming ?

Post by DreamBliss » May 16th, 2013, 2:16 am

Imagine you are creating a 3D video game. Well one single file could be 10,000 lines or so in length. Probably more. So you have different files and different classes and different functions. You may have a terrain source code page. An animation page. A model page. Or even these may be split up. Perhaps you have a terrain page for the general terrain and another for tools. That's why you use different pages or source files. Makes it easier to edit stuff, to spread the code amongst other coders, etc.
You create reality in your mind,
Before experiencing it as reality,
So if you want to change something,
First change what you think about it.

Syncan
Posts: 58
Joined: May 13th, 2013, 2:09 pm
Location: Holland

Re: Best way to learn Windows programming ?

Post by Syncan » June 1st, 2013, 10:27 am

Musi wrote: As for DirectX you could get a DirectX 9 book, but in my opinion you'd be better finishing the tutorials and then start learning DirectX 11 cause the way things are done has changed a fair bit. That's if your graphics card supports it of course.
What book about DirectX would be recommended? Is this one a good one?

Clodi
Posts: 175
Joined: November 18th, 2012, 7:47 pm

Re: Best way to learn Windows programming ?

Post by Clodi » June 6th, 2013, 12:19 am

@Musi

"Windows Programming fifth edition" by Charles Petzold
Is probably the book I'll end up buying. Are you sure it's accessible enough for people like me who started off with Chili's tutorials? I have been away for a while but I reckon you know "my level" as I haven't learned anything new from "BoxWar"..

I have finally finished my exams and now I have a lot of free time and I am keen to keep learning C++ and Windows programming but I looked up online and the book you suggest is apparently the size of a couple of dictionaries XD

Is it worth the investment if all I care is being able to write my own framework from scratch?
I am really looking for something very much like a "textbook" to be able to follow along with Chili's stuff. It took me a long while to get through arrays, strings and pointers and I really think I'll get lost trying to find my way around the framework without a book.

Thanks a lot,
Clodi :)

nG Inverse
Posts: 115
Joined: April 27th, 2012, 11:49 pm

Re: Best way to learn Windows programming ?

Post by nG Inverse » June 9th, 2013, 6:26 am

For learning new APIs (like for Windows and DirectX), I actually don't suggest reading books! Reason is, many only cover one way on how to approach the API.

What I have done with DirectX is gone through MANY tutorials, both video and text, to see the different ways people go at the API. There are many different routes, all of which should be learned so you can decide which would be best for what you are trying to do (like Chili's isn't necessarily the best for creating games!). Purchasing a couple books too, though, couldn't be hurtful. It just seems like a lot of money for little gain.

Post Reply