• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
Thsotus

I want to study the WIndows API, need help.

6 posts in this topic

Hello, everyone, I want to learn the Windows API. I am planning just to create a meager calculator for Windows, and I need to learn the functions needed to create the text boxes and the buttons. Can someone give me a reference to the msdn database and a short explanation on how to use them? Thanks.

I don't understand how to create ANYTHING except an empty window within the Windows API. It's been hard to break into this.



Also, is the Windows API hard to port to other platforms such as Linux or Mac OS X?

Should I use OpenGL or the Windows API to create a 2d game? I know OpenGL is used for heavy 3d graphics, but it seems to hard for me. Is the Windows API better?
0

Share this post


Link to post
Share on other sites
You are better off using something like Winforms to create your program. You can visually design your little calculator app, and then just fill in the code that executes when a button is pressed. There is no need to bother writing out all the widgets by hand.

There are also multi-platform GUI creators. I believe one is called QT, but I have no experience with them.
0

Share this post


Link to post
Share on other sites
Most (or all) behavior of a control is determined by it window procedure which is part of its [url="http://msdn.microsoft.com/en-us/library/ms632596%28v=vs.85%29.aspx"]class[/url].
Using CreateWindow and specifying "Button" as the class name would create a button for example.
I second Daaark and can personally recommend [url="http://www.wxwidgets.org/"]wxWidgets[/url].
0

Share this post


Link to post
Share on other sites
The Windows API isn't [i]that[/i] difficult (in some ways it's more straightforward than many of the wrapper APIs that exist) but it does have quite a steep initial learning curve, and does require quite a lot of code to accomplish what seems like fairly small things. [url="http://www.winprog.org/tutorial/"]This page[/url] looks pretty good for getting started.

The one thing that might trip you up is that the Windows API is a procedural C-based API - no classes here! If you come from an OOP background this may be a little strange for you to get used to, so you're probably better off using a wrapper library. Some good suggestions upthread, but I'd like to add that you should think a little about your objective here. Do you want to specifically learn and use the Windows API or do you want to write programs to get stuff done? If the latter, then maybe going for something like Winforms is more suitable for your requirement.
0

Share this post


Link to post
Share on other sites
I second mhagain, the win32 API isn't that hard BUT results into very, very unclean code.

Now look the bottom [url="http://www.win32developer.com/tutorial/windows/windows_tutorial_3.shtm"]this[/url] page to see a example of a very small pure win32 api program. If you are fine with the idea of writing this kind of code, this is the way to go.

But if you come from a OO world, you should probably go with a OO framwork like wxWidgets or QT.




If you do want to use the win32 api, you NEED the 'Programming windows 5th edition' by Charles Petzold. And you need your favorite search engine to find documentation on the win32 api. Often you will be browsing in the msdn documentation.




Hope this helps,




assainator

1

Share this post


Link to post
Share on other sites
If your intent is to write a single Windows application and be done with the Windows API forever, it's overkill and expensive - [i]but[/i] I'd recommend looking for the latest edition of Charles Petzold's [i]Programming Windows[/i].

EDIT: Oops, missed the above post. So, I'd [i]second[/i] the vote for Petzold.
0

Share this post


Link to post
Share on other sites
It's not that the Windows API is difficult. It's just a horrible waste of time. Who the hell wants to write out all those widget coordinates, and WndProcs and message handlers, and then compile and run every 15 seconds just to see what the dialog ends up looking like? Even doing the simplest things end up being a giant pain in the ass and you have to fill in large structs and pass them around to a ton of functions that have seemingly 5000 arguments each (with half of them taking giant structs as input!)

You should use something like wxWidgets or Windows Forms. Than you can easily layout any custom form you like, and simply add the code that runs when those buttons are clicked, or something is entered into a control. With WinForms, a lot of things that took paragraphs of code with the regular API have been condensed down to a single function call.

There is also a program called ResEd that can make some Windows Resource scripts for you, but you still have to use the Windows API to use them. [url="http://radasm.cherrytree.at/resed/"]http://radasm.cherrytree.at/resed/[/url]
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0