Making a Window in C++

Started by
8 comments, last by Daniel B 14 years, 11 months ago
Does anyone know of a good book or tutorial on how to create windows using C++
Advertisement
Look up CreateWindow and CreateWindowEx on MSDN for the details, it should be enough to get you going. Its a fairly tedious process, but not hard, and you can put it in a function and pretty much forget about it after that.

throw table_exception("(? ???)? ? ???");

Thats pretty much all above my head, it doesn't really explain what any of the code means or how to use it. I'm more looking for a beginners guide to window making, where it takes you step by step through the process of creating a window. Does anything like that exist?
theForger's Win32 API Tutorial is an excellent tutorial that I used when I was first learning Windows programming. [smile]
I wrote a D3D tutorial a while ago which explains all of the window stuff. You could use that and ignore all D3D related stuff (I.e.e everything after the "
Preparing to set up Direct3D" heading).
My code sets up a window wrapped up nicely in a C++ class too, which is handy to have since it avoids the need for lots of globals.

There's bound to be some tutorials on the subject somewhere, but I don't know of any.
The easiest way for a beginner is to have a library such as SFML create it for you. This has the benefit of providing you cross-platform support, for what that's worth. In SFML it's just a single line of code, and the documentation and tutorials demonstrate it clearly. SFML also provides support for things such as handling input, drawing graphics, making sound, and other things. It's pretty fun!
Thanks for the help, these tutorials seem more up my ally. I'll check out that library as well.
Reliable Software
Forgers Win32
Function X
Win32 Developer ( lonewolf's site )

Except lonewolf's site ( because i had already finished learning about win32 stuff by the time i found it ) those are the main websites i used while learning, each have thier strengths and weaknesses, so you should look at all of them while you learn.
for anything related to windows development check out their library at msdn it holds alot of info. There is some references to win32 development here on gamdev.net also if this isn't for a fullscreen game application then there is winform which is easier to work with and if you use visual studio you can use designer which let you design the layout with out the code also wpf(windows presentation framework is great too) Im currently using wpf for an editor im doing nice how sp1 added directx surfaces.
Bring more Pain
C++ in and of itself will take a lot of work to make a window with. Thankfully there are libraries that can do this for you rather easily. The one that has been recommended thus far is the win32 library (the standard for apps on windows).

While Win32 is a good library, it can be hard to learn if you don't already know how windows work. I would recommend something like SDL or Allegro because they are far easier and take much less time to learn.

This topic is closed to new replies.

Advertisement