• 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
Inuyashakagome16

Basic Win32 window with C++

6 posts in this topic

Recently I've been working on just creating a basic window with the Windows Api and I'm finding it very difficult  Not too understand, but to expand my window and add separators for certain and just adding buttons in general can be a bit of a pain. 

Is there an easier way/Is there a different library I should try using?

 

I'm using Visual Studio 2010 Ultimate with C++ (and DirectX11)

 

(Also I'm aware the rc file can be edited in ResEdit (which acted strange for me) and inside of Visual Studio)

0

Share this post


Link to post
Share on other sites

Since your writing a Windows API app in c++, it's all you at that point. If you want easy interface construction, try C#.

 

A simpler way to add controls to a window api c++ app is to use an *.rc file to setup a dialog window as your parent window. Now you can use the MSVS gui to design your window with the needed controls.

 

This example might help you.

http://www.codeproject.com/Articles/227831/A-dialog-based-Win32-C-program

-2

Share this post


Link to post
Share on other sites

There are bunch of libraries you could use. I think that it's possible to plug Qt into Visual Studio as well as there is wxWidgets that's really easy and powerful ( just a bit tricky to make it work with VS2010 ). Well, as you have Ultimate Edition I suppose you could try MFC as well, but personally I don't like it at all.

If you don't mind using CLR ( which is quite cool in some ways like garbage collection ) I suppose you could try the Windows Forms. 

 

One feature that connects them all is that they are all way easier to understand as well as code is far more programmer-friendly and unlike Windows API in most cases documentation is really clear.

 

I suppose you could make yourself familiar with this post as well http://stackoverflow.com/questions/115045/good-c-gui-library-for-windows

1

Share this post


Link to post
Share on other sites

Since your writing a Windows API app in c++, it's all you at that point. If you want easy interface construction, try C#.

 

A simpler way to add controls to a window api c++ app is to use an *.rc file to setup a dialog window as your parent window. Now you can use the MSVS gui to design your window with the needed controls.

 

This example might help you.

http://www.codeproject.com/Articles/227831/A-dialog-based-Win32-C-program

Okay. I've been trying to use the MSVS gui to make the window, I'm just trying to see if there is a better way.

 

 

There are bunch of libraries you could use. I think that it's possible to plug Qt into Visual Studio as well as there is wxWidgets that's really easy and powerful ( just a bit tricky to make it work with VS2010 ). Well, as you have Ultimate Edition I suppose you could try MFC as well, but personally I don't like it at all.

If you don't mind using CLR ( which is quite cool in some ways like garbage collection ) I suppose you could try the Windows Forms. 

 

One feature that connects them all is that they are all way easier to understand as well as code is far more programmer-friendly and unlike Windows API in most cases documentation is really clear.

 

I suppose you could make yourself familiar with this post as well http://stackoverflow.com/questions/115045/good-c-gui-library-for-windows

Alright I'll read through that and see what I can find. More or less what I'm trying to do is setup an editor because I have a decent base of code for DirectX so I was going to try and implement that into the editor. All I've tried doing is using the .rc editor that's in MSVS 2010 Ultimate to make the window and that's working okay. I mean it's not like the GUI creator that's there when you create a VB.Net application but it's decent. I'm just looking for options like separators, picture type boxes, etc etc.

0

Share this post


Link to post
Share on other sites

If you are working on an editor, I recommend that you use C# and WPF (or WinForms for a bit more straight-forward integration). It is easier, faster to develop, the tools are much better, and integrating C++ and .NET is relatively easy (if all you have to do is read/write files + some sort of in-game viewer).

0

Share this post


Link to post
Share on other sites

If you are working on an editor, I recommend that you use C# and WPF (or WinForms for a bit more straight-forward integration). It is easier, faster to develop, the tools are much better, and integrating C++ and .NET is relatively easy (if all you have to do is read/write files + some sort of in-game viewer).

That's pretty much all I'll be doing. A way to display what I've done so far, and the objects I'm trying to get into the game itself. So it would just be using the engine I'm currently making. Which is written in C++. So after long as I can connect C#/WPF with it, then It'll work.

 

 

The win32 API does not provide a native interface for separators, and by separators I think you mean the bars between adjacent child windows which the user could drag to resize those windows. While these are not very difficult to create "by hand", a not-so-complex editor can be made without those.

 

I'm one of the few that actually don't hate the win32 GUI API. It's object-oriented, light-weight (compared to the alternatives), it's native, and it has a rich set of controls. On the other hand, it's a C API, it's not easy to get into for lack of comprehensive introductory documentation, MS did not include a designer with the free versions of VS, and it's not so popular these days. But it's a very powerful library once you get your head around how it works and how to write your own custom controls, and most importantly, it's native, so you wouldn't have to deal with all that interop bulls**t to have the editor work with your native graphics engine, and you wouldn't have to learn C#/VB if you don't already know them.

 

Anyway, whether you end up using it or something else is up to you, and I wouldn't blame you for turning to another library, but maybe what you're aiming to accomplish isn't really that difficult to make in win32. From your description, a thin wrapper library like win32++ sounds like a perfect fit for your needs. It has lots of samples to start from.

I may try that out and see how well it works. Even without separators it would be fine,  I was just looking for a solution / way to set it up. Even if i just had two windows instead of one. (Sort of like a GIMP setup)

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