Sign in to follow this  
Adam1942

Making a Window in C++

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

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