You might also want to try the Game Programming Genesis by Joseph Farrell right here at GameDev.
Just go to Articles & Resources section and you can find it on Programming\Game Programming.
The first few articles are oriented to guide you throw GDI and DirectDraw. I''ve learned a lot from them.
Hope it helps you.
I HATE WINDOWS PROGRAMMING!!!
Windows Game programming for dummmies...read it 6 chapters dedicated to windows programming (and the rest to directx and game programming). It will teach you all you need to know. At least the basics anyway....
If you just want to get the basics, then go with the game programming books and tutorials mentioned above. If you want more than that, get Programming Windows, 5th edition, by Charles Petzold. It is the book when it comes to windows programming, and anybody that knows anything about windows programming will tell you so. It covers almost everything you''ll ever need to do with Win32, the books over 1400 pages, also comes in E-book form on the included cd-rom, that has all the sample apps. Anyways, that''s my suggestion.
"We are the music makers, and we are the dreamers of the dreams."
- Willy Wonka
"We are the music makers, and we are the dreamers of the dreams."
- Willy Wonka
Windows programing is confusing at the beginning.. learn how windows messageing works and why.. that is the best place to start!
The nightmare travels across the cosmos with his burning mane. The trail of ash that is produced.
?Have a nice day!?
As said above Charles Petzold. This is one of the few computer books that are really must own. Consider it your WinAPI beginner''s manual.
BetaShare - Run Your Beta Right!
Windows 98 Programming From the Ground Up is the easiest book to read IMO. I picked it up and instantly learned. Very quickly too. It will tell you EVERYTHING you need and dont need to know about programming in windows 98. There is also one for Windows Me....or 2000. But if you already know how to program in any version of windows there will only be very miniscule difference between them.
Explaining the setup of a normal window(using the code previosly posted:
-First you need to set up a window(for the program to look like something or course!) You do that by declaring an instance of a window class which is the WNDCLASSEX.
-You define some of the properties of the window.(a book should say what the properties do)
-You register that window with the operating system(basically its like making sure its going to be a valid window to show)
-Then you actually create a physical window to be shown by calling a CreateWindow or CreateWindowEx function and storing it to a handle for a window - thats what the HWND is. It literally a handle to a window so Windows can grab it and use it(well not literally). In that function call you define how the window will be shown and other properties.
Then you need to actually show the window by calling ShowWindow, and for reasons that I dont really know yet you call UpdateWindow right after you show it.
Then after that you need to establish a message loop. A message loop basically is a loop that will allow you program to pick up any input and process it within the program or decide to let it go and windows will handle it - i.e. Windows handles its own CTRL+ALT+DEL presses. One thing you need to know is that your program will receive input before windows does. I guess most people think windows gets a message and decides that its for your program - not exactly true. Let me write a commented loop out so it will be easier to understand:
while(GetMessage(&msg, NULL, 0, 0) ) {
TranslateMessage(&msg);
DispatchMessage(&msg);
}
The first parameter in get message is the structure for whatever input came in, the data for it will be stored here. At the time I forget what all the other paramters do. GetMessage also has a return type of BOOL. If a quit message(WM_QUIT) is received GetMessage returns false and that loop will exit. Inside the loop there are two function calls. TranslateMessage is for the virtual keys. Like F1, F2, F3, F4, escape, alt, control, and shift and other keys that dont have an ASCII code. If you dont know what ASCII code is then you probably dont know enought C++ to be starting windows programming - though just because you know it doesn''t mean you are ready either... DispatchMessage tells window to call your Window Function or your Window Procedure function. In that function your program should: one, handle what it needs to get from the user and process it; two, decide if messages shouldn''t be dealth with and let windows do something about it; and three, if a quit message comes in the program should exit.
Thats all I can share for now, I hope what I said if of some help.
Hint: Try not to let all the code overwhelm you if it looks cryptic.
P.S. Also you may need more C++ experience in general before you program in windows. I think you should know:
-Pointer and how they work
-Classes and structs
-All the basics relating to conditionals and loops
-Been programming in C++ for at least 3 months understanding all of it of course. If you still need to use a book to type programs often then you need more practice.
"Ogun''s Laughter Is No Joke!!!" - Ogun Kills On The Right, A Nigerian Poem.
Explaining the setup of a normal window(using the code previosly posted:
-First you need to set up a window(for the program to look like something or course!) You do that by declaring an instance of a window class which is the WNDCLASSEX.
-You define some of the properties of the window.(a book should say what the properties do)
-You register that window with the operating system(basically its like making sure its going to be a valid window to show)
-Then you actually create a physical window to be shown by calling a CreateWindow or CreateWindowEx function and storing it to a handle for a window - thats what the HWND is. It literally a handle to a window so Windows can grab it and use it(well not literally). In that function call you define how the window will be shown and other properties.
Then you need to actually show the window by calling ShowWindow, and for reasons that I dont really know yet you call UpdateWindow right after you show it.
Then after that you need to establish a message loop. A message loop basically is a loop that will allow you program to pick up any input and process it within the program or decide to let it go and windows will handle it - i.e. Windows handles its own CTRL+ALT+DEL presses. One thing you need to know is that your program will receive input before windows does. I guess most people think windows gets a message and decides that its for your program - not exactly true. Let me write a commented loop out so it will be easier to understand:
while(GetMessage(&msg, NULL, 0, 0) ) {
TranslateMessage(&msg);
DispatchMessage(&msg);
}
The first parameter in get message is the structure for whatever input came in, the data for it will be stored here. At the time I forget what all the other paramters do. GetMessage also has a return type of BOOL. If a quit message(WM_QUIT) is received GetMessage returns false and that loop will exit. Inside the loop there are two function calls. TranslateMessage is for the virtual keys. Like F1, F2, F3, F4, escape, alt, control, and shift and other keys that dont have an ASCII code. If you dont know what ASCII code is then you probably dont know enought C++ to be starting windows programming - though just because you know it doesn''t mean you are ready either... DispatchMessage tells window to call your Window Function or your Window Procedure function. In that function your program should: one, handle what it needs to get from the user and process it; two, decide if messages shouldn''t be dealth with and let windows do something about it; and three, if a quit message comes in the program should exit.
Thats all I can share for now, I hope what I said if of some help.
Hint: Try not to let all the code overwhelm you if it looks cryptic.
P.S. Also you may need more C++ experience in general before you program in windows. I think you should know:
-Pointer and how they work
-Classes and structs
-All the basics relating to conditionals and loops
-Been programming in C++ for at least 3 months understanding all of it of course. If you still need to use a book to type programs often then you need more practice.
"Ogun''s Laughter Is No Joke!!!" - Ogun Kills On The Right, A Nigerian Poem.
"Ogun's Laughter Is No Joke!!!" - Ogun Kills On The Right, A Nigerian Poem.
July 29, 2001 01:02 AM
all you have to do is look at the MSDN samples - namely to get started, look at the GENERIC sample. that should get you started...
quote:
Original post by Anonymous Poster
this is pitiful. for fucks sake, th compiler comes w/ sample applications you know?!? I went from VB->VC w/o any complaint. I don''t see how going from C/C++->VCcould be aas difficult....goddamn
Very intelligent and helpfull!
Do you think, that you''re in the right place. I thought, that this is a place you can easily find some help and not stupid answers like this one...
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement